Skip to content

Commit

Permalink
Get tags api
Browse files Browse the repository at this point in the history
  • Loading branch information
manan164 committed Sep 12, 2023
1 parent b00e62d commit 8f83127
Show file tree
Hide file tree
Showing 3 changed files with 93 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/io/orkes/conductor/client/SchedulerClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,6 @@ SearchResultWorkflowScheduleExecutionModel searchV22(

void deleteTagForSchedule(List<TagObject> body, String name);

List<TagObject> getTagsForSchedule(String name);

}
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,9 @@ public void putTagForSchedule(List<TagObject> body, String name) {
public void deleteTagForSchedule(List<TagObject> body, String name) {
schedulerResourceApi.deleteTagForSchedule(body, name);
}

@Override
public List<TagObject> getTagsForSchedule(String name) {
return schedulerResourceApi.getTagsForSchedule(name);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -1635,4 +1635,90 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch
String[] localVarAuthNames = new String[] { "api_key" };
return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}

/**
* Get tags by schedule
*
* @param name (required)
* @return List&lt;TagObject&gt;
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public List<TagObject> getTagsForSchedule(String name) throws ApiException {
ApiResponse<List<TagObject>> resp = getTagsForScheduleWithHttpInfo(name);
return resp.getData();
}

/**
* Get tags by schedule
*
* @param name (required)
* @return ApiResponse&lt;List&lt;TagObject&gt;&gt;
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse<List<TagObject>> getTagsForScheduleWithHttpInfo(String name) throws ApiException {
com.squareup.okhttp.Call call = getTagsForScheduleValidateBeforeCall(name, null, null);
Type localVarReturnType = new TypeReference<List<TagObject>>() {}.getType();
return apiClient.execute(call, localVarReturnType);
}

@SuppressWarnings("rawtypes")
private com.squareup.okhttp.Call getTagsForScheduleValidateBeforeCall(String name, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
// verify the required parameter 'name' is set
if (name == null) {
throw new ApiException("Missing the required parameter 'name' when calling getTagsForSchedule(Async)");
}

com.squareup.okhttp.Call call = getTagsForScheduleCall(name, progressListener, progressRequestListener);
return call;
}

/**
* Build call for getTagsForSchedule
* @param name (required)
* @param progressListener Progress listener
* @param progressRequestListener Progress request listener
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
*/
public com.squareup.okhttp.Call getTagsForScheduleCall(String name, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = null;

// create path and map variables
String localVarPath = "/scheduler/schedules/{name}/tags"
.replaceAll("\\{" + "name" + "\\}", apiClient.escapeString(name.toString()));

List<Pair> localVarQueryParams = new ArrayList<Pair>();
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();

Map<String, String> localVarHeaderParams = new HashMap<String, String>();

Map<String, Object> localVarFormParams = new HashMap<String, Object>();

final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);

final String[] localVarContentTypes = {

};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);

if(progressListener != null) {
apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
@Override
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
return originalResponse.newBuilder()
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
.build();
}
});
}

String[] localVarAuthNames = new String[] { "api_key" };
return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
}

0 comments on commit 8f83127

Please sign in to comment.