Skip to content

Commit

Permalink
remove publishEvent
Browse files Browse the repository at this point in the history
  • Loading branch information
c4lm committed Aug 11, 2023
1 parent b9e40b4 commit 314cb3c
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 161 deletions.
2 changes: 0 additions & 2 deletions src/main/java/io/orkes/conductor/client/EventClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,4 @@ public abstract class EventClient extends com.netflix.conductor.client.http.Even
public abstract void deleteQueueConfig(QueueConfiguration queueConfiguration);

public abstract void putQueueConfig(QueueConfiguration queueConfiguration) throws Exception;

public abstract void publishEvent(String id, Map<String, Object> payload, String queueType, String queueName) throws Exception;
}
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,4 @@ public void deleteQueueConfig(QueueConfiguration queueConfiguration) {
public void putQueueConfig(QueueConfiguration queueConfiguration) throws Exception {
eventResourceApi.putQueueConfig(queueConfiguration.getConfiguration(), queueConfiguration.getQueueType(), queueConfiguration.getQueueName());
}

@Override
public void publishEvent(String id, Map<String, Object> payload, String queueType, String queueName) throws Exception {
eventResourceApi.publishEvent(id, payload, queueType, queueName);
}
}
154 changes: 0 additions & 154 deletions src/main/java/io/orkes/conductor/client/http/api/EventResourceApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -1134,158 +1134,4 @@ private ApiResponse<Void> updateEventHandlerWithHttpInfo(EventHandler eventHandl
updateEventHandlerValidateBeforeCall(eventHandler, null, null);
return apiClient.execute(call);
}

/**
* Build call for publishEvent
*
* @param id (required)
* @param payload (required)
* @param queueType (required)
* @param queueName (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 publishEventCall(
String id,
Map<String, Object> payload,
String queueType,
String queueName,
final ProgressResponseBody.ProgressListener progressListener,
final ProgressRequestBody.ProgressRequestListener progressRequestListener)
throws ApiException {
Object localVarPostBody = payload;

// create path and map variables
String localVarPath =
"/event/queue/publish/{queueType}/{queueName}"
.replaceAll(
"\\{" + "queueType" + "\\}",
apiClient.escapeString(queueType.toString()))
.replaceAll(
"\\{" + "queueName" + "\\}",
apiClient.escapeString(queueName.toString()));

List<Pair> localVarQueryParams = new ArrayList<Pair>();
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
localVarQueryParams.addAll(apiClient.parameterToPair("id", id));

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

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

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

final String[] localVarContentTypes = {"application/json"};
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,
"POST",
localVarQueryParams,
localVarCollectionQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarFormParams,
localVarAuthNames,
progressRequestListener);
}

private com.squareup.okhttp.Call publishEventValidateBeforeCall(
String id,
Map<String, Object> payload,
String queueType,
String queueName,
final ProgressResponseBody.ProgressListener progressListener,
final ProgressRequestBody.ProgressRequestListener progressRequestListener)
throws ApiException {
// verify the required parameter 'body' is set
if (id == null) {
throw new ApiException(
"Missing the required parameter 'id' when calling publishEvent(Async)");
}
// verify the required parameter 'body' is set
if (payload == null || payload.isEmpty()) {
throw new ApiException(
"Missing the required parameter 'body' when calling publishEvent(Async)");
}
// verify the required parameter 'queueType' is set
if (queueType == null) {
throw new ApiException(
"Missing the required parameter 'queueType' when calling publishEvent(Async)");
}
// verify the required parameter 'queueName' is set
if (queueName == null) {
throw new ApiException(
"Missing the required parameter 'queueName' when calling publishEvent(Async)");
}

com.squareup.okhttp.Call call =
publishEventCall(
id, payload, queueType, queueName, progressListener, progressRequestListener);
return call;
}

/**
* Create or update queue config by name
*
* @param id (required)
* @param payload (required)
* @param queueType (required)
* @param queueName (required)
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the
* response body
*/
public void publishEvent(String id, Map<String, Object> payload, String queueType, String queueName)
throws ApiException {
publishEventWithHttpInfo(id, payload, queueType, queueName);
}

/**
* Create or update queue config by name
* @param id (required)
* @param payload (required)
* @param queueType (required)
* @param queueName (required)
* @return ApiResponse&lt;Object&gt;
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the
* response body
*/
private ApiResponse<Void> publishEventWithHttpInfo(
String id, Map<String, Object> payload, String queueType, String queueName) throws ApiException {
com.squareup.okhttp.Call call =
publishEventValidateBeforeCall(id, payload, queueType, queueName, null, null);
Type localVarReturnType = new TypeReference<Object>() {}.getType();
return apiClient.execute(call, localVarReturnType);
}


}

0 comments on commit 314cb3c

Please sign in to comment.