diff --git a/Conductor/Api/ApplicationResourceApi.cs b/Conductor/Api/ApplicationResourceApi.cs index 6cb93351..f7e789d2 100644 --- a/Conductor/Api/ApplicationResourceApi.cs +++ b/Conductor/Api/ApplicationResourceApi.cs @@ -4,345 +4,11 @@ using RestSharp; using Conductor.Client; using Conductor.Client.Models; +using ThreadTask = System.Threading.Tasks; +using conductor_csharp.Api; namespace Conductor.Api { - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IApplicationResourceApi : IApiAccessor - { - #region Synchronous Operations - /// - /// - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// Object - Object AddRoleToApplicationUser(string applicationId, string role); - - /// - /// - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// ApiResponse of Object - ApiResponse AddRoleToApplicationUserWithHttpInfo(string applicationId, string role); - /// - /// Create an access key for an application - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// Object - Object CreateAccessKey(string id); - - /// - /// Create an access key for an application - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of Object - ApiResponse CreateAccessKeyWithHttpInfo(string id); - /// - /// Create an application - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// Object - Object CreateApplication(CreateOrUpdateApplicationRequest body); - - /// - /// Create an application - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of Object - ApiResponse CreateApplicationWithHttpInfo(CreateOrUpdateApplicationRequest body); - /// - /// Delete an access key - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// Object - Object DeleteAccessKey(string applicationId, string keyId); - - /// - /// Delete an access key - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// ApiResponse of Object - ApiResponse DeleteAccessKeyWithHttpInfo(string applicationId, string keyId); - /// - /// Delete an application - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// Object - Object DeleteApplication(string id); - - /// - /// Delete an application - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of Object - ApiResponse DeleteApplicationWithHttpInfo(string id); - /// - /// Delete a tag for application - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// - void DeleteTagForApplication(List body, string id); - - /// - /// Delete a tag for application - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// ApiResponse of Object(void) - ApiResponse DeleteTagForApplicationWithHttpInfo(List body, string id); - /// - /// Get application's access keys - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// Object - Object GetAccessKeys(string id); - - /// - /// Get application's access keys - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of Object - ApiResponse GetAccessKeysWithHttpInfo(string id); - /// - /// Get application id by access key id - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// Object - Object GetAppByAccessKeyId(string accessKeyId); - - /// - /// Get application id by access key id - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of Object - ApiResponse GetAppByAccessKeyIdWithHttpInfo(string accessKeyId); - /// - /// Get an application by id - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// Object - Object GetApplication(string id); - - /// - /// Get an application by id - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of Object - ApiResponse GetApplicationWithHttpInfo(string id); - /// - /// Get tags by application - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// List<TagObject> - List GetTagsForApplication(string id); - - /// - /// Get tags by application - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of List<TagObject> - ApiResponse> GetTagsForApplicationWithHttpInfo(string id); - /// - /// Get all applications - /// - /// - /// - /// - /// Thrown when fails to make API call - /// List<ExtendedConductorApplication> - List ListApplications(); - - /// - /// Get all applications - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ApiResponse of List<ExtendedConductorApplication> - ApiResponse> ListApplicationsWithHttpInfo(); - /// - /// Put a tag to application - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// - void PutTagForApplication(List body, string id); - - /// - /// Put a tag to application - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// ApiResponse of Object(void) - ApiResponse PutTagForApplicationWithHttpInfo(List body, string id); - /// - /// - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// Object - Object RemoveRoleFromApplicationUser(string applicationId, string role); - - /// - /// - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// ApiResponse of Object - ApiResponse RemoveRoleFromApplicationUserWithHttpInfo(string applicationId, string role); - /// - /// Toggle the status of an access key - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// Object - Object ToggleAccessKeyStatus(string applicationId, string keyId); - - /// - /// Toggle the status of an access key - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// ApiResponse of Object - ApiResponse ToggleAccessKeyStatusWithHttpInfo(string applicationId, string keyId); - /// - /// Update an application - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// Object - Object UpdateApplication(CreateOrUpdateApplicationRequest body, string id); - - /// - /// Update an application - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// ApiResponse of Object - ApiResponse UpdateApplicationWithHttpInfo(CreateOrUpdateApplicationRequest body, string id); - #endregion Synchronous Operations - } - /// /// Represents a collection of functions to interact with the API endpoints /// @@ -394,7 +60,7 @@ public ApplicationResourceApi(Conductor.Client.Configuration configuration = nul /// The base path public String GetBasePath() { - return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); + return this.Configuration.ApiClient.RestClient.Options.BaseUrl.ToString(); } /// @@ -420,7 +86,7 @@ public Conductor.Client.ExceptionFactory ExceptionFactory } /// - /// + /// Add role to Application User /// /// Thrown when fails to make API call /// @@ -428,18 +94,31 @@ public Conductor.Client.ExceptionFactory ExceptionFactory /// Object public Object AddRoleToApplicationUser(string applicationId, string role) { - ApiResponse localVarResponse = AddRoleToApplicationUserWithHttpInfo(applicationId, role); + ApiResponse localVarResponse = AddRoleToApplicationUserWithHttpInfo(applicationId, role); + return localVarResponse.Data; + } + + /// + /// Asynchronous Add role to Application User + /// + /// Thrown when fails to make API call + /// + /// + /// Object + public async ThreadTask.Task AddRoleToApplicationUserAsync(string applicationId, string role) + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(AddRoleToApplicationUserWithHttpInfo(applicationId, role)); return localVarResponse.Data; } /// - /// + /// Add role to Application User /// /// Thrown when fails to make API call /// /// /// ApiResponse of Object - public ApiResponse AddRoleToApplicationUserWithHttpInfo(string applicationId, string role) + public ApiResponse AddRoleToApplicationUserWithHttpInfo(string applicationId, string role) { // verify the required parameter 'applicationId' is set if (applicationId == null) @@ -458,29 +137,29 @@ public ApiResponse AddRoleToApplicationUserWithHttpInfo(string applicati // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); if (applicationId != null) localVarPathParams.Add("applicationId", this.Configuration.ApiClient.ParameterToString(applicationId)); // path parameter if (role != null) localVarPathParams.Add("role", this.Configuration.ApiClient.ParameterToString(role)); // path parameter - // authentication (api_key) required + // authentication (api_key) required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken; } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -490,9 +169,9 @@ public ApiResponse AddRoleToApplicationUserWithHttpInfo(string applicati if (exception != null) throw exception; } - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); } /// @@ -503,7 +182,19 @@ public ApiResponse AddRoleToApplicationUserWithHttpInfo(string applicati /// Object public Object CreateAccessKey(string id) { - ApiResponse localVarResponse = CreateAccessKeyWithHttpInfo(id); + ApiResponse localVarResponse = CreateAccessKeyWithHttpInfo(id); + return localVarResponse.Data; + } + + /// + /// Asynchronous Create an access key for an application + /// + /// Thrown when fails to make API call + /// + /// Object + public async ThreadTask.Task CreateAccessKeyAsync(string id) + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(CreateAccessKeyWithHttpInfo(id)); return localVarResponse.Data; } @@ -513,7 +204,7 @@ public Object CreateAccessKey(string id) /// Thrown when fails to make API call /// /// ApiResponse of Object - public ApiResponse CreateAccessKeyWithHttpInfo(string id) + public ApiResponse CreateAccessKeyWithHttpInfo(string id) { // verify the required parameter 'id' is set if (id == null) @@ -529,28 +220,28 @@ public ApiResponse CreateAccessKeyWithHttpInfo(string id) // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); if (id != null) localVarPathParams.Add("id", this.Configuration.ApiClient.ParameterToString(id)); // path parameter - // authentication (api_key) required + // authentication (api_key) required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken; } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -560,9 +251,9 @@ public ApiResponse CreateAccessKeyWithHttpInfo(string id) if (exception != null) throw exception; } - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); } /// @@ -573,7 +264,19 @@ public ApiResponse CreateAccessKeyWithHttpInfo(string id) /// Object public Object CreateApplication(CreateOrUpdateApplicationRequest body) { - ApiResponse localVarResponse = CreateApplicationWithHttpInfo(body); + ApiResponse localVarResponse = CreateApplicationWithHttpInfo(body); + return localVarResponse.Data; + } + + /// + /// Asynchronous Create an application + /// + /// Thrown when fails to make API call + /// + /// Object + public async ThreadTask.Task CreateApplicationAsync(CreateOrUpdateApplicationRequest body) + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(CreateApplicationWithHttpInfo(body)); return localVarResponse.Data; } @@ -583,7 +286,7 @@ public Object CreateApplication(CreateOrUpdateApplicationRequest body) /// Thrown when fails to make API call /// /// ApiResponse of Object - public ApiResponse CreateApplicationWithHttpInfo(CreateOrUpdateApplicationRequest body) + public ApiResponse CreateApplicationWithHttpInfo(CreateOrUpdateApplicationRequest body) { // verify the required parameter 'body' is set if (body == null) @@ -599,14 +302,14 @@ public ApiResponse CreateApplicationWithHttpInfo(CreateOrUpdateApplicati // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -626,9 +329,9 @@ public ApiResponse CreateApplicationWithHttpInfo(CreateOrUpdateApplicati } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -638,9 +341,9 @@ public ApiResponse CreateApplicationWithHttpInfo(CreateOrUpdateApplicati if (exception != null) throw exception; } - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); } /// @@ -652,7 +355,20 @@ public ApiResponse CreateApplicationWithHttpInfo(CreateOrUpdateApplicati /// Object public Object DeleteAccessKey(string applicationId, string keyId) { - ApiResponse localVarResponse = DeleteAccessKeyWithHttpInfo(applicationId, keyId); + ApiResponse localVarResponse = DeleteAccessKeyWithHttpInfo(applicationId, keyId); + return localVarResponse.Data; + } + + /// + /// Asynchronous Delete an access key + /// + /// Thrown when fails to make API call + /// + /// + /// Object + public async ThreadTask.Task DeleteAccessKeyAsync(string applicationId, string keyId) + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(DeleteAccessKeyWithHttpInfo(applicationId, keyId)); return localVarResponse.Data; } @@ -663,7 +379,7 @@ public Object DeleteAccessKey(string applicationId, string keyId) /// /// /// ApiResponse of Object - public ApiResponse DeleteAccessKeyWithHttpInfo(string applicationId, string keyId) + public ApiResponse DeleteAccessKeyWithHttpInfo(string applicationId, string keyId) { // verify the required parameter 'applicationId' is set if (applicationId == null) @@ -682,29 +398,29 @@ public ApiResponse DeleteAccessKeyWithHttpInfo(string applicationId, str // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); if (applicationId != null) localVarPathParams.Add("applicationId", this.Configuration.ApiClient.ParameterToString(applicationId)); // path parameter if (keyId != null) localVarPathParams.Add("keyId", this.Configuration.ApiClient.ParameterToString(keyId)); // path parameter - // authentication (api_key) required + // authentication (api_key) required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken; } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -714,9 +430,9 @@ public ApiResponse DeleteAccessKeyWithHttpInfo(string applicationId, str if (exception != null) throw exception; } - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); } /// @@ -727,7 +443,19 @@ public ApiResponse DeleteAccessKeyWithHttpInfo(string applicationId, str /// Object public Object DeleteApplication(string id) { - ApiResponse localVarResponse = DeleteApplicationWithHttpInfo(id); + ApiResponse localVarResponse = DeleteApplicationWithHttpInfo(id); + return localVarResponse.Data; + } + + /// + /// Asynchronous Delete an application + /// + /// Thrown when fails to make API call + /// + /// Object + public async ThreadTask.Task DeleteApplicationAsync(string id) + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(DeleteApplicationWithHttpInfo(id)); return localVarResponse.Data; } @@ -737,7 +465,7 @@ public Object DeleteApplication(string id) /// Thrown when fails to make API call /// /// ApiResponse of Object - public ApiResponse DeleteApplicationWithHttpInfo(string id) + public ApiResponse DeleteApplicationWithHttpInfo(string id) { // verify the required parameter 'id' is set if (id == null) @@ -753,28 +481,28 @@ public ApiResponse DeleteApplicationWithHttpInfo(string id) // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); if (id != null) localVarPathParams.Add("id", this.Configuration.ApiClient.ParameterToString(id)); // path parameter - // authentication (api_key) required + // authentication (api_key) required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken; } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -784,9 +512,9 @@ public ApiResponse DeleteApplicationWithHttpInfo(string id) if (exception != null) throw exception; } - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); } /// @@ -801,6 +529,19 @@ public void DeleteTagForApplication(List body, string id) DeleteTagForApplicationWithHttpInfo(body, id); } + + /// + /// Asynchronous Delete a tag for application + /// + /// Thrown when fails to make API call + /// + /// + /// + public async void DeleteTagForApplicationAsync(List body, string id) + { + await ThreadTask.Task.FromResult(DeleteTagForApplicationWithHttpInfo(body, id)); + } + /// /// Delete a tag for application /// @@ -808,7 +549,7 @@ public void DeleteTagForApplication(List body, string id) /// /// /// ApiResponse of Object(void) - public ApiResponse DeleteTagForApplicationWithHttpInfo(List body, string id) + public ApiResponse DeleteTagForApplicationWithHttpInfo(List body, string id) { // verify the required parameter 'body' is set if (body == null) @@ -827,13 +568,13 @@ public ApiResponse DeleteTagForApplicationWithHttpInfo(List b // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - }; + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -854,9 +595,9 @@ public ApiResponse DeleteTagForApplicationWithHttpInfo(List b } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -866,9 +607,9 @@ public ApiResponse DeleteTagForApplicationWithHttpInfo(List b if (exception != null) throw exception; } - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); } /// @@ -879,7 +620,19 @@ public ApiResponse DeleteTagForApplicationWithHttpInfo(List b /// Object public Object GetAccessKeys(string id) { - ApiResponse localVarResponse = GetAccessKeysWithHttpInfo(id); + ApiResponse localVarResponse = GetAccessKeysWithHttpInfo(id); + return localVarResponse.Data; + } + + /// + /// Asynchronous Get application's access keys + /// + /// Thrown when fails to make API call + /// + /// Object + public async ThreadTask.Task GetAccessKeysAsync(string id) + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(GetAccessKeysWithHttpInfo(id)); return localVarResponse.Data; } @@ -889,7 +642,7 @@ public Object GetAccessKeys(string id) /// Thrown when fails to make API call /// /// ApiResponse of Object - public ApiResponse GetAccessKeysWithHttpInfo(string id) + public ApiResponse GetAccessKeysWithHttpInfo(string id) { // verify the required parameter 'id' is set if (id == null) @@ -905,28 +658,28 @@ public ApiResponse GetAccessKeysWithHttpInfo(string id) // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); if (id != null) localVarPathParams.Add("id", this.Configuration.ApiClient.ParameterToString(id)); // path parameter - // authentication (api_key) required + // authentication (api_key) required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken; } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -936,9 +689,9 @@ public ApiResponse GetAccessKeysWithHttpInfo(string id) if (exception != null) throw exception; } - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); } /// @@ -949,7 +702,19 @@ public ApiResponse GetAccessKeysWithHttpInfo(string id) /// Object public Object GetAppByAccessKeyId(string accessKeyId) { - ApiResponse localVarResponse = GetAppByAccessKeyIdWithHttpInfo(accessKeyId); + ApiResponse localVarResponse = GetAppByAccessKeyIdWithHttpInfo(accessKeyId); + return localVarResponse.Data; + } + + /// + /// Asynchronous Get application id by access key id + /// + /// Thrown when fails to make API call + /// + /// Object + public async ThreadTask.Task GetAppByAccessKeyIdAsync(string accessKeyId) + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(GetAppByAccessKeyIdWithHttpInfo(accessKeyId)); return localVarResponse.Data; } @@ -959,7 +724,7 @@ public Object GetAppByAccessKeyId(string accessKeyId) /// Thrown when fails to make API call /// /// ApiResponse of Object - public ApiResponse GetAppByAccessKeyIdWithHttpInfo(string accessKeyId) + public ApiResponse GetAppByAccessKeyIdWithHttpInfo(string accessKeyId) { // verify the required parameter 'accessKeyId' is set if (accessKeyId == null) @@ -975,28 +740,28 @@ public ApiResponse GetAppByAccessKeyIdWithHttpInfo(string accessKeyId) // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); if (accessKeyId != null) localVarPathParams.Add("accessKeyId", this.Configuration.ApiClient.ParameterToString(accessKeyId)); // path parameter - // authentication (api_key) required + // authentication (api_key) required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken; } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1006,9 +771,9 @@ public ApiResponse GetAppByAccessKeyIdWithHttpInfo(string accessKeyId) if (exception != null) throw exception; } - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); } /// @@ -1019,7 +784,19 @@ public ApiResponse GetAppByAccessKeyIdWithHttpInfo(string accessKeyId) /// Object public Object GetApplication(string id) { - ApiResponse localVarResponse = GetApplicationWithHttpInfo(id); + ApiResponse localVarResponse = GetApplicationWithHttpInfo(id); + return localVarResponse.Data; + } + + /// + /// Asynchronous Get an application by id + /// + /// Thrown when fails to make API call + /// + /// Object + public async ThreadTask.Task GetApplicationAsync(string id) + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(GetApplicationWithHttpInfo(id)); return localVarResponse.Data; } @@ -1029,7 +806,7 @@ public Object GetApplication(string id) /// Thrown when fails to make API call /// /// ApiResponse of Object - public ApiResponse GetApplicationWithHttpInfo(string id) + public ApiResponse GetApplicationWithHttpInfo(string id) { // verify the required parameter 'id' is set if (id == null) @@ -1045,28 +822,28 @@ public ApiResponse GetApplicationWithHttpInfo(string id) // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); if (id != null) localVarPathParams.Add("id", this.Configuration.ApiClient.ParameterToString(id)); // path parameter - // authentication (api_key) required + // authentication (api_key) required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken; } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1076,9 +853,9 @@ public ApiResponse GetApplicationWithHttpInfo(string id) if (exception != null) throw exception; } - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); } /// @@ -1093,6 +870,18 @@ public List GetTagsForApplication(string id) return localVarResponse.Data; } + /// + /// Asynchronous Get tags by application + /// + /// Thrown when fails to make API call + /// + /// List<TagObject> + public async ThreadTask.Task> GetTagsForApplicationAsync(string id) + { + ApiResponse> localVarResponse = await ThreadTask.Task.FromResult(GetTagsForApplicationWithHttpInfo(id)); + return localVarResponse.Data; + } + /// /// Get tags by application /// @@ -1115,28 +904,28 @@ public ApiResponse> GetTagsForApplicationWithHttpInfo(string id) // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); if (id != null) localVarPathParams.Add("id", this.Configuration.ApiClient.ParameterToString(id)); // path parameter - // authentication (api_key) required + // authentication (api_key) required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken; } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1147,8 +936,8 @@ public ApiResponse> GetTagsForApplicationWithHttpInfo(string id) } return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (List)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (List)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); } /// @@ -1162,6 +951,17 @@ public List ListApplications() return localVarResponse.Data; } + /// + /// Asynchronous Get all applications + /// + /// Thrown when fails to make API call + /// List<ExtendedConductorApplication> + public async ThreadTask.Task> ListApplicationsAsync() + { + ApiResponse> localVarResponse = await ThreadTask.Task.FromResult(ListApplicationsWithHttpInfo()); + return localVarResponse.Data; + } + /// /// Get all applications /// @@ -1180,13 +980,13 @@ public ApiResponse> ListApplicationsWithHttpI // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -1198,9 +998,9 @@ public ApiResponse> ListApplicationsWithHttpI } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1211,8 +1011,8 @@ public ApiResponse> ListApplicationsWithHttpI } return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (List)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (List)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); } /// @@ -1227,6 +1027,18 @@ public void PutTagForApplication(List body, string id) PutTagForApplicationWithHttpInfo(body, id); } + /// + /// Asynchronous Put a tag to application + /// + /// Thrown when fails to make API call + /// + /// + /// + public async void PutTagForApplicationAsync(List body, string id) + { + await ThreadTask.Task.FromResult(PutTagForApplicationWithHttpInfo(body, id)); + } + /// /// Put a tag to application /// @@ -1234,7 +1046,7 @@ public void PutTagForApplication(List body, string id) /// /// /// ApiResponse of Object(void) - public ApiResponse PutTagForApplicationWithHttpInfo(List body, string id) + public ApiResponse PutTagForApplicationWithHttpInfo(List body, string id) { // verify the required parameter 'body' is set if (body == null) @@ -1253,13 +1065,13 @@ public ApiResponse PutTagForApplicationWithHttpInfo(List body // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - }; + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -1280,9 +1092,9 @@ public ApiResponse PutTagForApplicationWithHttpInfo(List body } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1292,13 +1104,13 @@ public ApiResponse PutTagForApplicationWithHttpInfo(List body if (exception != null) throw exception; } - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); } /// - /// + /// Remove Role from Aplication user /// /// Thrown when fails to make API call /// @@ -1306,18 +1118,30 @@ public ApiResponse PutTagForApplicationWithHttpInfo(List body /// Object public Object RemoveRoleFromApplicationUser(string applicationId, string role) { - ApiResponse localVarResponse = RemoveRoleFromApplicationUserWithHttpInfo(applicationId, role); + ApiResponse localVarResponse = RemoveRoleFromApplicationUserWithHttpInfo(applicationId, role); return localVarResponse.Data; } /// - /// + /// Asynchronous Remove Role from Aplication user + /// + /// + /// + /// + public async ThreadTask.Task RemoveRoleFromApplicationUserAsync(string applicationId, string role) + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(RemoveRoleFromApplicationUserWithHttpInfo(applicationId, role)); + return localVarResponse.Data; + } + + /// + /// Remove Role from Aplication use /// /// Thrown when fails to make API call /// /// /// ApiResponse of Object - public ApiResponse RemoveRoleFromApplicationUserWithHttpInfo(string applicationId, string role) + public ApiResponse RemoveRoleFromApplicationUserWithHttpInfo(string applicationId, string role) { // verify the required parameter 'applicationId' is set if (applicationId == null) @@ -1336,29 +1160,29 @@ public ApiResponse RemoveRoleFromApplicationUserWithHttpInfo(string appl // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); if (applicationId != null) localVarPathParams.Add("applicationId", this.Configuration.ApiClient.ParameterToString(applicationId)); // path parameter if (role != null) localVarPathParams.Add("role", this.Configuration.ApiClient.ParameterToString(role)); // path parameter - // authentication (api_key) required + // authentication (api_key) required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken; } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1368,9 +1192,9 @@ public ApiResponse RemoveRoleFromApplicationUserWithHttpInfo(string appl if (exception != null) throw exception; } - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); } /// @@ -1382,7 +1206,20 @@ public ApiResponse RemoveRoleFromApplicationUserWithHttpInfo(string appl /// Object public Object ToggleAccessKeyStatus(string applicationId, string keyId) { - ApiResponse localVarResponse = ToggleAccessKeyStatusWithHttpInfo(applicationId, keyId); + ApiResponse localVarResponse = ToggleAccessKeyStatusWithHttpInfo(applicationId, keyId); + return localVarResponse.Data; + } + + /// + /// Asynchronous Toggle the status of an access key + /// + /// Thrown when fails to make API call + /// + /// + /// Object + public async ThreadTask.Task ToggleAccessKeyStatusAsync(string applicationId, string keyId) + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(ToggleAccessKeyStatusWithHttpInfo(applicationId, keyId)); return localVarResponse.Data; } @@ -1393,7 +1230,7 @@ public Object ToggleAccessKeyStatus(string applicationId, string keyId) /// /// /// ApiResponse of Object - public ApiResponse ToggleAccessKeyStatusWithHttpInfo(string applicationId, string keyId) + public ApiResponse ToggleAccessKeyStatusWithHttpInfo(string applicationId, string keyId) { // verify the required parameter 'applicationId' is set if (applicationId == null) @@ -1412,29 +1249,29 @@ public ApiResponse ToggleAccessKeyStatusWithHttpInfo(string applicationI // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); if (applicationId != null) localVarPathParams.Add("applicationId", this.Configuration.ApiClient.ParameterToString(applicationId)); // path parameter if (keyId != null) localVarPathParams.Add("keyId", this.Configuration.ApiClient.ParameterToString(keyId)); // path parameter - // authentication (api_key) required + // authentication (api_key) required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken; } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1444,9 +1281,9 @@ public ApiResponse ToggleAccessKeyStatusWithHttpInfo(string applicationI if (exception != null) throw exception; } - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); } /// @@ -1458,7 +1295,20 @@ public ApiResponse ToggleAccessKeyStatusWithHttpInfo(string applicationI /// Object public Object UpdateApplication(CreateOrUpdateApplicationRequest body, string id) { - ApiResponse localVarResponse = UpdateApplicationWithHttpInfo(body, id); + ApiResponse localVarResponse = UpdateApplicationWithHttpInfo(body, id); + return localVarResponse.Data; + } + + /// + /// Asynchronous Update an application + /// + /// Thrown when fails to make API call + /// + /// + /// Object + public async ThreadTask.Task UpdateApplicationAsync(CreateOrUpdateApplicationRequest body, string id) + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(UpdateApplicationWithHttpInfo(body, id)); return localVarResponse.Data; } @@ -1469,7 +1319,7 @@ public Object UpdateApplication(CreateOrUpdateApplicationRequest body, string id /// /// /// ApiResponse of Object - public ApiResponse UpdateApplicationWithHttpInfo(CreateOrUpdateApplicationRequest body, string id) + public ApiResponse UpdateApplicationWithHttpInfo(CreateOrUpdateApplicationRequest body, string id) { // verify the required parameter 'body' is set if (body == null) @@ -1488,14 +1338,14 @@ public ApiResponse UpdateApplicationWithHttpInfo(CreateOrUpdateApplicati // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -1516,9 +1366,9 @@ public ApiResponse UpdateApplicationWithHttpInfo(CreateOrUpdateApplicati } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1528,9 +1378,9 @@ public ApiResponse UpdateApplicationWithHttpInfo(CreateOrUpdateApplicati if (exception != null) throw exception; } - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); } } } diff --git a/Conductor/Api/AuthorizationResourceApi.cs b/Conductor/Api/AuthorizationResourceApi.cs index 6ac7e8ab..0dd28d4b 100644 --- a/Conductor/Api/AuthorizationResourceApi.cs +++ b/Conductor/Api/AuthorizationResourceApi.cs @@ -5,82 +5,12 @@ using RestSharp; using Conductor.Client; using Conductor.Client.Models; +using ThreadTask = System.Threading.Tasks; +using conductor_csharp.Api; namespace Conductor.Api { - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IAuthorizationResourceApi : IApiAccessor - { - #region Synchronous Operations - /// - /// Get the access that have been granted over the given object - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// Object - Object GetPermissions(string type, string id); - - /// - /// Get the access that have been granted over the given object - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// ApiResponse of Object - ApiResponse GetPermissionsWithHttpInfo(string type, string id); - /// - /// Grant access to a user over the target - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// Response - Response GrantPermissions(AuthorizationRequest body); - /// - /// Grant access to a user over the target - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of Response - ApiResponse GrantPermissionsWithHttpInfo(AuthorizationRequest body); - /// - /// Remove user's access over the target - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// Response - Response RemovePermissions(AuthorizationRequest body); - - /// - /// Remove user's access over the target - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of Response - ApiResponse RemovePermissionsWithHttpInfo(AuthorizationRequest body); - #endregion Synchronous Operations - } /// /// Represents a collection of functions to interact with the API endpoints @@ -133,7 +63,7 @@ public AuthorizationResourceApi(Conductor.Client.Configuration configuration = n /// The base path public String GetBasePath() { - return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); + return this.Configuration.ApiClient.RestClient.Options.BaseUrl.ToString(); } /// @@ -167,7 +97,20 @@ public Conductor.Client.ExceptionFactory ExceptionFactory /// Object public Object GetPermissions(string type, string id) { - ApiResponse localVarResponse = GetPermissionsWithHttpInfo(type, id); + ApiResponse localVarResponse = GetPermissionsWithHttpInfo(type, id); + return localVarResponse.Data; + } + + /// + /// Asynchronous Get the access that have been granted over the given object + /// + /// Thrown when fails to make API call + /// + /// + /// Object + public async ThreadTask.Task GetPermissionsAsync(string type, string id) + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(GetPermissionsWithHttpInfo(type, id)); return localVarResponse.Data; } @@ -178,7 +121,7 @@ public Object GetPermissions(string type, string id) /// /// /// ApiResponse of Object - public ApiResponse GetPermissionsWithHttpInfo(string type, string id) + public ApiResponse GetPermissionsWithHttpInfo(string type, string id) { // verify the required parameter 'type' is set if (type == null) @@ -197,29 +140,29 @@ public ApiResponse GetPermissionsWithHttpInfo(string type, string id) // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); if (type != null) localVarPathParams.Add("type", this.Configuration.ApiClient.ParameterToString(type)); // path parameter if (id != null) localVarPathParams.Add("id", this.Configuration.ApiClient.ParameterToString(id)); // path parameter - // authentication (api_key) required + // authentication (api_key) required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken; } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -230,8 +173,8 @@ public ApiResponse GetPermissionsWithHttpInfo(string type, string id) } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); } /// @@ -246,6 +189,17 @@ public Response GrantPermissions(AuthorizationRequest body) return localVarResponse.Data; } + /// + /// Asynchronous Grant access to a user over the target + /// + /// Thrown when fails to make API call + /// + /// Response + public async ThreadTask.Task GrantPermissionsAsync(AuthorizationRequest body) + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(GrantPermissionsWithHttpInfo(body)); + return localVarResponse.Data; + } /// /// Grant access to a user over the target /// @@ -268,14 +222,14 @@ public ApiResponse GrantPermissionsWithHttpInfo(AuthorizationRequest b // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -295,9 +249,9 @@ public ApiResponse GrantPermissionsWithHttpInfo(AuthorizationRequest b } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -308,8 +262,8 @@ public ApiResponse GrantPermissionsWithHttpInfo(AuthorizationRequest b } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Response)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Response))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Response)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Response))); } /// @@ -324,6 +278,18 @@ public Response RemovePermissions(AuthorizationRequest body) return localVarResponse.Data; } + /// + /// Asynchronous Remove user's access over the target + /// + /// Thrown when fails to make API call + /// + /// Response + public async ThreadTask.Task RemovePermissionsAsync(AuthorizationRequest body) + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(RemovePermissionsWithHttpInfo(body)); + return localVarResponse.Data; + } + /// /// Remove user's access over the target /// @@ -346,14 +312,14 @@ public ApiResponse RemovePermissionsWithHttpInfo(AuthorizationRequest // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -373,9 +339,9 @@ public ApiResponse RemovePermissionsWithHttpInfo(AuthorizationRequest } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -386,8 +352,8 @@ public ApiResponse RemovePermissionsWithHttpInfo(AuthorizationRequest } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Response)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Response))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Response)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Response))); } } } diff --git a/Conductor/Api/EventResourceApi.cs b/Conductor/Api/EventResourceApi.cs index d4037457..4bf8f704 100644 --- a/Conductor/Api/EventResourceApi.cs +++ b/Conductor/Api/EventResourceApi.cs @@ -4,212 +4,12 @@ using RestSharp; using Conductor.Client; using EventHandler = Conductor.Client.Models.EventHandler; +using ThreadTask = System.Threading.Tasks; +using conductor_csharp.Api; + namespace Conductor.Api { - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IEventResourceApi : IApiAccessor - { - #region Synchronous Operations - /// - /// Add a new event handler. - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - void AddEventHandler(EventHandler body); - - /// - /// Add a new event handler. - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of Object(void) - ApiResponse AddEventHandlerWithHttpInfo(EventHandler body); - /// - /// Delete queue config by name - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// - void DeleteQueueConfig(string queueType, string queueName); - - /// - /// Delete queue config by name - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// ApiResponse of Object(void) - ApiResponse DeleteQueueConfigWithHttpInfo(string queueType, string queueName); - /// - /// Get all the event handlers - /// - /// - /// - /// - /// Thrown when fails to make API call - /// List<EventHandler> - List GetEventHandlers(); - - /// - /// Get all the event handlers - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ApiResponse of List<EventHandler> - ApiResponse> GetEventHandlersWithHttpInfo(); - /// - /// Get event handlers for a given event - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// (optional, default to true) - /// List<EventHandler> - List GetEventHandlersForEvent(string _event, bool? activeOnly = null); - - /// - /// Get event handlers for a given event - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// (optional, default to true) - /// ApiResponse of List<EventHandler> - ApiResponse> GetEventHandlersForEventWithHttpInfo(string _event, bool? activeOnly = null); - /// - /// Get queue config by name - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// Dictionary<string, Object> - Dictionary GetQueueConfig(string queueType, string queueName); - - /// - /// Get queue config by name - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// ApiResponse of Dictionary<string, Object> - ApiResponse> GetQueueConfigWithHttpInfo(string queueType, string queueName); - /// - /// Get all queue configs - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Dictionary<string, string> - Dictionary GetQueueNames(); - - /// - /// Get all queue configs - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ApiResponse of Dictionary<string, string> - ApiResponse> GetQueueNamesWithHttpInfo(); - /// - /// Create or update queue config by name - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - void PutQueueConfig(string body, string queueType, string queueName); - - /// - /// Create or update queue config by name - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// - /// ApiResponse of Object(void) - ApiResponse PutQueueConfigWithHttpInfo(string body, string queueType, string queueName); - /// - /// Remove an event handler - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - void RemoveEventHandlerStatus(string name); - - /// - /// Remove an event handler - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of Object(void) - ApiResponse RemoveEventHandlerStatusWithHttpInfo(string name); - /// - /// Update an existing event handler. - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - void UpdateEventHandler(EventHandler body); - - /// - /// Update an existing event handler. - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of Object(void) - ApiResponse UpdateEventHandlerWithHttpInfo(EventHandler body); - #endregion Synchronous Operations - } /// /// Represents a collection of functions to interact with the API endpoints @@ -262,7 +62,7 @@ public EventResourceApi(Conductor.Client.Configuration configuration = null) /// The base path public String GetBasePath() { - return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); + return this.Configuration.ApiClient.RestClient.Options.BaseUrl.ToString(); } /// @@ -298,6 +98,17 @@ public void AddEventHandler(EventHandler body) AddEventHandlerWithHttpInfo(body); } + /// + /// Asynchronous Add a new event handler. + /// + /// Thrown when fails to make API call + /// + /// + public async void AddEventHandlerAsync(EventHandler body) + { + await ThreadTask.Task.FromResult(AddEventHandlerWithHttpInfo(body)); + } + /// /// Add a new event handler. /// @@ -320,13 +131,13 @@ public ApiResponse AddEventHandlerWithHttpInfo(EventHandler body) // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - }; + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -346,9 +157,9 @@ public ApiResponse AddEventHandlerWithHttpInfo(EventHandler body) } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -359,8 +170,8 @@ public ApiResponse AddEventHandlerWithHttpInfo(EventHandler body) } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); } /// @@ -375,6 +186,18 @@ public void DeleteQueueConfig(string queueType, string queueName) DeleteQueueConfigWithHttpInfo(queueType, queueName); } + /// + /// Asynchronous Delete queue config by name + /// + /// Thrown when fails to make API call + /// + /// + /// + public async void DeleteQueueConfigAsync(string queueType, string queueName) + { + await ThreadTask.Task.FromResult(DeleteQueueConfigWithHttpInfo(queueType, queueName)); + } + /// /// Delete queue config by name /// @@ -401,12 +224,12 @@ public ApiResponse DeleteQueueConfigWithHttpInfo(string queueType, strin // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - }; + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -420,9 +243,9 @@ public ApiResponse DeleteQueueConfigWithHttpInfo(string queueType, strin } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -433,8 +256,8 @@ public ApiResponse DeleteQueueConfigWithHttpInfo(string queueType, strin } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); } /// @@ -448,6 +271,17 @@ public List GetEventHandlers() return localVarResponse.Data; } + /// + /// Asynchronous Get all the event handlers + /// + /// Thrown when fails to make API call + /// List<EventHandler> + public async ThreadTask.Task> GetEventHandlersAsync() + { + ApiResponse> localVarResponse = await ThreadTask.Task.FromResult(GetEventHandlersWithHttpInfo()); + return localVarResponse.Data; + } + /// /// Get all the event handlers /// @@ -466,13 +300,13 @@ public ApiResponse> GetEventHandlersWithHttpInfo() // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "*/*" - }; + "*/*" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -484,9 +318,9 @@ public ApiResponse> GetEventHandlersWithHttpInfo() } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -497,8 +331,8 @@ public ApiResponse> GetEventHandlersWithHttpInfo() } return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (List)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (List)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); } /// @@ -514,6 +348,19 @@ public List GetEventHandlersForEvent(string _event, bool? activeOn return localVarResponse.Data; } + /// + /// Asynchronous Get event handlers for a given event + /// + /// Thrown when fails to make API call + /// + /// (optional, default to true) + /// List<EventHandler> + public async ThreadTask.Task> GetEventHandlersForEventAsync(string _event, bool? activeOnly = null) + { + ApiResponse> localVarResponse = await ThreadTask.Task.FromResult(GetEventHandlersForEventWithHttpInfo(_event, activeOnly)); + return localVarResponse.Data; + } + /// /// Get event handlers for a given event /// @@ -537,13 +384,13 @@ public ApiResponse> GetEventHandlersForEventWithHttpInfo(stri // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "*/*" - }; + "*/*" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -557,9 +404,9 @@ public ApiResponse> GetEventHandlersForEventWithHttpInfo(stri } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -570,8 +417,8 @@ public ApiResponse> GetEventHandlersForEventWithHttpInfo(stri } return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (List)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (List)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); } /// @@ -587,6 +434,19 @@ public Dictionary GetQueueConfig(string queueType, string queueN return localVarResponse.Data; } + /// + /// Asynchronous Get queue config by name + /// + /// Thrown when fails to make API call + /// + /// + /// Dictionary<string, Object> + public async ThreadTask.Task> GetQueueConfigAsync(string queueType, string queueName) + { + ApiResponse> localVarResponse = await ThreadTask.Task.FromResult(GetQueueConfigWithHttpInfo(queueType, queueName)); + return localVarResponse.Data; + } + /// /// Get queue config by name /// @@ -613,13 +473,13 @@ public ApiResponse> GetQueueConfigWithHttpInfo(string // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "*/*" - }; + "*/*" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -633,9 +493,9 @@ public ApiResponse> GetQueueConfigWithHttpInfo(string } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -646,8 +506,8 @@ public ApiResponse> GetQueueConfigWithHttpInfo(string } return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Dictionary)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Dictionary))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Dictionary)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Dictionary))); } /// @@ -661,6 +521,17 @@ public Dictionary GetQueueNames() return localVarResponse.Data; } + /// + /// Asynchronous Get all queue configs + /// + /// Thrown when fails to make API call + /// Dictionary<string, string> + public async ThreadTask.Task> GetQueueNamesAsync() + { + ApiResponse> localVarResponse = await ThreadTask.Task.FromResult(GetQueueNamesWithHttpInfo()); + return localVarResponse.Data; + } + /// /// Get all queue configs /// @@ -679,13 +550,13 @@ public ApiResponse> GetQueueNamesWithHttpInfo() // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "*/*" - }; + "*/*" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -697,9 +568,9 @@ public ApiResponse> GetQueueNamesWithHttpInfo() } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -710,8 +581,8 @@ public ApiResponse> GetQueueNamesWithHttpInfo() } return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Dictionary)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Dictionary))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Dictionary)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Dictionary))); } /// @@ -727,6 +598,19 @@ public void PutQueueConfig(string body, string queueType, string queueName) PutQueueConfigWithHttpInfo(body, queueType, queueName); } + /// + /// Asynchronous Create or update queue config by name + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + public async void PutQueueConfigAsync(string body, string queueType, string queueName) + { + await ThreadTask.Task.FromResult(PutQueueConfigWithHttpInfo(body, queueType, queueName)); + } + /// /// Create or update queue config by name /// @@ -757,13 +641,13 @@ public ApiResponse PutQueueConfigWithHttpInfo(string body, string queueT // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - }; + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -785,9 +669,9 @@ public ApiResponse PutQueueConfigWithHttpInfo(string body, string queueT } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -798,8 +682,8 @@ public ApiResponse PutQueueConfigWithHttpInfo(string body, string queueT } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); } /// @@ -813,6 +697,17 @@ public void RemoveEventHandlerStatus(string name) RemoveEventHandlerStatusWithHttpInfo(name); } + /// + /// Asynchronous Remove an event handler + /// + /// Thrown when fails to make API call + /// + /// + public async void RemoveEventHandlerStatusAsync(string name) + { + await ThreadTask.Task.FromResult(RemoveEventHandlerStatusWithHttpInfo(name)); + } + /// /// Remove an event handler /// @@ -835,12 +730,12 @@ public ApiResponse RemoveEventHandlerStatusWithHttpInfo(string name) // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - }; + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -853,9 +748,9 @@ public ApiResponse RemoveEventHandlerStatusWithHttpInfo(string name) } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -866,8 +761,8 @@ public ApiResponse RemoveEventHandlerStatusWithHttpInfo(string name) } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); } /// @@ -881,6 +776,17 @@ public void UpdateEventHandler(EventHandler body) UpdateEventHandlerWithHttpInfo(body); } + /// + /// Asynchronous Update an existing event handler. + /// + /// Thrown when fails to make API call + /// + /// + public async void UpdateEventHandlerAsync(EventHandler body) + { + await ThreadTask.Task.FromResult(UpdateEventHandlerWithHttpInfo(body)); + } + /// /// Update an existing event handler. /// @@ -903,13 +809,13 @@ public ApiResponse UpdateEventHandlerWithHttpInfo(EventHandler body) // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - }; + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -929,9 +835,9 @@ public ApiResponse UpdateEventHandlerWithHttpInfo(EventHandler body) } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -942,8 +848,8 @@ public ApiResponse UpdateEventHandlerWithHttpInfo(EventHandler body) } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); } } } diff --git a/Conductor/Api/GroupResourceApi.cs b/Conductor/Api/GroupResourceApi.cs index 251b006e..9018a907 100644 --- a/Conductor/Api/GroupResourceApi.cs +++ b/Conductor/Api/GroupResourceApi.cs @@ -5,235 +5,12 @@ using RestSharp; using Conductor.Client; using Conductor.Client.Models; +using ThreadTask = System.Threading.Tasks; +using conductor_csharp.Api; namespace Conductor.Api { - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IGroupResourceApi : IApiAccessor - { - #region Synchronous Operations - /// - /// Add user to group - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// Object - Object AddUserToGroup(string groupId, string userId); - - /// - /// Add user to group - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// ApiResponse of Object - ApiResponse AddUserToGroupWithHttpInfo(string groupId, string userId); - /// - /// Add users to group - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// - void AddUsersToGroup(List body, string groupId); - - /// - /// Add users to group - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// ApiResponse of Object(void) - ApiResponse AddUsersToGroupWithHttpInfo(List body, string groupId); - /// - /// Delete a group - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// Response - Response DeleteGroup(string id); - - /// - /// Delete a group - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of Response - ApiResponse DeleteGroupWithHttpInfo(string id); - /// - /// Get the permissions this group has over workflows and tasks - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// Object - Object GetGrantedPermissions(string groupId); - - /// - /// Get the permissions this group has over workflows and tasks - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of Object - ApiResponse GetGrantedPermissionsWithHttpInfo(string groupId); - /// - /// Get a group by id - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// Object - Object GetGroup(string id); - - /// - /// Get a group by id - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of Object - ApiResponse GetGroupWithHttpInfo(string id); - /// - /// Get all users in group - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// Object - Object GetUsersInGroup(string id); - - /// - /// Get all users in group - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of Object - ApiResponse GetUsersInGroupWithHttpInfo(string id); - /// - /// Get all groups - /// - /// - /// - /// - /// Thrown when fails to make API call - /// List<Group> - List ListGroups(); - - /// - /// Get all groups - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ApiResponse of List<Group> - ApiResponse> ListGroupsWithHttpInfo(); - /// - /// Remove user from group - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// Object - Object RemoveUserFromGroup(string groupId, string userId); - - /// - /// Remove user from group - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// ApiResponse of Object - ApiResponse RemoveUserFromGroupWithHttpInfo(string groupId, string userId); - /// - /// Remove users from group - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// - void RemoveUsersFromGroup(List body, string groupId); - - /// - /// Remove users from group - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// ApiResponse of Object(void) - ApiResponse RemoveUsersFromGroupWithHttpInfo(List body, string groupId); - /// - /// Create or update a group - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// Object - Object UpsertGroup(UpsertGroupRequest body, string id); - /// - /// Create or update a group - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// ApiResponse of Object - ApiResponse UpsertGroupWithHttpInfo(UpsertGroupRequest body, string id); - #endregion Synchronous Operations - } /// /// Represents a collection of functions to interact with the API endpoints @@ -286,7 +63,7 @@ public GroupResourceApi(Conductor.Client.Configuration configuration = null) /// The base path public String GetBasePath() { - return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); + return this.Configuration.ApiClient.RestClient.Options.BaseUrl.ToString(); } /// @@ -324,6 +101,19 @@ public Object AddUserToGroup(string groupId, string userId) return localVarResponse.Data; } + /// + /// Asynchronous Add user to group + /// + /// Thrown when fails to make API call + /// + /// + /// Object + public async ThreadTask.Task AddUserToGroupAsync(string groupId, string userId) + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(AddUserToGroupWithHttpInfo(groupId, userId)); + return localVarResponse.Data; + } + /// /// Add user to group /// @@ -350,13 +140,13 @@ public ApiResponse AddUserToGroupWithHttpInfo(string groupId, string use // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -370,9 +160,9 @@ public ApiResponse AddUserToGroupWithHttpInfo(string groupId, string use } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -383,8 +173,8 @@ public ApiResponse AddUserToGroupWithHttpInfo(string groupId, string use } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); } /// @@ -399,6 +189,18 @@ public void AddUsersToGroup(List body, string groupId) AddUsersToGroupWithHttpInfo(body, groupId); } + /// + /// Asynchronous Add users to group + /// + /// Thrown when fails to make API call + /// + /// + /// + public async void AddUsersToGroupAsync(List body, string groupId) + { + await ThreadTask.Task.FromResult(AddUsersToGroupWithHttpInfo(body, groupId)); + } + /// /// Add users to group /// @@ -425,13 +227,13 @@ public ApiResponse AddUsersToGroupWithHttpInfo(List body, string // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - }; + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -452,9 +254,9 @@ public ApiResponse AddUsersToGroupWithHttpInfo(List body, string } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -465,8 +267,8 @@ public ApiResponse AddUsersToGroupWithHttpInfo(List body, string } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); } /// @@ -481,6 +283,18 @@ public Response DeleteGroup(string id) return localVarResponse.Data; } + /// + /// Asynchronous Delete a group + /// + /// Thrown when fails to make API call + /// + /// Response + public async ThreadTask.Task DeleteGroupAsync(string id) + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(DeleteGroupWithHttpInfo(id)); + return localVarResponse.Data; + } + /// /// Delete a group /// @@ -503,13 +317,13 @@ public ApiResponse DeleteGroupWithHttpInfo(string id) // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -522,9 +336,9 @@ public ApiResponse DeleteGroupWithHttpInfo(string id) } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -535,8 +349,8 @@ public ApiResponse DeleteGroupWithHttpInfo(string id) } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Response)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Response))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Response)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Response))); } /// @@ -551,6 +365,18 @@ public Object GetGrantedPermissions(string groupId) return localVarResponse.Data; } + /// + /// Asynchronous Get the permissions this group has over workflows and tasks + /// + /// Thrown when fails to make API call + /// + /// Object + public async ThreadTask.Task GetGrantedPermissionsAsync(string groupId) + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(GetGrantedPermissionsWithHttpInfo(groupId)); + return localVarResponse.Data; + } + /// /// Get the permissions this group has over workflows and tasks /// @@ -573,13 +399,13 @@ public ApiResponse GetGrantedPermissionsWithHttpInfo(string groupId) // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -592,9 +418,9 @@ public ApiResponse GetGrantedPermissionsWithHttpInfo(string groupId) } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -605,8 +431,8 @@ public ApiResponse GetGrantedPermissionsWithHttpInfo(string groupId) } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); } /// @@ -621,6 +447,18 @@ public Object GetGroup(string id) return localVarResponse.Data; } + /// + /// Asynchronous Get a group by id + /// + /// Thrown when fails to make API call + /// + /// Object + public async ThreadTask.Task GetGroupAsync(string id) + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(GetGroupWithHttpInfo(id)); + return localVarResponse.Data; + } + /// /// Get a group by id /// @@ -643,13 +481,13 @@ public ApiResponse GetGroupWithHttpInfo(string id) // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -662,9 +500,9 @@ public ApiResponse GetGroupWithHttpInfo(string id) } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -675,8 +513,8 @@ public ApiResponse GetGroupWithHttpInfo(string id) } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); } /// @@ -691,6 +529,18 @@ public Object GetUsersInGroup(string id) return localVarResponse.Data; } + /// + /// Asynchronous Get all users in group + /// + /// Thrown when fails to make API call + /// + /// Object + public async ThreadTask.Task GetUsersInGroupAsync(string id) + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(GetUsersInGroupWithHttpInfo(id)); + return localVarResponse.Data; + } + /// /// Get all users in group /// @@ -713,13 +563,13 @@ public ApiResponse GetUsersInGroupWithHttpInfo(string id) // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -732,9 +582,9 @@ public ApiResponse GetUsersInGroupWithHttpInfo(string id) } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -745,8 +595,8 @@ public ApiResponse GetUsersInGroupWithHttpInfo(string id) } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); } /// @@ -760,6 +610,17 @@ public List ListGroups() return localVarResponse.Data; } + /// + /// Asynchronous Get all groups + /// + /// Thrown when fails to make API call + /// List<Group> + public async ThreadTask.Task> ListGroupsAsync() + { + ApiResponse> localVarResponse = await ThreadTask.Task.FromResult(ListGroupsWithHttpInfo()); + return localVarResponse.Data; + } + /// /// Get all groups /// @@ -778,13 +639,13 @@ public ApiResponse> ListGroupsWithHttpInfo() // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -796,9 +657,9 @@ public ApiResponse> ListGroupsWithHttpInfo() } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -809,8 +670,8 @@ public ApiResponse> ListGroupsWithHttpInfo() } return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (List)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (List)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); } /// @@ -826,6 +687,19 @@ public Object RemoveUserFromGroup(string groupId, string userId) return localVarResponse.Data; } + /// + /// Asynchronous Remove user from group + /// + /// Thrown when fails to make API call + /// + /// + /// Object + public async ThreadTask.Task RemoveUserFromGroupAsync(string groupId, string userId) + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(RemoveUserFromGroupWithHttpInfo(groupId, userId)); + return localVarResponse.Data; + } + /// /// Remove user from group /// @@ -852,13 +726,13 @@ public ApiResponse RemoveUserFromGroupWithHttpInfo(string groupId, strin // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -872,9 +746,9 @@ public ApiResponse RemoveUserFromGroupWithHttpInfo(string groupId, strin } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -885,8 +759,8 @@ public ApiResponse RemoveUserFromGroupWithHttpInfo(string groupId, strin } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); } /// @@ -901,6 +775,18 @@ public void RemoveUsersFromGroup(List body, string groupId) RemoveUsersFromGroupWithHttpInfo(body, groupId); } + /// + /// Asynchronous Remove users from group + /// + /// Thrown when fails to make API call + /// + /// + /// + public async void RemoveUsersFromGroupAsync(List body, string groupId) + { + await ThreadTask.Task.FromResult(RemoveUsersFromGroupWithHttpInfo(body, groupId)); + } + /// /// Remove users from group /// @@ -927,13 +813,13 @@ public ApiResponse RemoveUsersFromGroupWithHttpInfo(List body, s // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - }; + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -954,9 +840,9 @@ public ApiResponse RemoveUsersFromGroupWithHttpInfo(List body, s } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -967,8 +853,8 @@ public ApiResponse RemoveUsersFromGroupWithHttpInfo(List body, s } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); } /// @@ -984,6 +870,19 @@ public Object UpsertGroup(UpsertGroupRequest body, string id) return localVarResponse.Data; } + /// + /// Asynchronous Create or update a group + /// + /// Thrown when fails to make API call + /// + /// + /// Object + public async ThreadTask.Task UpsertGroupAsync(UpsertGroupRequest body, string id) + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(UpsertGroupWithHttpInfo(body, id)); + return localVarResponse.Data; + } + /// /// Create or update a group /// @@ -1010,14 +909,14 @@ public ApiResponse UpsertGroupWithHttpInfo(UpsertGroupRequest body, stri // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -1038,9 +937,9 @@ public ApiResponse UpsertGroupWithHttpInfo(UpsertGroupRequest body, stri } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1051,8 +950,8 @@ public ApiResponse UpsertGroupWithHttpInfo(UpsertGroupRequest body, stri } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); } } } diff --git a/Conductor/Api/IApplicationResourceApi.cs b/Conductor/Api/IApplicationResourceApi.cs new file mode 100644 index 00000000..483d5cf1 --- /dev/null +++ b/Conductor/Api/IApplicationResourceApi.cs @@ -0,0 +1,362 @@ +using Conductor.Client.Models; +using Conductor.Client; +using System; +using System.Collections.Generic; +using ThreadTask = System.Threading.Tasks; +using System.Text; + +namespace conductor_csharp.Api +{ + public interface IApplicationResourceApi + { + #region Synchronous Operations + /// + /// Add Role to Application + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Object + Object AddRoleToApplicationUser(string applicationId, string role); + + + /// + /// Create an access key for an application + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Object + Object CreateAccessKey(string id); + + /// + /// Create an application + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Object + Object CreateApplication(CreateOrUpdateApplicationRequest body); + + /// + /// Delete an access key + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Object + Object DeleteAccessKey(string applicationId, string keyId); + + /// + /// Delete an application + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Object + Object DeleteApplication(string id); + + /// + /// Delete a tag for application + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + void DeleteTagForApplication(List body, string id); + + /// + /// Get application's access keys + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Object + Object GetAccessKeys(string id); + + /// + /// Get application id by access key id + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Object + Object GetAppByAccessKeyId(string accessKeyId); + + /// + /// Get an application by id + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Object + Object GetApplication(string id); + + /// + /// Get tags by application + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// List<TagObject> + List GetTagsForApplication(string id); + + /// + /// Get all applications + /// + /// + /// + /// + /// Thrown when fails to make API call + /// List<ExtendedConductorApplication> + List ListApplications(); + + /// + /// Put a tag to application + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + void PutTagForApplication(List body, string id); + + /// + /// + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Object + Object RemoveRoleFromApplicationUser(string applicationId, string role); + + /// + /// Toggle the status of an access key + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Object + Object ToggleAccessKeyStatus(string applicationId, string keyId); + + /// + /// Update an application + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Object + Object UpdateApplication(CreateOrUpdateApplicationRequest body, string id); + + #endregion Synchronous Operations + + #region Asynchronous Operations + /// + /// Asynchronous Add Role to Application + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Object + ThreadTask.Task AddRoleToApplicationUserAsync(string applicationId, string role); + + + /// + /// Asynchronous Create an access key for an application + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Object + ThreadTask.Task CreateAccessKeyAsync(string id); + + /// + /// Asynchronous Create an application + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Object + ThreadTask.Task CreateApplicationAsync(CreateOrUpdateApplicationRequest body); + + /// + /// Asynchronous Delete an access key + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Object + ThreadTask.Task DeleteAccessKeyAsync(string applicationId, string keyId); + + /// + /// Asynchronous Delete an application + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Object + ThreadTask.Task DeleteApplicationAsync(string id); + + /// + /// Asynchronous Delete a tag for application + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + void DeleteTagForApplicationAsync(List body, string id); + + /// + /// Asynchronous Get application's access keys + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Object + ThreadTask.Task GetAccessKeysAsync(string id); + + /// + /// Asynchronous Get application id by access key id + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Object + ThreadTask.Task GetAppByAccessKeyIdAsync(string accessKeyId); + + /// + /// Asynchronous Get an application by id + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Object + ThreadTask.Task GetApplicationAsync(string id); + + /// + /// Asynchronous Get tags by application + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// List<TagObject> + ThreadTask.Task> GetTagsForApplicationAsync(string id); + + /// + /// Asynchronous Get all applications + /// + /// + /// + /// + /// Thrown when fails to make API call + /// List<ExtendedConductorApplication> + ThreadTask.Task> ListApplicationsAsync(); + + /// + /// Asynchronous Put a tag to application + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + void PutTagForApplicationAsync(List body, string id); + + /// + /// + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Object + ThreadTask.Task RemoveRoleFromApplicationUserAsync(string applicationId, string role); + + /// + /// Asynchronous Toggle the status of an access key + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Object + ThreadTask.Task ToggleAccessKeyStatusAsync(string applicationId, string keyId); + + /// + /// Asynchronous Update an application + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Object + ThreadTask.Task UpdateApplicationAsync(CreateOrUpdateApplicationRequest body, string id); + #endregion Asynchronous Operations + } +} + diff --git a/Conductor/Api/IAuthorizationResourceApi.cs b/Conductor/Api/IAuthorizationResourceApi.cs new file mode 100644 index 00000000..fc578379 --- /dev/null +++ b/Conductor/Api/IAuthorizationResourceApi.cs @@ -0,0 +1,90 @@ +using Conductor.Client.Models; +using Conductor.Client; +using System; +using System.Collections.Generic; +using System.Text; +using ThreadTask = System.Threading.Tasks; + +namespace conductor_csharp.Api +{ + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IAuthorizationResourceApi : IApiAccessor + { + #region Synchronous Operations + /// + /// Get the access that have been granted over the given object + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Object + Object GetPermissions(string type, string id); + + /// + /// Grant access to a user over the target + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Response + Response GrantPermissions(AuthorizationRequest body); + + /// + /// Remove user's access over the target + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Response + Response RemovePermissions(AuthorizationRequest body); + + #endregion Synchronous Operations + + #region Asynchronous Operations + /// + /// Asynchronous Get the access that have been granted over the given object + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Object + ThreadTask.Task GetPermissionsAsync(string type, string id); + + /// + /// Asynchronous Grant access to a user over the target + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Response + ThreadTask.Task GrantPermissionsAsync(AuthorizationRequest body); + + /// + /// Asynchronous Remove user's access over the target + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Response + ThreadTask.Task RemovePermissionsAsync(AuthorizationRequest body); + + + #endregion Asynchronous Operations + } +} diff --git a/Conductor/Api/IEventResourceApi.cs b/Conductor/Api/IEventResourceApi.cs new file mode 100644 index 00000000..c1d3d2cf --- /dev/null +++ b/Conductor/Api/IEventResourceApi.cs @@ -0,0 +1,225 @@ +using Conductor.Client; +using System; +using System.Collections.Generic; +using System.Text; +using ThreadTask = System.Threading.Tasks; +using EventHandler = Conductor.Client.Models.EventHandler; + +namespace conductor_csharp.Api +{ + // + // Represents a collection of functions to interact with the API endpoints + // + public interface IEventResourceApi : IApiAccessor + { + #region Synchronous Operations + /// + /// Add a new event handler. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + void AddEventHandler(EventHandler body); + + /// + /// Delete queue config by name + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + void DeleteQueueConfig(string queueType, string queueName); + + /// + /// Get all the event handlers + /// + /// + /// + /// + /// Thrown when fails to make API call + /// List<EventHandler> + List GetEventHandlers(); + + /// + /// Get event handlers for a given event + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// (optional, default to true) + /// List<EventHandler> + List GetEventHandlersForEvent(string _event, bool? activeOnly = null); + + /// + /// Get queue config by name + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Dictionary<string, Object> + Dictionary GetQueueConfig(string queueType, string queueName); + + /// + /// Get all queue configs + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Dictionary<string, string> + Dictionary GetQueueNames(); + + /// + /// Create or update queue config by name + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + void PutQueueConfig(string body, string queueType, string queueName); + + /// + /// Remove an event handler + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + void RemoveEventHandlerStatus(string name); + + /// + /// Update an existing event handler. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + void UpdateEventHandler(EventHandler body); + + #endregion Synchronous Operations + + #region Asynchronous Operations + /// + /// Asynchronous Add a new event handler. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + void AddEventHandlerAsync(EventHandler body); + + /// + /// Asynchronous Delete queue config by name + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + void DeleteQueueConfigAsync(string queueType, string queueName); + + /// + /// Asynchronous Get all the event handlers + /// + /// + /// + /// + /// Thrown when fails to make API call + /// List<EventHandler> + ThreadTask.Task> GetEventHandlersAsync(); + + /// + /// Asynchronous Get event handlers for a given event + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// (optional, default to true) + /// List<EventHandler> + ThreadTask.Task> GetEventHandlersForEventAsync(string _event, bool? activeOnly = null); + + /// + /// Asynchronous Get queue config by name + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Dictionary<string, Object> + ThreadTask.Task> GetQueueConfigAsync(string queueType, string queueName); + + /// + /// Asynchronous Get all queue configs + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Dictionary<string, string> + ThreadTask.Task> GetQueueNamesAsync(); + + /// + /// Asynchronous Create or update queue config by name + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + void PutQueueConfigAsync(string body, string queueType, string queueName); + + /// + /// Asynchronous Remove an event handler + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + void RemoveEventHandlerStatusAsync(string name); + + /// + /// Asynchronous Update an existing event handler. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + void UpdateEventHandlerAsync(EventHandler body); + + #endregion Asynchronous Operations + } +} diff --git a/Conductor/Api/IGroupResourceApi.cs b/Conductor/Api/IGroupResourceApi.cs new file mode 100644 index 00000000..751bcfec --- /dev/null +++ b/Conductor/Api/IGroupResourceApi.cs @@ -0,0 +1,248 @@ +using Conductor.Client.Models; +using Conductor.Client; +using System; +using System.Collections.Generic; +using System.Text; +using ThreadTask = System.Threading.Tasks; + +namespace conductor_csharp.Api +{ + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IGroupResourceApi : IApiAccessor + { + #region Synchronous Operations + /// + /// Add user to group + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Object + Object AddUserToGroup(string groupId, string userId); + + /// + /// Add users to group + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + void AddUsersToGroup(List body, string groupId); + + /// + /// Delete a group + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Response + Response DeleteGroup(string id); + + /// + /// Get the permissions this group has over workflows and tasks + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Object + Object GetGrantedPermissions(string groupId); + + /// + /// Get a group by id + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Object + Object GetGroup(string id); + + /// + /// Get all users in group + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Object + Object GetUsersInGroup(string id); + + /// + /// Get all groups + /// + /// + /// + /// + /// Thrown when fails to make API call + /// List<Group> + List ListGroups(); + + /// + /// Remove user from group + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Object + Object RemoveUserFromGroup(string groupId, string userId); + + /// + /// Remove users from group + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + void RemoveUsersFromGroup(List body, string groupId); + + /// + /// Create or update a group + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Object + Object UpsertGroup(UpsertGroupRequest body, string id); + + #endregion Synchronous Operations + + #region Asynchronous Operations + /// + /// Asynchronous Add user to group + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Object + ThreadTask.Task AddUserToGroupAsync(string groupId, string userId); + + /// + /// Asynchronous Add users to group + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + void AddUsersToGroupAsync(List body, string groupId); + + /// + /// Asynchronous Delete a group + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Response + ThreadTask.Task DeleteGroupAsync(string id); + + /// + /// Asynchronous Get the permissions this group has over workflows and tasks + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Object + ThreadTask.Task GetGrantedPermissionsAsync(string groupId); + + /// + /// Asynchronous Get a group by id + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Object + ThreadTask.Task GetGroupAsync(string id); + + /// + /// Asynchronous Get all users in group + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Object + ThreadTask.Task GetUsersInGroupAsync(string id); + + /// + /// Asynchronous Get all groups + /// + /// + /// + /// + /// Thrown when fails to make API call + /// List<Group> + ThreadTask.Task> ListGroupsAsync(); + + /// + /// Asynchronous Remove user from group + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Object + ThreadTask.Task RemoveUserFromGroupAsync(string groupId, string userId); + + /// + /// Asynchronous Remove users from group + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + void RemoveUsersFromGroupAsync(List body, string groupId); + + /// + /// Asynchronous Create or update a group + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Object + ThreadTask.Task UpsertGroupAsync(UpsertGroupRequest body, string id); + #endregion Asynchronous Operations + } +} diff --git a/Conductor/Api/IMetaResourceApi.cs b/Conductor/Api/IMetaResourceApi.cs new file mode 100644 index 00000000..e6646698 --- /dev/null +++ b/Conductor/Api/IMetaResourceApi.cs @@ -0,0 +1,286 @@ +using Conductor.Client.Models; +using Conductor.Client; +using System; +using System.Collections.Generic; +using System.Text; +using ThreadTask = System.Threading.Tasks; + +namespace conductor_csharp.Api +{ + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IMetadataResourceApi : IApiAccessor + { + #region Synchronous Operations + /// + /// Create a new workflow definition + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// (optional, default to false) + /// Object + Object Create(WorkflowDef body, bool? overwrite = null); + + /// + /// Retrieves workflow definition along with blueprint + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// (optional) + /// (optional, default to false) + /// WorkflowDef + WorkflowDef Get(string name, int? version = null, bool? metadata = null); + + /// + /// Retrieves all workflow definition along with blueprint + /// + /// + /// + /// + /// Thrown when fails to make API call + /// (optional, default to READ) + /// (optional, default to false) + /// (optional) + /// (optional) + /// (optional, default to false) + /// List<WorkflowDef> + List GetAllWorkflows(string access = null, bool? metadata = null, string tagKey = null, string tagValue = null, bool? _short = null); + + /// + /// Gets the task definition + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// (optional, default to false) + /// Object + TaskDef GetTaskDef(string tasktype, bool? metadata = null); + + /// + /// Gets all task definition + /// + /// + /// + /// + /// Thrown when fails to make API call + /// (optional, default to READ) + /// (optional, default to false) + /// (optional) + /// (optional) + /// List<TaskDef> + List GetTaskDefs(string access = null, bool? metadata = null, string tagKey = null, string tagValue = null); + + /// + /// Create or update task definition(s) + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Object + Object RegisterTaskDef(List body); + + /// + /// Remove a task definition + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + void UnregisterTaskDef(string tasktype); + + /// + /// Removes workflow definition. It does not remove workflows associated with the definition. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + void UnregisterWorkflowDef(string name, int? version); + + /// + /// Create or update workflow definition(s) + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// (optional, default to true) + /// Object + Object UpdateWorkflowDefinitions(List body, bool? overwrite = null); + + /// + /// Update an existing task + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Object + Object UpdateTaskDef(TaskDef body); + + /// + /// Upload all workflows and tasks definitions to S3 + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Object + Object UploadWorkflowsAndTasksDefinitionsToS3(); + + #endregion Synchronous Operations + + #region Asynchronous Operations + /// + /// Asynchronous Create a new workflow definition + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// (optional, default to false) + /// Object + ThreadTask.Task CreateAsync(WorkflowDef body, bool? overwrite = null); + + /// + /// Asynchronous Retrieves workflow definition along with blueprint + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// (optional) + /// (optional, default to false) + /// WorkflowDef + ThreadTask.Task GetAsync(string name, int? version = null, bool? metadata = null); + + /// + /// Asynchronous Retrieves all workflow definition along with blueprint + /// + /// + /// + /// + /// Thrown when fails to make API call + /// (optional, default to READ) + /// (optional, default to false) + /// (optional) + /// (optional) + /// (optional, default to false) + /// List<WorkflowDef> + ThreadTask.Task> GetAllWorkflowsAsync(string access = null, bool? metadata = null, string tagKey = null, string tagValue = null, bool? _short = null); + + /// + /// Asynchronous Gets the task definition + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// (optional, default to false) + /// Object + ThreadTask.Task GetTaskDefAsync(string tasktype, bool? metadata = null); + + /// + /// Asynchronous Gets all task definition + /// + /// + /// + /// + /// Thrown when fails to make API call + /// (optional, default to READ) + /// (optional, default to false) + /// (optional) + /// (optional) + /// List<TaskDef> + ThreadTask.Task> GetTaskDefsAsync(string access = null, bool? metadata = null, string tagKey = null, string tagValue = null); + + /// + /// Asynchronous Create or update task definition(s) + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Object + ThreadTask.Task RegisterTaskDefAsync(List body); + + /// + /// Asynchronous Remove a task definition + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + void UnregisterTaskDefAsync(string tasktype); + + /// + /// Asynchronous Removes workflow definition. It does not remove workflows associated with the definition. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + void UnregisterWorkflowDefAsync(string name, int? version); + + /// + /// Asynchronous Create or update workflow definition(s) + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// (optional, default to true) + /// Object + ThreadTask.Task UpdateWorkflowDefinitionsAsync(List body, bool? overwrite = null); + + /// + /// Asynchronous Update an existing task + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Object + ThreadTask.Task UpdateTaskDefAsync(TaskDef body); + + /// + /// Asynchronous Upload all workflows and tasks definitions to S3 + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Object + ThreadTask.Task UploadWorkflowsAndTasksDefinitionsToS3Async(); + #endregion Asynchronous Operations + } +} diff --git a/Conductor/Api/ISchedulerResourceApi.cs b/Conductor/Api/ISchedulerResourceApi.cs new file mode 100644 index 00000000..f919a431 --- /dev/null +++ b/Conductor/Api/ISchedulerResourceApi.cs @@ -0,0 +1,360 @@ +using Conductor.Client.Models; +using Conductor.Client; +using System; +using System.Collections.Generic; +using System.Text; +using ThreadTask = System.Threading.Tasks; + +namespace conductor_csharp.Api +{ + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface ISchedulerResourceApi : IApiAccessor + { + #region Synchronous Operations + /// + /// Deletes an existing workflow schedule by name + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Object + Object DeleteSchedule(string name); + + /// + /// Delete a tag for schedule + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + void DeleteTagForSchedule(List body, string name); + + /// + /// Get all existing workflow schedules and optionally filter by workflow name + /// + /// + /// + /// + /// Thrown when fails to make API call + /// (optional) + /// List<WorkflowSchedule> + List GetAllSchedules(string workflowName = null); + + /// + /// Get list of the next x (default 3, max 5) execution times for a scheduler + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// (optional) + /// (optional) + /// (optional, default to 3) + /// List<long?> + List GetNextFewSchedules(string cronExpression, long? scheduleStartTime = null, long? scheduleEndTime = null, int? limit = null); + + /// + /// Get an existing workflow schedule by name + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// WorkflowSchedule + WorkflowSchedule GetSchedule(string name); + + /// + /// Get tags by schedule + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// List<TagObject> + List GetTagsForSchedule(string name); + + /// + /// Pause all scheduling in a single conductor server instance (for debugging only) + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Dictionary<string, Object> + Dictionary PauseAllSchedules(); + + /// + /// Pauses an existing schedule by name + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Object + Object PauseSchedule(string name); + + /// + /// Put a tag to schedule + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + void PutTagForSchedule(List body, string name); + + /// + /// Requeue all execution records + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Dictionary<string, Object> + Dictionary RequeueAllExecutionRecords(); + + /// + /// Resume all scheduling + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Dictionary<string, Object> + Dictionary ResumeAllSchedules(); + + /// + /// Resume a paused schedule by name + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Object + Object ResumeSchedule(string name); + + /// + /// Create or update a schedule for a specified workflow with a corresponding start workflow request + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Object + Object SaveSchedule(SaveScheduleRequest body); + + /// + /// Search for workflows based on payload and other parameters + /// + /// + /// use sort options as sort=<field>:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC. + /// + /// Thrown when fails to make API call + /// (optional, default to 0) + /// (optional, default to 100) + /// (optional) + /// (optional, default to *) + /// (optional) + /// SearchResultWorkflowScheduleExecutionModel + SearchResultWorkflowScheduleExecutionModel SearchV22(int? start = null, int? size = null, string sort = null, string freeText = null, string query = null); + + /// + /// Test timeout - do not use in production + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + void TestTimeout(); + + #endregion Synchronous Operations + + #region Asynchronous Operations + /// + /// Deletes an existing workflow schedule by name + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Object + ThreadTask.Task DeleteScheduleAsync(string name); + + /// + /// Asynchronous Delete a tag for schedule + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + void DeleteTagForScheduleAsync(List body, string name); + + /// + /// Asynchronous Get all existing workflow schedules and optionally filter by workflow name + /// + /// + /// + /// + /// Thrown when fails to make API call + /// (optional) + /// List<WorkflowSchedule> + ThreadTask.Task> GetAllSchedulesAsync(string workflowName = null); + + /// + /// Asynchronous Get list of the next x (default 3, max 5) execution times for a scheduler + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// (optional) + /// (optional) + /// (optional, default to 3) + /// List<long?> + ThreadTask.Task> GetNextFewSchedulesAsync(string cronExpression, long? scheduleStartTime = null, long? scheduleEndTime = null, int? limit = null); + + /// + /// Asynchronous Get an existing workflow schedule by name + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// WorkflowSchedule + ThreadTask.Task GetScheduleAsync(string name); + + /// + /// Asynchronous Get tags by schedule + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// List<TagObject> + ThreadTask.Task> GetTagsForScheduleAsync(string name); + + /// + /// Asynchronous Pause all scheduling in a single conductor server instance (for debugging only) + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Dictionary<string, Object> + ThreadTask.Task> PauseAllSchedulesAsync(); + + /// + /// Asynchronous Pauses an existing schedule by name + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Object + ThreadTask.Task PauseScheduleAsync(string name); + + /// + /// Asynchronous Put a tag to schedule + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + void PutTagForScheduleAsync(List body, string name); + + /// + /// Asynchronous Requeue all execution records + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Dictionary<string, Object> + ThreadTask.Task> RequeueAllExecutionRecordsAsync(); + + /// + /// Asynchronous Resume all scheduling + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Dictionary<string, Object> + ThreadTask.Task> ResumeAllSchedulesAsync(); + + /// + /// Asynchronous Resume a paused schedule by name + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Object + ThreadTask.Task ResumeScheduleAsync(string name); + + /// + /// Asynchronous Create or update a schedule for a specified workflow with a corresponding start workflow request + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Object + ThreadTask.Task SaveScheduleAsync(SaveScheduleRequest body); + + /// + /// Asynchronous Search for workflows based on payload and other parameters + /// + /// + /// use sort options as sort=<field>:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC. + /// + /// Thrown when fails to make API call + /// (optional, default to 0) + /// (optional, default to 100) + /// (optional) + /// (optional, default to *) + /// (optional) + /// SearchResultWorkflowScheduleExecutionModel + ThreadTask.Task SearchV22Async(int? start = null, int? size = null, string sort = null, string freeText = null, string query = null); + + /// + /// Asynchronous Test timeout - do not use in production + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + void TestTimeoutAsync(); + #endregion Asynchronous Operations + } +} diff --git a/Conductor/Api/ISecretResourceApi.cs b/Conductor/Api/ISecretResourceApi.cs new file mode 100644 index 00000000..ffba3ebb --- /dev/null +++ b/Conductor/Api/ISecretResourceApi.cs @@ -0,0 +1,240 @@ +using Conductor.Client.Models; +using Conductor.Client; +using System; +using System.Collections.Generic; +using System.Text; +using ThreadTask = System.Threading.Tasks; + +namespace conductor_csharp.Api +{ + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface ISecretResourceApi : IApiAccessor + { + #region Synchronous Operations + /// + /// Delete a secret value by key + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Object + Object DeleteSecret(string key); + + /// + /// Delete tags of the secret + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + void DeleteTagForSecret(List body, string key); + + /// + /// Get secret value by key + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Object + Object GetSecret(string key); + + /// + /// Get tags by secret + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// List<TagObject> + List GetTags(string key); + + /// + /// List all secret names + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Object + Object ListAllSecretNames(); + + /// + /// List all secret names user can grant access to + /// + /// + /// + /// + /// Thrown when fails to make API call + /// List<string> + List ListSecretsThatUserCanGrantAccessTo(); + + /// + /// List all secret names along with tags user can grant access to + /// + /// + /// + /// + /// Thrown when fails to make API call + /// List<ExtendedSecret> + List ListSecretsWithTagsThatUserCanGrantAccessTo(); + + /// + /// Put a secret value by key + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Object + Object PutSecret(string body, string key); + + /// + /// Tag a secret + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + void PutTagForSecret(List body, string key); + + /// + /// Check if secret exists + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Object + Object SecretExists(string key); + + #endregion Synchronous Operations + + #region Asynchronous Operations + /// + /// Asynchronous Delete a secret value by key + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Object + ThreadTask.Task DeleteSecretAsync(string key); + + /// + /// Asynchronous Delete tags of the secret + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + void DeleteTagForSecretAsync(List body, string key); + + /// + /// Asynchronous Get secret value by key + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Object + ThreadTask.Task GetSecretAsync(string key); + + /// + /// Asynchronous Get tags by secret + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// List<TagObject> + ThreadTask.Task> GetTagsAsync(string key); + + /// + /// Asynchronous List all secret names + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Object + ThreadTask.Task ListAllSecretNamesAsync(); + + /// + /// Asynchronous List all secret names user can grant access to + /// + /// + /// + /// + /// Thrown when fails to make API call + /// List<string> + ThreadTask.Task> ListSecretsThatUserCanGrantAccessToAsync(); + + /// + /// Asynchronous List all secret names along with tags user can grant access to + /// + /// + /// + /// + /// Thrown when fails to make API call + /// List<ExtendedSecret> + ThreadTask.Task> ListSecretsWithTagsThatUserCanGrantAccessToAsync(); + + /// + /// Asynchronous Put a secret value by key + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Object + ThreadTask.Task PutSecretAsync(string body, string key); + + /// + /// Asynchronous Tag a secret + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + void PutTagForSecretAsync(List body, string key); + + /// + /// Asynchronous Check if secret exists + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Object + ThreadTask.Task SecretExistsAsync(string key); + #endregion Asynchronous Operations + } +} diff --git a/Conductor/Api/ITagsApi.cs b/Conductor/Api/ITagsApi.cs new file mode 100644 index 00000000..38de4b0c --- /dev/null +++ b/Conductor/Api/ITagsApi.cs @@ -0,0 +1,228 @@ +using Conductor.Client.Models; +using Conductor.Client; +using System; +using System.Collections.Generic; +using System.Text; +using ThreadTask = System.Threading.Tasks; + +namespace conductor_csharp.Api +{ + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface ITagsApi : IApiAccessor + { + #region Synchronous Operations + /// + /// Adds the tag to the task + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Object + Object AddTaskTag(TagObject body, string taskName); + + /// + /// Adds the tag to the workflow + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Object + Object AddWorkflowTag(TagObject body, string name); + + /// + /// Removes the tag of the task + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Object + Object DeleteTaskTag(TagString body, string taskName); + + /// + /// Removes the tag of the workflow + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Object + Object DeleteWorkflowTag(TagObject body, string name); + + /// + /// List all tags + /// + /// + /// + /// + /// Thrown when fails to make API call + /// List<TagObject> + List GetTags(); + + /// + /// Returns all the tags of the task + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// List<TagObject> + List GetTaskTags(string taskName); + + /// + /// Returns all the tags of the workflow + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// List<TagObject> + List GetWorkflowTags(string name); + + /// + /// Adds the tag to the task + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Object + Object SetTaskTags(List body, string taskName); + + /// + /// Set the tags of the workflow + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Object + Object SetWorkflowTags(List body, string name); + + #endregion Synchronous Operations + + #region Asynchronous Operations + /// + /// Asynchronous Adds the tag to the task + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Object + ThreadTask.Task AddTaskTagAsync(TagObject body, string taskName); + + /// + /// Asynchronous Adds the tag to the workflow + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Object + ThreadTask.Task AddWorkflowTagAsync(TagObject body, string name); + + /// + /// Asynchronous Removes the tag of the task + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Object + ThreadTask.Task DeleteTaskTagAsync(TagString body, string taskName); + + /// + /// Asynchronous Removes the tag of the workflow + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Object + ThreadTask.Task DeleteWorkflowTagAsync(TagObject body, string name); + + /// + /// Asynchronous List all tags + /// + /// + /// + /// + /// Thrown when fails to make API call + /// List<TagObject> + ThreadTask.Task> GetTagsAsync(); + + /// + /// Asynchronous Returns all the tags of the task + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// List<TagObject> + ThreadTask.Task> GetTaskTagsAsync(string taskName); + + /// + /// Asynchronous Returns all the tags of the workflow + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// List<TagObject> + ThreadTask.Task> GetWorkflowTagsAsync(string name); + + /// + /// Asynchronous Adds the tag to the task + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Object + ThreadTask.Task SetTaskTagsAsync(List body, string taskName); + + /// + /// Asynchronous Set the tags of the workflow + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Object + ThreadTask.Task SetWorkflowTagsAsync(List body, string name); + #endregion Asynchronous Operations + } +} diff --git a/Conductor/Api/ITaskResourceApi.cs b/Conductor/Api/ITaskResourceApi.cs new file mode 100644 index 00000000..d0e59d56 --- /dev/null +++ b/Conductor/Api/ITaskResourceApi.cs @@ -0,0 +1,420 @@ +using Conductor.Client.Models; +using Conductor.Client; +using System; +using System.Collections.Generic; +using System.Text; +using ThreadTask = System.Threading.Tasks; + +namespace conductor_csharp.Api +{ + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface ITaskResourceApi : IApiAccessor + { + #region Synchronous Operations + /// + /// Get the details about each queue + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Dictionary<string, long?> + Dictionary All(); + + /// + /// Get the details about each queue + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Dictionary<string, Dictionary<string, Dictionary<string, long?>>> + Dictionary>> AllVerbose(); + + /// + /// Batch poll for a task of a certain type + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// (optional) + /// (optional) + /// (optional, default to 1) + /// (optional, default to 100) + /// List<Task> + List BatchPoll(string tasktype, string workerid = null, string domain = null, int? count = null, int? timeout = null); + + /// + /// Get the last poll data for all task types + /// + /// + /// + /// + /// Thrown when fails to make API call + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// Dictionary<string, Object> + Dictionary GetAllPollData(long? workerSize = null, string workerOpt = null, long? queueSize = null, string queueOpt = null, long? lastPollTimeSize = null, string lastPollTimeOpt = null); + + /// + /// Get the external uri where the task payload is to be stored + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + /// ExternalStorageLocation + ExternalStorageLocation GetExternalStorageLocation(string path, string operation, string payloadType); + + /// + /// Get the last poll data for a given task type + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// List<PollData> + List GetPollData(string taskType); + + /// + /// Get task by Id + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Task + Task GetTask(string taskId); + + /// + /// Get Task Execution Logs + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// List<TaskExecLog> + List GetTaskLogs(string taskId); + + /// + /// Log Task Execution Details + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + void Log(string body, string taskId); + + /// + /// Poll for a task of a certain type + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// (optional) + /// (optional) + /// Task + Task Poll(string tasktype, string workerid = null, string domain = null); + + /// + /// Requeue pending tasks + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// string + string RequeuePendingTask(string taskType); + + /// + /// Search for tasks based in payload and other parameters + /// + /// + /// use sort options as sort=<field>:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC + /// + /// Thrown when fails to make API call + /// (optional, default to 0) + /// (optional, default to 100) + /// (optional) + /// (optional, default to *) + /// (optional) + /// SearchResultTaskSummary + SearchResultTaskSummary Search(int? start = null, int? size = null, string sort = null, string freeText = null, string query = null); + + /// + /// Search for tasks based in payload and other parameters + /// + /// + /// use sort options as sort=<field>:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC + /// + /// Thrown when fails to make API call + /// (optional, default to 0) + /// (optional, default to 100) + /// (optional) + /// (optional, default to *) + /// (optional) + /// SearchResultTask + SearchResultTask SearchV2(int? start = null, int? size = null, string sort = null, string freeText = null, string query = null); + + /// + /// Get Task type queue sizes + /// + /// + /// + /// + /// Thrown when fails to make API call + /// (optional) + /// Dictionary<string, int?> + Dictionary Size(List taskType = null); + + /// + /// Update a task + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// string + string UpdateTask(TaskResult body); + + /// + /// Update a task By Ref Name + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// (optional) + /// string + string UpdateTask(Dictionary body, string workflowId, string taskRefName, string status, string workerid = null); + + #endregion Synchronous Operations + + #region Asynchronous Operations + /// + /// Asynchronous Get the details about each queue + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Dictionary<string, long?> + ThreadTask.Task> AllAsync(); + + /// + /// Asynchronous Get the details about each queue + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Dictionary<string, Dictionary<string, Dictionary<string, long?>>> + ThreadTask.Task>>> AllVerboseAsync(); + + /// + /// Asynchronous Batch poll for a task of a certain type + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// (optional) + /// (optional) + /// (optional, default to 1) + /// (optional, default to 100) + /// List<Task> + ThreadTask.Task> BatchPollAsync(string tasktype, string workerid = null, string domain = null, int? count = null, int? timeout = null); + + /// + /// Asynchronous Get the last poll data for all task types + /// + /// + /// + /// + /// Thrown when fails to make API call + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// Dictionary<string, Object> + ThreadTask.Task> GetAllPollDataAsync(long? workerSize = null, string workerOpt = null, long? queueSize = null, string queueOpt = null, long? lastPollTimeSize = null, string lastPollTimeOpt = null); + + /// + /// Asynchronous Get the external uri where the task payload is to be stored + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + /// ExternalStorageLocation + ThreadTask.Task GetExternalStorageLocationAsync(string path, string operation, string payloadType); + + /// + /// Asynchronous Get the last poll data for a given task type + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// List<PollData> + ThreadTask.Task> GetPollDataAsync(string taskType); + + /// + /// Asynchronous Get task by Id + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Task + ThreadTask.Task GetTaskAsync(string taskId); + + /// + /// Asynchronous Get Task Execution Logs + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// List<TaskExecLog> + ThreadTask.Task> GetTaskLogsAsync(string taskId); + + /// + /// Asynchronous Log Task Execution Details + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + void LogAsync(string body, string taskId); + + /// + /// Asynchronous Poll for a task of a certain type + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// (optional) + /// (optional) + /// Task + ThreadTask.Task PollAsync(string tasktype, string workerid = null, string domain = null); + + /// + /// Asynchronous Requeue pending tasks + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// string + ThreadTask.Task RequeuePendingTaskAsync(string taskType); + + /// + /// Asynchronous Search for tasks based in payload and other parameters + /// + /// + /// use sort options as sort=<field>:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC + /// + /// Thrown when fails to make API call + /// (optional, default to 0) + /// (optional, default to 100) + /// (optional) + /// (optional, default to *) + /// (optional) + /// SearchResultTaskSummary + ThreadTask.Task SearchAsync(int? start = null, int? size = null, string sort = null, string freeText = null, string query = null); + + /// + /// Asynchronous Search for tasks based in payload and other parameters + /// + /// + /// use sort options as sort=<field>:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC + /// + /// Thrown when fails to make API call + /// (optional, default to 0) + /// (optional, default to 100) + /// (optional) + /// (optional, default to *) + /// (optional) + /// SearchResultTask + ThreadTask.Task SearchV2Async(int? start = null, int? size = null, string sort = null, string freeText = null, string query = null); + + /// + /// Asynchronous Get Task type queue sizes + /// + /// + /// + /// + /// Thrown when fails to make API call + /// (optional) + /// Dictionary<string, int?> + ThreadTask.Task> SizeAsync(List taskType = null); + + /// + /// Asynchronous Update a task + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// string + ThreadTask.Task UpdateTaskAsync(TaskResult body); + + /// + /// Asynchronous Update a task By Ref Name + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// (optional) + /// string + ThreadTask.Task UpdateTaskAsync(Dictionary body, string workflowId, string taskRefName, string status, string workerid = null); + #endregion Asynchronous Operations + } +} diff --git a/Conductor/Api/ITokenResourceApi.cs b/Conductor/Api/ITokenResourceApi.cs new file mode 100644 index 00000000..e50199e4 --- /dev/null +++ b/Conductor/Api/ITokenResourceApi.cs @@ -0,0 +1,65 @@ +using Conductor.Client.Models; +using Conductor.Client; +using System; +using System.Collections.Generic; +using System.Text; +using ThreadTask = System.Threading.Tasks; + +namespace conductor_csharp.Api +{ + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface ITokenResourceApi : IApiAccessor + { + #region Synchronous Operations + /// + /// Generate JWT with the given access key + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Response + Token GenerateToken(GenerateTokenRequest body); + + /// + /// Get the user info from the token + /// + /// + /// + /// + /// Thrown when fails to make API call + /// (optional, default to false) + /// Object + Object GetUserInfo(bool? claims = null); + + #endregion Synchronous Operations + + #region Asynchronous Operations + /// + /// Asynchronous Generate JWT with the given access key + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Response + ThreadTask.Task GenerateTokenAsync(GenerateTokenRequest body); + + /// + /// Asynchronous Get the user info from the token + /// + /// + /// + /// + /// Thrown when fails to make API call + /// (optional, default to false) + /// Object + ThreadTask.Task GetUserInfoAsync(bool? claims = null); + + #endregion Asynchronous Operations + } +} diff --git a/Conductor/Api/IUserResourceApi.cs b/Conductor/Api/IUserResourceApi.cs new file mode 100644 index 00000000..9af199c8 --- /dev/null +++ b/Conductor/Api/IUserResourceApi.cs @@ -0,0 +1,156 @@ +using Conductor.Client.Models; +using Conductor.Client; +using System; +using System.Collections.Generic; +using System.Text; +using ThreadTask = System.Threading.Tasks; + +namespace conductor_csharp.Api +{ + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IUserResourceApi : IApiAccessor + { + #region Synchronous Operations + /// + /// Delete a user + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Response + Response DeleteUser(string id); + + /// + /// Get the permissions this user has over workflows and tasks + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Object + Object GetGrantedPermissions(string userId); + + /// + /// Get a user by id + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Object + Object GetUser(string id); + + /// + /// Get all users + /// + /// + /// + /// + /// Thrown when fails to make API call + /// (optional, default to false) + /// List<ConductorUser> + List ListUsers(bool? apps = null); + + /// + /// Send an email with a link to this cluster + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// (optional) + /// Object + Object SendInviteEmail(string id, ConductorUser body = null); + + /// + /// Create or update a user + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Object + Object UpsertUser(UpsertUserRequest body, string id); + + #endregion Synchronous Operations + + #region Asynchronous Operations + /// + /// Asynchronous Delete a user + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Response + ThreadTask.Task DeleteUserAsync(string id); + + /// + /// Asynchronous Get the permissions this user has over workflows and tasks + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Object + ThreadTask.Task GetGrantedPermissionsAsync(string userId); + + /// + /// Asynchronous Get a user by id + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Object + ThreadTask.Task GetUserAsync(string id); + + /// + /// Asynchronous Get all users + /// + /// + /// + /// + /// Thrown when fails to make API call + /// (optional, default to false) + /// List<ConductorUser> + ThreadTask.Task> ListUsersAsync(bool? apps = null); + + /// + /// Asynchronous Send an email with a link to this cluster + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// (optional) + /// Object + ThreadTask.Task SendInviteEmailAsync(string id, ConductorUser body = null); + + /// + /// Asynchronous Create or update a user + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Object + ThreadTask.Task UpsertUserAsync(UpsertUserRequest body, string id); + #endregion Asynchronous Operations + } +} diff --git a/Conductor/Api/IWorkflowBulkResourceApi.cs b/Conductor/Api/IWorkflowBulkResourceApi.cs new file mode 100644 index 00000000..5dd61661 --- /dev/null +++ b/Conductor/Api/IWorkflowBulkResourceApi.cs @@ -0,0 +1,137 @@ +using Conductor.Client.Models; +using Conductor.Client; +using System; +using System.Collections.Generic; +using System.Text; +using ThreadTask = System.Threading.Tasks; + + +namespace conductor_csharp.Api +{ + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IWorkflowBulkResourceApi : IApiAccessor + { + #region Synchronous Operations + /// + /// Pause the list of workflows + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// BulkResponse + BulkResponse PauseWorkflow(List body); + + /// + /// Restart the list of completed workflow + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// (optional, default to false) + /// BulkResponse + BulkResponse Restart(List body, bool? useLatestDefinitions = null); + + /// + /// Resume the list of workflows + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// BulkResponse + BulkResponse ResumeWorkflow(List body); + + /// + /// Retry the last failed task for each workflow from the list + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// BulkResponse + BulkResponse Retry(List body); + + /// + /// Terminate workflows execution + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// (optional) + /// (optional, default to false) + /// BulkResponse + BulkResponse Terminate(List body, string reason = null, bool? triggerFailureWorkflow = null); + + #endregion Synchronous Operations + + #region Asynchronous Operations + /// + /// Asynchronous Pause the list of workflows + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// BulkResponse + ThreadTask.Task PauseWorkflowAsync(List body); + + /// + /// Asynchronous Restart the list of completed workflow + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// (optional, default to false) + /// BulkResponse + ThreadTask.Task RestartAsync(List body, bool? useLatestDefinitions = null); + + /// + /// Asynchronous Resume the list of workflows + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// BulkResponse + ThreadTask.Task ResumeWorkflowAsync(List body); + + /// + /// Asynchronous Retry the last failed task for each workflow from the list + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// BulkResponse + ThreadTask.Task RetryAsync(List body); + + /// + /// Asynchronous Terminate workflows execution + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// (optional) + /// (optional, default to false) + /// BulkResponse + ThreadTask.Task TerminateAsync(List body, string reason = null, bool? triggerFailureWorkflow = null); + #endregion Asynchronous Operations + } +} diff --git a/Conductor/Api/IWorkflowResourceApi.cs b/Conductor/Api/IWorkflowResourceApi.cs new file mode 100644 index 00000000..3eb3770b --- /dev/null +++ b/Conductor/Api/IWorkflowResourceApi.cs @@ -0,0 +1,763 @@ +using Conductor.Client.Models; +using Conductor.Client; +using System; +using System.Collections.Generic; +using System.Text; +using ThreadTask = System.Threading.Tasks; + + +namespace conductor_csharp.Api +{ + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IWorkflowResourceApi : IApiAccessor + { + #region Synchronous Operations + /// + /// Starts the decision task for a workflow + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + void Decide(string workflowId); + + /// + /// Removes the workflow from the system + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// (optional, default to true) + /// + void Delete(string workflowId, bool? archiveWorkflow = null); + + /// + /// Execute a workflow synchronously + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// (optional) + /// WorkflowRun + WorkflowRun ExecuteWorkflow(StartWorkflowRequest body, string requestId, string name, int? version, string waitUntilTaskRef = null); + + /// + /// Update the value of the workflow variables for the given workflow id + /// + /// + /// ApiResponse of Object(void) + Object UpdateWorkflowVariables(Workflow workflow); + /// + /// Gets the workflow by workflow id + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// (optional, default to true) + /// (optional, default to false) + /// Workflow + Workflow GetExecutionStatus(string workflowId, bool? includeTasks = null, bool? summarize = null); + + /// + /// Gets the workflow tasks by workflow id + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// (optional, default to 0) + /// (optional, default to 15) + /// (optional) + /// TaskListSearchResultSummary + TaskListSearchResultSummary GetExecutionStatusTaskList(string workflowId, int? start = null, int? count = null, string status = null); + + /// + /// Get the uri and path of the external storage where the workflow payload is to be stored + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + /// ExternalStorageLocation + ExternalStorageLocation GetExternalStorageLocation(string path, string operation, string payloadType); + + /// + /// Retrieve all the running workflows + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// (optional, default to 1) + /// (optional) + /// (optional) + /// List<string> + List GetRunningWorkflow(string name, int? version = null, long? startTime = null, long? endTime = null); + + /// + /// Gets the workflow by workflow id + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// (optional, default to false) + /// (optional, default to false) + /// WorkflowStatus + WorkflowStatus GetWorkflowStatusSummary(string workflowId, bool? includeOutput = null, bool? includeVariables = null); + + /// + /// Lists workflows for the given correlation id list + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// (optional, default to false) + /// (optional, default to false) + /// Dictionary<string, List<Workflow>> + Dictionary> GetWorkflows(List body, string name, bool? includeClosed = null, bool? includeTasks = null); + + /// + /// Lists workflows for the given correlation id list and workflow name list + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// (optional, default to false) + /// (optional, default to false) + /// Dictionary<string, List<Workflow>> + Dictionary> GetWorkflows(CorrelationIdsSearchRequest body, bool? includeClosed = null, bool? includeTasks = null); + + /// + /// Lists workflows for the given correlation id + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// (optional, default to false) + /// (optional, default to false) + /// List<Workflow> + List GetWorkflows(string name, string correlationId, bool? includeClosed = null, bool? includeTasks = null); + + /// + /// Pauses the workflow + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + void PauseWorkflow(string workflowId); + + /// + /// Jump workflow execution to given task + /// + /// + /// Jump workflow execution to given task. + /// + /// Thrown when fails to make API call + /// + /// + /// (optional) + /// + void JumpToTask(string workflowId, Dictionary input, string taskReferenceName = null); + + + /// + /// Reruns the workflow from a specific task + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// string + string Rerun(RerunWorkflowRequest body, string workflowId); + + /// + /// Resets callback times of all non-terminal SIMPLE tasks to 0 + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + void ResetWorkflow(string workflowId); + + /// + /// Restarts a completed workflow + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// (optional, default to false) + /// + void Restart(string workflowId, bool? useLatestDefinitions = null); + + /// + /// Resumes the workflow + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + void ResumeWorkflow(string workflowId); + + /// + /// Retries the last failed task + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// (optional, default to false) + /// + void Retry(string workflowId, bool? resumeSubworkflowTasks = null); + + /// + /// Search for workflows based on payload and other parameters + /// + /// + /// use sort options as sort=<field>:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC. + /// + /// Thrown when fails to make API call + /// (optional) + /// (optional, default to 0) + /// (optional, default to 100) + /// (optional) + /// (optional, default to *) + /// (optional) + /// (optional, default to false) + /// ScrollableSearchResultWorkflowSummary + ScrollableSearchResultWorkflowSummary Search(string queryId = null, int? start = null, int? size = null, string sort = null, string freeText = null, string query = null, bool? skipCache = null); + + /// + /// Search for workflows based on payload and other parameters + /// + /// + /// use sort options as sort=<field>:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC. + /// + /// Thrown when fails to make API call + /// (optional, default to 0) + /// (optional, default to 100) + /// (optional) + /// (optional, default to *) + /// (optional) + /// SearchResultWorkflow + SearchResultWorkflow SearchV2(int? start = null, int? size = null, string sort = null, string freeText = null, string query = null); + + /// + /// Search for workflows based on task parameters + /// + /// + /// use sort options as sort=<field>:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC + /// + /// Thrown when fails to make API call + /// (optional, default to 0) + /// (optional, default to 100) + /// (optional) + /// (optional, default to *) + /// (optional) + /// SearchResultWorkflowSummary + SearchResultWorkflowSummary SearchWorkflowsByTasks(int? start = null, int? size = null, string sort = null, string freeText = null, string query = null); + + /// + /// Search for workflows based on task parameters + /// + /// + /// use sort options as sort=<field>:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC + /// + /// Thrown when fails to make API call + /// (optional, default to 0) + /// (optional, default to 100) + /// (optional) + /// (optional, default to *) + /// (optional) + /// SearchResultWorkflow + SearchResultWorkflow SearchWorkflowsByTasksV2(int? start = null, int? size = null, string sort = null, string freeText = null, string query = null); + + /// + /// Skips a given task from a current running workflow + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + void SkipTaskFromWorkflow(string workflowId, string taskReferenceName, SkipTaskRequest skipTaskRequest); + + /// + /// Start a new workflow with StartWorkflowRequest, which allows task to be executed in a domain + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// string + string StartWorkflow(StartWorkflowRequest body); + + /// + /// Start a new workflow. Returns the ID of the workflow instance that can be later used for tracking + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// (optional) + /// (optional) + /// (optional, default to 0) + /// string + string StartWorkflow(string name, Dictionary body, int? version = null, string correlationId = null, int? priority = null); + + /// + /// Terminate workflow execution + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// (optional) + /// (optional, default to false) + /// + void Terminate(string workflowId, string reason = null, bool? triggerFailureWorkflow = null); + + /// + /// Test workflow execution using mock data + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Workflow + Workflow TestWorkflow(WorkflowTestRequest body); + + /// + /// Force upload all completed workflows to document store + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Object + Object UploadCompletedWorkflows(); + + #endregion Synchronous Operations + + #region Asynchronous Operations + /// + /// Asynchronous Starts the decision task for a workflow + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + void DecideAsync(string workflowId); + + /// + /// Asynchronous Removes the workflow from the system + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// (optional, default to true) + /// + void DeleteAsync(string workflowId, bool? archiveWorkflow = null); + + /// + /// Asynchronous Execute a workflow + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// (optional) + /// WorkflowRun + ThreadTask.Task ExecuteWorkflowAsync(StartWorkflowRequest body, string requestId, string name, int? version, string waitUntilTaskRef = null); + + /// + /// Asynchronous Update the value of the workflow variables for the given workflow id + /// + /// + /// ApiResponse of Object(void) + ThreadTask.Task UpdateWorkflowVariablesAsync(Workflow workflow); + + /// + /// Asynchronous Gets the workflow by workflow id + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// (optional, default to true) + /// (optional, default to false) + /// Workflow + ThreadTask.Task GetExecutionStatusAsync(string workflowId, bool? includeTasks = null, bool? summarize = null); + + /// + /// Asynchronous Gets the workflow tasks by workflow id + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// (optional, default to 0) + /// (optional, default to 15) + /// (optional) + /// TaskListSearchResultSummary + ThreadTask.Task GetExecutionStatusTaskListAsync(string workflowId, int? start = null, int? count = null, string status = null); + + /// + /// Asynchronous Get the uri and path of the external storage where the workflow payload is to be stored + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + /// ExternalStorageLocation + ThreadTask.Task GetExternalStorageLocationAsync(string path, string operation, string payloadType); + + /// + /// Asynchronous Retrieve all the running workflows + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// (optional, default to 1) + /// (optional) + /// (optional) + /// List<string> + ThreadTask.Task> GetRunningWorkflowAsync(string name, int? version = null, long? startTime = null, long? endTime = null); + + /// + /// Asynchronous Gets the workflow by workflow id + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// (optional, default to false) + /// (optional, default to false) + /// WorkflowStatus + ThreadTask.Task GetWorkflowStatusSummaryAsync(string workflowId, bool? includeOutput = null, bool? includeVariables = null); + + /// + /// Asynchronous Lists workflows for the given correlation id list + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// (optional, default to false) + /// (optional, default to false) + /// Dictionary<string, List<Workflow>> + ThreadTask.Task>> GetWorkflowsAsync(List body, string name, bool? includeClosed = null, bool? includeTasks = null); + + /// + /// Asynchronous Lists workflows for the given correlation id list and workflow name list + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// (optional, default to false) + /// (optional, default to false) + /// Dictionary<string, List<Workflow>> + ThreadTask.Task>> GetWorkflowsAsync(CorrelationIdsSearchRequest body, bool? includeClosed = null, bool? includeTasks = null); + + /// + /// Asynchronous Lists workflows for the given correlation id + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// (optional, default to false) + /// (optional, default to false) + /// List<Workflow> + ThreadTask.Task> GetWorkflowsAsync(string name, string correlationId, bool? includeClosed = null, bool? includeTasks = null); + + /// + /// Asynchronous Pauses the workflow + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + void PauseWorkflowAsync(string workflowId); + + /// + /// Asynchronous Jump workflow execution to given task + /// + /// + /// Jump workflow execution to given task. + /// + /// Thrown when fails to make API call + /// + /// + /// (optional) + /// + void JumpToTaskAsync(string workflowId, Dictionary input, string taskReferenceName = null); + + + /// + /// Asynchronous Reruns the workflow from a specific task + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// string + ThreadTask.Task RerunAsync(RerunWorkflowRequest body, string workflowId); + + /// + /// Asynchronous Resets callback times of all non-terminal SIMPLE tasks to 0 + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + void ResetWorkflowAsync(string workflowId); + + /// + /// Asynchronous Restarts a completed workflow + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// (optional, default to false) + /// + void RestartAsync(string workflowId, bool? useLatestDefinitions = null); + + /// + /// Asynchronous Resumes the workflow + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + void ResumeWorkflowAsync(string workflowId); + + /// + /// Asynchronous Retries the last failed task + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// (optional, default to false) + /// + void RetryAsync(string workflowId, bool? resumeSubworkflowTasks = null); + + /// + /// Asynchronous Search for workflows based on payload and other parameters + /// + /// + /// use sort options as sort=<field>:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC. + /// + /// Thrown when fails to make API call + /// (optional) + /// (optional, default to 0) + /// (optional, default to 100) + /// (optional) + /// (optional, default to *) + /// (optional) + /// (optional, default to false) + /// ScrollableSearchResultWorkflowSummary + ThreadTask.Task SearchAsync(string queryId = null, int? start = null, int? size = null, string sort = null, string freeText = null, string query = null, bool? skipCache = null); + + /// + /// Asynchronous Search for workflows based on payload and other parameters + /// + /// + /// use sort options as sort=<field>:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC. + /// + /// Thrown when fails to make API call + /// (optional, default to 0) + /// (optional, default to 100) + /// (optional) + /// (optional, default to *) + /// (optional) + /// SearchResultWorkflow + ThreadTask.Task SearchV2Async(int? start = null, int? size = null, string sort = null, string freeText = null, string query = null); + + /// + /// Asynchronous Search for workflows based on task parameters + /// + /// + /// use sort options as sort=<field>:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC + /// + /// Thrown when fails to make API call + /// (optional, default to 0) + /// (optional, default to 100) + /// (optional) + /// (optional, default to *) + /// (optional) + /// SearchResultWorkflowSummary + ThreadTask.Task SearchWorkflowsByTasksAsync(int? start = null, int? size = null, string sort = null, string freeText = null, string query = null); + + /// + /// Asynchronous Search for workflows based on task parameters + /// + /// + /// use sort options as sort=<field>:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC + /// + /// Thrown when fails to make API call + /// (optional, default to 0) + /// (optional, default to 100) + /// (optional) + /// (optional, default to *) + /// (optional) + /// SearchResultWorkflow + ThreadTask.Task SearchWorkflowsByTasksV2Async(int? start = null, int? size = null, string sort = null, string freeText = null, string query = null); + + /// + /// Asynchronous Skips a given task from a current running workflow + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + void SkipTaskFromWorkflowAsync(string workflowId, string taskReferenceName, SkipTaskRequest skipTaskRequest); + + /// + /// Asynchronous Start a new workflow with StartWorkflowRequest, which allows task to be executed in a domain + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// string + ThreadTask.Task StartWorkflowAsync(StartWorkflowRequest body); + + /// + /// Asynchronous Start a new workflow. Returns the ID of the workflow instance that can be later used for tracking + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// (optional) + /// (optional) + /// (optional, default to 0) + /// string + ThreadTask.Task StartWorkflowAsync(string name, Dictionary body, int? version = null, string correlationId = null, int? priority = null); + + /// + /// Asynchronous Terminate workflow execution + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// (optional) + /// (optional, default to false) + /// + void TerminateAsync(string workflowId, string reason = null, bool? triggerFailureWorkflow = null); + + /// + /// Asynchronous Test workflow execution using mock data + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Workflow + ThreadTask.Task TestWorkflowAsync(WorkflowTestRequest body); + + /// + /// Asynchronous Force upload all completed workflows to document store + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Object + ThreadTask.Task UploadCompletedWorkflowsAsync(); + + #endregion Asynchronous Operations + } +} diff --git a/Conductor/Api/MetadataResourceApi.cs b/Conductor/Api/MetadataResourceApi.cs index 246a1ea5..b8589f0c 100644 --- a/Conductor/Api/MetadataResourceApi.cs +++ b/Conductor/Api/MetadataResourceApi.cs @@ -1,275 +1,15 @@ +using Conductor.Client; +using Conductor.Client.Models; +using conductor_csharp.Api; +using RestSharp; using System; using System.Collections.Generic; using System.Linq; -using RestSharp; -using Conductor.Client; -using Conductor.Client.Models; +using ThreadTask = System.Threading.Tasks; namespace Conductor.Api { - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IMetadataResourceApi : IApiAccessor - { - #region Synchronous Operations - /// - /// Create a new workflow definition - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// (optional, default to false) - /// Object - Object Create(WorkflowDef body, bool? overwrite = null); - - /// - /// Create a new workflow definition - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// (optional, default to false) - /// ApiResponse of Object - ApiResponse CreateWithHttpInfo(WorkflowDef body, bool? overwrite = null); - /// - /// Retrieves workflow definition along with blueprint - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// (optional, default to false) - /// WorkflowDef - WorkflowDef Get(string name, int? version = null, bool? metadata = null); - - /// - /// Retrieves workflow definition along with blueprint - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// (optional, default to false) - /// ApiResponse of WorkflowDef - ApiResponse GetWithHttpInfo(string name, int? version = null, bool? metadata = null); - /// - /// Retrieves all workflow definition along with blueprint - /// - /// - /// - /// - /// Thrown when fails to make API call - /// (optional, default to READ) - /// (optional, default to false) - /// (optional) - /// (optional) - /// (optional, default to false) - /// List<WorkflowDef> - List GetAllWorkflows(string access = null, bool? metadata = null, string tagKey = null, string tagValue = null, bool? _short = null); - - /// - /// Retrieves all workflow definition along with blueprint - /// - /// - /// - /// - /// Thrown when fails to make API call - /// (optional, default to READ) - /// (optional, default to false) - /// (optional) - /// (optional) - /// (optional, default to false) - /// ApiResponse of List<WorkflowDef> - ApiResponse> GetAllWorkflowsWithHttpInfo(string access = null, bool? metadata = null, string tagKey = null, string tagValue = null, bool? _short = null); - /// - /// Gets the task definition - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// (optional, default to false) - /// Object - TaskDef GetTaskDef(string tasktype, bool? metadata = null); - - /// - /// Gets the task definition - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// (optional, default to false) - /// ApiResponse of Object - ApiResponse GetTaskDefWithHttpInfo(string tasktype, bool? metadata = null); - /// - /// Gets all task definition - /// - /// - /// - /// - /// Thrown when fails to make API call - /// (optional, default to READ) - /// (optional, default to false) - /// (optional) - /// (optional) - /// List<TaskDef> - List GetTaskDefs(string access = null, bool? metadata = null, string tagKey = null, string tagValue = null); - - /// - /// Gets all task definition - /// - /// - /// - /// - /// Thrown when fails to make API call - /// (optional, default to READ) - /// (optional, default to false) - /// (optional) - /// (optional) - /// ApiResponse of List<TaskDef> - ApiResponse> GetTaskDefsWithHttpInfo(string access = null, bool? metadata = null, string tagKey = null, string tagValue = null); - /// - /// Create or update task definition(s) - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// Object - Object RegisterTaskDef(List body); - - /// - /// Create or update task definition(s) - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of Object - ApiResponse RegisterTaskDefWithHttpInfo(List body); - /// - /// Remove a task definition - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - void UnregisterTaskDef(string tasktype); - /// - /// Remove a task definition - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of Object(void) - ApiResponse UnregisterTaskDefWithHttpInfo(string tasktype); - /// - /// Removes workflow definition. It does not remove workflows associated with the definition. - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// - void UnregisterWorkflowDef(string name, int? version); - - /// - /// Removes workflow definition. It does not remove workflows associated with the definition. - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// ApiResponse of Object(void) - ApiResponse UnregisterWorkflowDefWithHttpInfo(string name, int? version); - /// - /// Create or update workflow definition(s) - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// (optional, default to true) - /// Object - Object UpdateWorkflowDefinitions(List body, bool? overwrite = null); - - /// - /// Create or update workflow definition(s) - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// (optional, default to true) - /// ApiResponse of Object - ApiResponse UpdateWithHttpInfo(List body, bool? overwrite = null); - /// - /// Update an existing task - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// Object - Object UpdateTaskDef(TaskDef body); - - /// - /// Update an existing task - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of Object - ApiResponse UpdateTaskDefWithHttpInfo(TaskDef body); - /// - /// Upload all workflows and tasks definitions to S3 - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Object - Object UploadWorkflowsAndTasksDefinitionsToS3(); - - /// - /// Upload all workflows and tasks definitions to S3 - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ApiResponse of Object - ApiResponse UploadWorkflowsAndTasksDefinitionsToS3WithHttpInfo(); - #endregion Synchronous Operations - } /// /// Represents a collection of functions to interact with the API endpoints @@ -322,7 +62,7 @@ public MetadataResourceApi(Conductor.Client.Configuration configuration = null) /// The base path public String GetBasePath() { - return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); + return this.Configuration.ApiClient.RestClient.Options.BaseUrl.ToString(); } /// @@ -360,6 +100,19 @@ public Object Create(WorkflowDef body, bool? overwrite = null) return localVarResponse.Data; } + /// + /// Asynchronous Create a new workflow definition + /// + /// Thrown when fails to make API call + /// + /// (optional, default to false) + /// Object + public async ThreadTask.Task CreateAsync(WorkflowDef body, bool? overwrite = null) + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(CreateWithHttpInfo(body, overwrite)); + return localVarResponse.Data; + } + /// /// Create a new workflow definition /// @@ -383,14 +136,14 @@ public ApiResponse CreateWithHttpInfo(WorkflowDef body, bool? overwrite // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "*/*" - }; + "*/*" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -411,9 +164,9 @@ public ApiResponse CreateWithHttpInfo(WorkflowDef body, bool? overwrite } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -424,8 +177,8 @@ public ApiResponse CreateWithHttpInfo(WorkflowDef body, bool? overwrite } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); } /// @@ -442,6 +195,20 @@ public WorkflowDef Get(string name, int? version = null, bool? metadata = null) return localVarResponse.Data; } + /// + /// Asynchronous Retrieves workflow definition along with blueprint + /// + /// Thrown when fails to make API call + /// + /// (optional) + /// (optional, default to false) + /// WorkflowDef + public async ThreadTask.Task GetAsync(string name, int? version = null, bool? metadata = null) + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(GetWithHttpInfo(name, version, metadata)); + return localVarResponse.Data; + } + /// /// Retrieves workflow definition along with blueprint /// @@ -466,13 +233,13 @@ public ApiResponse GetWithHttpInfo(string name, int? version = null // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "*/*" - }; + "*/*" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -487,9 +254,9 @@ public ApiResponse GetWithHttpInfo(string name, int? version = null } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -500,8 +267,8 @@ public ApiResponse GetWithHttpInfo(string name, int? version = null } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (WorkflowDef)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(WorkflowDef))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (WorkflowDef)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(WorkflowDef))); } /// @@ -520,6 +287,21 @@ public List GetAllWorkflows(string access = null, bool? metadata = return localVarResponse.Data; } + /// + /// Asynchronous Retrieves all workflow definition along with blueprint + /// + /// Thrown when fails to make API call + /// (optional, default to READ) + /// (optional, default to false) + /// (optional) + /// (optional) + /// (optional, default to false) + /// List<WorkflowDef> + public async ThreadTask.Task> GetAllWorkflowsAsync(string access = null, bool? metadata = null, string tagKey = null, string tagValue = null, bool? _short = null) + { + ApiResponse> localVarResponse = await ThreadTask.Task.FromResult(GetAllWorkflowsWithHttpInfo(access, metadata, tagKey, tagValue, _short)); + return localVarResponse.Data; + } /// /// Retrieves all workflow definition along with blueprint /// @@ -543,13 +325,13 @@ public ApiResponse> GetAllWorkflowsWithHttpInfo(string access // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "*/*" - }; + "*/*" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -566,9 +348,9 @@ public ApiResponse> GetAllWorkflowsWithHttpInfo(string access } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -579,8 +361,8 @@ public ApiResponse> GetAllWorkflowsWithHttpInfo(string access } return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (List)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (List)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); } /// @@ -596,6 +378,19 @@ public TaskDef GetTaskDef(string tasktype, bool? metadata = null) return localVarResponse.Data; } + /// + /// Asynchronous Gets the task definition + /// + /// Thrown when fails to make API call + /// + /// (optional, default to false) + /// Object + public async ThreadTask.Task GetTaskDefAsync(string tasktype, bool? metadata = null) + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(GetTaskDefWithHttpInfo(tasktype, metadata)); + return localVarResponse.Data; + } + /// /// Gets the task definition /// @@ -619,13 +414,13 @@ public ApiResponse GetTaskDefWithHttpInfo(string tasktype, bool? metada // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "*/*" - }; + "*/*" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -639,9 +434,9 @@ public ApiResponse GetTaskDefWithHttpInfo(string tasktype, bool? metada } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -652,8 +447,8 @@ public ApiResponse GetTaskDefWithHttpInfo(string tasktype, bool? metada } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (TaskDef)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(TaskDef))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (TaskDef)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(TaskDef))); } /// @@ -671,6 +466,21 @@ public List GetTaskDefs(string access = null, bool? metadata = null, st return localVarResponse.Data; } + /// + /// Asynchronous Gets all task definition + /// + /// Thrown when fails to make API call + /// (optional, default to READ) + /// (optional, default to false) + /// (optional) + /// (optional) + /// List<TaskDef> + public async ThreadTask.Task> GetTaskDefsAsync(string access = null, bool? metadata = null, string tagKey = null, string tagValue = null) + { + ApiResponse> localVarResponse = await ThreadTask.Task.FromResult(GetTaskDefsWithHttpInfo(access, metadata, tagKey, tagValue)); + return localVarResponse.Data; + } + /// /// Gets all task definition /// @@ -693,13 +503,13 @@ public ApiResponse> GetTaskDefsWithHttpInfo(string access = null, // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "*/*" - }; + "*/*" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -715,9 +525,9 @@ public ApiResponse> GetTaskDefsWithHttpInfo(string access = null, } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -728,8 +538,8 @@ public ApiResponse> GetTaskDefsWithHttpInfo(string access = null, } return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (List)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (List)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); } /// @@ -744,6 +554,18 @@ public Object RegisterTaskDef(List body) return localVarResponse.Data; } + /// + /// Asynchronous Create or update task definition(s) + /// + /// Thrown when fails to make API call + /// + /// Object + public async ThreadTask.Task RegisterTaskDefAsync(List body) + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(RegisterTaskDefWithHttpInfo(body)); + return localVarResponse.Data; + } + /// /// Create or update task definition(s) /// @@ -766,14 +588,14 @@ public ApiResponse RegisterTaskDefWithHttpInfo(List body) // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "*/*" - }; + "*/*" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -793,9 +615,9 @@ public ApiResponse RegisterTaskDefWithHttpInfo(List body) } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -806,8 +628,8 @@ public ApiResponse RegisterTaskDefWithHttpInfo(List body) } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); } /// @@ -821,6 +643,17 @@ public void UnregisterTaskDef(string tasktype) UnregisterTaskDefWithHttpInfo(tasktype); } + /// + /// Asynchronous Remove a task definition + /// + /// Thrown when fails to make API call + /// + /// + public async void UnregisterTaskDefAsync(string tasktype) + { + await ThreadTask.Task.FromResult(UnregisterTaskDefWithHttpInfo(tasktype)); + } + /// /// Remove a task definition /// @@ -843,12 +676,12 @@ public ApiResponse UnregisterTaskDefWithHttpInfo(string tasktype) // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - }; + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -861,9 +694,9 @@ public ApiResponse UnregisterTaskDefWithHttpInfo(string tasktype) } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -874,8 +707,8 @@ public ApiResponse UnregisterTaskDefWithHttpInfo(string tasktype) } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); } /// @@ -890,6 +723,18 @@ public void UnregisterWorkflowDef(string name, int? version) UnregisterWorkflowDefWithHttpInfo(name, version); } + /// + /// Asynchronous Removes workflow definition. It does not remove workflows associated with the definition. + /// + /// Thrown when fails to make API call + /// + /// + /// + public async void UnregisterWorkflowDefAsync(string name, int? version) + { + await ThreadTask.Task.FromResult(UnregisterWorkflowDefWithHttpInfo(name, version)); + } + /// /// Removes workflow definition. It does not remove workflows associated with the definition. /// @@ -916,12 +761,12 @@ public ApiResponse UnregisterWorkflowDefWithHttpInfo(string name, int? v // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - }; + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -935,9 +780,9 @@ public ApiResponse UnregisterWorkflowDefWithHttpInfo(string name, int? v } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -948,8 +793,8 @@ public ApiResponse UnregisterWorkflowDefWithHttpInfo(string name, int? v } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); } /// @@ -965,6 +810,19 @@ public Object UpdateWorkflowDefinitions(List body, bool? overwrite return localVarResponse.Data; } + /// + /// Asynchronous Create or update workflow definition(s) + /// + /// Thrown when fails to make API call + /// + /// (optional, default to true) + /// Object + public async ThreadTask.Task UpdateWorkflowDefinitionsAsync(List body, bool? overwrite = null) + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(UpdateWithHttpInfo(body, overwrite)); + return localVarResponse.Data; + } + /// /// Create or update workflow definition(s) /// @@ -988,14 +846,14 @@ public ApiResponse UpdateWithHttpInfo(List body, bool? over // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "*/*" - }; + "*/*" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -1016,9 +874,9 @@ public ApiResponse UpdateWithHttpInfo(List body, bool? over } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1029,8 +887,8 @@ public ApiResponse UpdateWithHttpInfo(List body, bool? over } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); } /// @@ -1045,6 +903,18 @@ public Object UpdateTaskDef(TaskDef body) return localVarResponse.Data; } + /// + /// Asynchronous Update an existing task + /// + /// Thrown when fails to make API call + /// + /// Object + public async ThreadTask.Task UpdateTaskDefAsync(TaskDef body) + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(UpdateTaskDefWithHttpInfo(body)); + return localVarResponse.Data; + } + /// /// Update an existing task /// @@ -1067,14 +937,14 @@ public ApiResponse UpdateTaskDefWithHttpInfo(TaskDef body) // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "*/*" - }; + "*/*" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -1094,9 +964,9 @@ public ApiResponse UpdateTaskDefWithHttpInfo(TaskDef body) } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1107,8 +977,8 @@ public ApiResponse UpdateTaskDefWithHttpInfo(TaskDef body) } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); } /// @@ -1122,6 +992,17 @@ public Object UploadWorkflowsAndTasksDefinitionsToS3() return localVarResponse.Data; } + /// + /// Asynchronous Upload all workflows and tasks definitions to S3 + /// + /// Thrown when fails to make API call + /// Object + public async ThreadTask.Task UploadWorkflowsAndTasksDefinitionsToS3Async() + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(UploadWorkflowsAndTasksDefinitionsToS3WithHttpInfo()); + return localVarResponse.Data; + } + /// /// Upload all workflows and tasks definitions to S3 /// @@ -1140,13 +1021,13 @@ public ApiResponse UploadWorkflowsAndTasksDefinitionsToS3WithHttpInfo() // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "*/*" - }; + "*/*" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -1158,9 +1039,9 @@ public ApiResponse UploadWorkflowsAndTasksDefinitionsToS3WithHttpInfo() } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1171,8 +1052,8 @@ public ApiResponse UploadWorkflowsAndTasksDefinitionsToS3WithHttpInfo() } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); } } diff --git a/Conductor/Api/SchedulerResourceApi.cs b/Conductor/Api/SchedulerResourceApi.cs index 2eab8034..0c71c030 100644 --- a/Conductor/Api/SchedulerResourceApi.cs +++ b/Conductor/Api/SchedulerResourceApi.cs @@ -4,342 +4,12 @@ using RestSharp; using Conductor.Client; using Conductor.Client.Models; +using ThreadTask = System.Threading.Tasks; +using conductor_csharp.Api; namespace Conductor.Api { - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface ISchedulerResourceApi : IApiAccessor - { - #region Synchronous Operations - /// - /// Deletes an existing workflow schedule by name - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// Object - Object DeleteSchedule(string name); - - /// - /// Deletes an existing workflow schedule by name - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of Object - ApiResponse DeleteScheduleWithHttpInfo(string name); - /// - /// Delete a tag for schedule - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// - void DeleteTagForSchedule(List body, string name); - - /// - /// Delete a tag for schedule - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// ApiResponse of Object(void) - ApiResponse DeleteTagForScheduleWithHttpInfo(List body, string name); - /// - /// Get all existing workflow schedules and optionally filter by workflow name - /// - /// - /// - /// - /// Thrown when fails to make API call - /// (optional) - /// List<WorkflowSchedule> - List GetAllSchedules(string workflowName = null); - - /// - /// Get all existing workflow schedules and optionally filter by workflow name - /// - /// - /// - /// - /// Thrown when fails to make API call - /// (optional) - /// ApiResponse of List<WorkflowSchedule> - ApiResponse> GetAllSchedulesWithHttpInfo(string workflowName = null); - /// - /// Get list of the next x (default 3, max 5) execution times for a scheduler - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// (optional) - /// (optional, default to 3) - /// List<long?> - List GetNextFewSchedules(string cronExpression, long? scheduleStartTime = null, long? scheduleEndTime = null, int? limit = null); - /// - /// Get list of the next x (default 3, max 5) execution times for a scheduler - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// (optional) - /// (optional, default to 3) - /// ApiResponse of List<long?> - ApiResponse> GetNextFewSchedulesWithHttpInfo(string cronExpression, long? scheduleStartTime = null, long? scheduleEndTime = null, int? limit = null); - /// - /// Get an existing workflow schedule by name - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// WorkflowSchedule - WorkflowSchedule GetSchedule(string name); - - /// - /// Get an existing workflow schedule by name - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of WorkflowSchedule - ApiResponse GetScheduleWithHttpInfo(string name); - /// - /// Get tags by schedule - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// List<TagObject> - List GetTagsForSchedule(string name); - - /// - /// Get tags by schedule - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of List<TagObject> - ApiResponse> GetTagsForScheduleWithHttpInfo(string name); - /// - /// Pause all scheduling in a single conductor server instance (for debugging only) - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Dictionary<string, Object> - Dictionary PauseAllSchedules(); - - /// - /// Pause all scheduling in a single conductor server instance (for debugging only) - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ApiResponse of Dictionary<string, Object> - ApiResponse> PauseAllSchedulesWithHttpInfo(); - /// - /// Pauses an existing schedule by name - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// Object - Object PauseSchedule(string name); - - /// - /// Pauses an existing schedule by name - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of Object - ApiResponse PauseScheduleWithHttpInfo(string name); - /// - /// Put a tag to schedule - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// - void PutTagForSchedule(List body, string name); - - /// - /// Put a tag to schedule - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// ApiResponse of Object(void) - ApiResponse PutTagForScheduleWithHttpInfo(List body, string name); - /// - /// Requeue all execution records - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Dictionary<string, Object> - Dictionary RequeueAllExecutionRecords(); - - /// - /// Requeue all execution records - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ApiResponse of Dictionary<string, Object> - ApiResponse> RequeueAllExecutionRecordsWithHttpInfo(); - /// - /// Resume all scheduling - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Dictionary<string, Object> - Dictionary ResumeAllSchedules(); - - /// - /// Resume all scheduling - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ApiResponse of Dictionary<string, Object> - ApiResponse> ResumeAllSchedulesWithHttpInfo(); - /// - /// Resume a paused schedule by name - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// Object - Object ResumeSchedule(string name); - - /// - /// Resume a paused schedule by name - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of Object - ApiResponse ResumeScheduleWithHttpInfo(string name); - /// - /// Create or update a schedule for a specified workflow with a corresponding start workflow request - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// Object - Object SaveSchedule(SaveScheduleRequest body); - - /// - /// Create or update a schedule for a specified workflow with a corresponding start workflow request - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of Object - ApiResponse SaveScheduleWithHttpInfo(SaveScheduleRequest body); - /// - /// Search for workflows based on payload and other parameters - /// - /// - /// use sort options as sort=<field>:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC. - /// - /// Thrown when fails to make API call - /// (optional, default to 0) - /// (optional, default to 100) - /// (optional) - /// (optional, default to *) - /// (optional) - /// SearchResultWorkflowScheduleExecutionModel - SearchResultWorkflowScheduleExecutionModel SearchV22(int? start = null, int? size = null, string sort = null, string freeText = null, string query = null); - - /// - /// Search for workflows based on payload and other parameters - /// - /// - /// use sort options as sort=<field>:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC. - /// - /// Thrown when fails to make API call - /// (optional, default to 0) - /// (optional, default to 100) - /// (optional) - /// (optional, default to *) - /// (optional) - /// ApiResponse of SearchResultWorkflowScheduleExecutionModel - ApiResponse SearchV22WithHttpInfo(int? start = null, int? size = null, string sort = null, string freeText = null, string query = null); - /// - /// Test timeout - do not use in production - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - void TestTimeout(); - - /// - /// Test timeout - do not use in production - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ApiResponse of Object(void) - ApiResponse TestTimeoutWithHttpInfo(); - #endregion Synchronous Operations - } /// /// Represents a collection of functions to interact with the API endpoints @@ -392,7 +62,7 @@ public SchedulerResourceApi(Conductor.Client.Configuration configuration = null) /// The base path public String GetBasePath() { - return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); + return this.Configuration.ApiClient.RestClient.Options.BaseUrl.ToString(); } /// @@ -429,6 +99,18 @@ public Object DeleteSchedule(string name) return localVarResponse.Data; } + /// + /// Asynchronous Deletes an existing workflow schedule by name + /// + /// Thrown when fails to make API call + /// + /// Object + public async ThreadTask.Task DeleteScheduleAsync(string name) + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(DeleteScheduleWithHttpInfo(name)); + return localVarResponse.Data; + } + /// /// Deletes an existing workflow schedule by name /// @@ -451,28 +133,28 @@ public ApiResponse DeleteScheduleWithHttpInfo(string name) // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); if (name != null) localVarPathParams.Add("name", this.Configuration.ApiClient.ParameterToString(name)); // path parameter - // authentication (api_key) required + // authentication (api_key) required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken; } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -483,8 +165,8 @@ public ApiResponse DeleteScheduleWithHttpInfo(string name) } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); } /// @@ -499,6 +181,18 @@ public void DeleteTagForSchedule(List body, string name) DeleteTagForScheduleWithHttpInfo(body, name); } + /// + /// Asynchronous Delete a tag for schedule + /// + /// Thrown when fails to make API call + /// + /// + /// + public async void DeleteTagForScheduleAsync(List body, string name) + { + await ThreadTask.Task.FromResult(DeleteTagForScheduleWithHttpInfo(body, name)); + } + /// /// Delete a tag for schedule /// @@ -525,13 +219,13 @@ public ApiResponse DeleteTagForScheduleWithHttpInfo(List body // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - }; + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -552,9 +246,9 @@ public ApiResponse DeleteTagForScheduleWithHttpInfo(List body } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -565,8 +259,8 @@ public ApiResponse DeleteTagForScheduleWithHttpInfo(List body } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); } /// @@ -581,6 +275,18 @@ public List GetAllSchedules(string workflowName = null) return localVarResponse.Data; } + /// + /// Asynchronous Get all existing workflow schedules and optionally filter by workflow name + /// + /// Thrown when fails to make API call + /// (optional) + /// List<WorkflowSchedule> + public async ThreadTask.Task> GetAllSchedulesAsync(string workflowName = null) + { + ApiResponse> localVarResponse = await ThreadTask.Task.FromResult(GetAllSchedulesWithHttpInfo(workflowName)); + return localVarResponse.Data; + } + /// /// Get all existing workflow schedules and optionally filter by workflow name /// @@ -600,28 +306,28 @@ public ApiResponse> GetAllSchedulesWithHttpInfo(string wo // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); if (workflowName != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "workflowName", workflowName)); // query parameter - // authentication (api_key) required + // authentication (api_key) required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken; } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -632,8 +338,8 @@ public ApiResponse> GetAllSchedulesWithHttpInfo(string wo } return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (List)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (List)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); } /// @@ -651,6 +357,21 @@ public ApiResponse> GetAllSchedulesWithHttpInfo(string wo return localVarResponse.Data; } + /// + /// Asynchronous Get list of the next x (default 3, max 5) execution times for a scheduler + /// + /// Thrown when fails to make API call + /// + /// (optional) + /// (optional) + /// (optional, default to 3) + /// List<long?> + public async ThreadTask.Task> GetNextFewSchedulesAsync(string cronExpression, long? scheduleStartTime = null, long? scheduleEndTime = null, int? limit = null) + { + ApiResponse> localVarResponse = await ThreadTask.Task.FromResult(GetNextFewSchedulesWithHttpInfo(cronExpression, scheduleStartTime, scheduleEndTime, limit)); + return localVarResponse.Data; + } + /// /// Get list of the next x (default 3, max 5) execution times for a scheduler /// @@ -676,13 +397,13 @@ public ApiResponse> GetAllSchedulesWithHttpInfo(string wo // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -691,16 +412,16 @@ public ApiResponse> GetAllSchedulesWithHttpInfo(string wo if (scheduleStartTime != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "scheduleStartTime", scheduleStartTime)); // query parameter if (scheduleEndTime != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "scheduleEndTime", scheduleEndTime)); // query parameter if (limit != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "limit", limit)); // query parameter - // authentication (api_key) required + // authentication (api_key) required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken; } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -711,8 +432,8 @@ public ApiResponse> GetAllSchedulesWithHttpInfo(string wo } return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (List)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (List)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); } /// @@ -727,6 +448,18 @@ public WorkflowSchedule GetSchedule(string name) return localVarResponse.Data; } + /// + /// Asynchronous Get an existing workflow schedule by name + /// + /// Thrown when fails to make API call + /// + /// WorkflowSchedule + public async ThreadTask.Task GetScheduleAsync(string name) + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(GetScheduleWithHttpInfo(name)); + return localVarResponse.Data; + } + /// /// Get an existing workflow schedule by name /// @@ -749,28 +482,28 @@ public ApiResponse GetScheduleWithHttpInfo(string name) // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); if (name != null) localVarPathParams.Add("name", this.Configuration.ApiClient.ParameterToString(name)); // path parameter - // authentication (api_key) required + // authentication (api_key) required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken; } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -781,8 +514,8 @@ public ApiResponse GetScheduleWithHttpInfo(string name) } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (WorkflowSchedule)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(WorkflowSchedule))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (WorkflowSchedule)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(WorkflowSchedule))); } /// @@ -797,6 +530,18 @@ public List GetTagsForSchedule(string name) return localVarResponse.Data; } + /// + /// Asynchronous Get tags by schedule + /// + /// Thrown when fails to make API call + /// + /// List<TagObject> + public async ThreadTask.Task> GetTagsForScheduleAsync(string name) + { + ApiResponse> localVarResponse = await ThreadTask.Task.FromResult(GetTagsForScheduleWithHttpInfo(name)); + return localVarResponse.Data; + } + /// /// Get tags by schedule /// @@ -819,28 +564,28 @@ public ApiResponse> GetTagsForScheduleWithHttpInfo(string name) // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); if (name != null) localVarPathParams.Add("name", this.Configuration.ApiClient.ParameterToString(name)); // path parameter - // authentication (api_key) required + // authentication (api_key) required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken; } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -851,8 +596,8 @@ public ApiResponse> GetTagsForScheduleWithHttpInfo(string name) } return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (List)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (List)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); } /// @@ -866,6 +611,17 @@ public Dictionary PauseAllSchedules() return localVarResponse.Data; } + /// + /// Asynchronous Pause all scheduling in a single conductor server instance (for debugging only) + /// + /// Thrown when fails to make API call + /// Dictionary<string, Object> + public async ThreadTask.Task> PauseAllSchedulesAsync() + { + ApiResponse> localVarResponse = await ThreadTask.Task.FromResult(PauseAllSchedulesWithHttpInfo()); + return localVarResponse.Data; + } + /// /// Pause all scheduling in a single conductor server instance (for debugging only) /// @@ -884,13 +640,13 @@ public ApiResponse> PauseAllSchedulesWithHttpInfo() // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -902,9 +658,9 @@ public ApiResponse> PauseAllSchedulesWithHttpInfo() } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -915,8 +671,8 @@ public ApiResponse> PauseAllSchedulesWithHttpInfo() } return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Dictionary)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Dictionary))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Dictionary)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Dictionary))); } /// @@ -931,6 +687,18 @@ public Object PauseSchedule(string name) return localVarResponse.Data; } + /// + /// Asynchronous Pauses an existing schedule by name + /// + /// Thrown when fails to make API call + /// + /// Object + public async ThreadTask.Task PauseScheduleAsync(string name) + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(PauseScheduleWithHttpInfo(name)); + return localVarResponse.Data; + } + /// /// Pauses an existing schedule by name /// @@ -953,28 +721,28 @@ public ApiResponse PauseScheduleWithHttpInfo(string name) // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); if (name != null) localVarPathParams.Add("name", this.Configuration.ApiClient.ParameterToString(name)); // path parameter - // authentication (api_key) required + // authentication (api_key) required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken; } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -985,8 +753,8 @@ public ApiResponse PauseScheduleWithHttpInfo(string name) } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); } /// @@ -1001,6 +769,18 @@ public void PutTagForSchedule(List body, string name) PutTagForScheduleWithHttpInfo(body, name); } + /// + /// Asynchronous Put a tag to schedule + /// + /// Thrown when fails to make API call + /// + /// + /// + public async void PutTagForScheduleAsync(List body, string name) + { + await ThreadTask.Task.FromResult(PutTagForScheduleWithHttpInfo(body, name)); + } + /// /// Put a tag to schedule /// @@ -1027,13 +807,13 @@ public ApiResponse PutTagForScheduleWithHttpInfo(List body, s // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - }; + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -1054,9 +834,9 @@ public ApiResponse PutTagForScheduleWithHttpInfo(List body, s } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1067,8 +847,8 @@ public ApiResponse PutTagForScheduleWithHttpInfo(List body, s } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); } /// @@ -1082,6 +862,17 @@ public Dictionary RequeueAllExecutionRecords() return localVarResponse.Data; } + /// + /// Asynchronous Requeue all execution records + /// + /// Thrown when fails to make API call + /// Dictionary<string, Object> + public async ThreadTask.Task> RequeueAllExecutionRecordsAsync() + { + ApiResponse> localVarResponse = await ThreadTask.Task.FromResult(RequeueAllExecutionRecordsWithHttpInfo()); + return localVarResponse.Data; + } + /// /// Requeue all execution records /// @@ -1100,13 +891,13 @@ public ApiResponse> RequeueAllExecutionRecordsWithHtt // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -1118,9 +909,9 @@ public ApiResponse> RequeueAllExecutionRecordsWithHtt } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1131,8 +922,8 @@ public ApiResponse> RequeueAllExecutionRecordsWithHtt } return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Dictionary)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Dictionary))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Dictionary)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Dictionary))); } /// @@ -1146,6 +937,17 @@ public Dictionary ResumeAllSchedules() return localVarResponse.Data; } + /// + /// Asynchronous Resume all scheduling + /// + /// Thrown when fails to make API call + /// Dictionary<string, Object> + public async ThreadTask.Task> ResumeAllSchedulesAsync() + { + ApiResponse> localVarResponse = await ThreadTask.Task.FromResult(ResumeAllSchedulesWithHttpInfo()); + return localVarResponse.Data; + } + /// /// Resume all scheduling /// @@ -1164,13 +966,13 @@ public ApiResponse> ResumeAllSchedulesWithHttpInfo() // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -1182,9 +984,9 @@ public ApiResponse> ResumeAllSchedulesWithHttpInfo() } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1195,8 +997,8 @@ public ApiResponse> ResumeAllSchedulesWithHttpInfo() } return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Dictionary)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Dictionary))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Dictionary)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Dictionary))); } /// @@ -1211,6 +1013,18 @@ public Object ResumeSchedule(string name) return localVarResponse.Data; } + /// + /// Asynchronous Resume a paused schedule by name + /// + /// Thrown when fails to make API call + /// + /// Object + public async ThreadTask.Task ResumeScheduleAsync(string name) + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(ResumeScheduleWithHttpInfo(name)); + return localVarResponse.Data; + } + /// /// Resume a paused schedule by name /// @@ -1233,28 +1047,28 @@ public ApiResponse ResumeScheduleWithHttpInfo(string name) // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); if (name != null) localVarPathParams.Add("name", this.Configuration.ApiClient.ParameterToString(name)); // path parameter - // authentication (api_key) required + // authentication (api_key) required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken; } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1265,8 +1079,8 @@ public ApiResponse ResumeScheduleWithHttpInfo(string name) } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); } /// @@ -1281,6 +1095,18 @@ public Object SaveSchedule(SaveScheduleRequest body) return localVarResponse.Data; } + /// + /// Asynchronous Create or update a schedule for a specified workflow with a corresponding start workflow request + /// + /// Thrown when fails to make API call + /// + /// Object + public async ThreadTask.Task SaveScheduleAsync(SaveScheduleRequest body) + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(SaveScheduleWithHttpInfo(body)); + return localVarResponse.Data; + } + /// /// Create or update a schedule for a specified workflow with a corresponding start workflow request /// @@ -1303,14 +1129,14 @@ public ApiResponse SaveScheduleWithHttpInfo(SaveScheduleRequest body) // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -1330,9 +1156,9 @@ public ApiResponse SaveScheduleWithHttpInfo(SaveScheduleRequest body) } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1343,8 +1169,8 @@ public ApiResponse SaveScheduleWithHttpInfo(SaveScheduleRequest body) } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); } /// @@ -1363,6 +1189,22 @@ public SearchResultWorkflowScheduleExecutionModel SearchV22(int? start = null, i return localVarResponse.Data; } + /// + /// Asynchronous Search for workflows based on payload and other parameters use sort options as sort=<field>:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC. + /// + /// Thrown when fails to make API call + /// (optional, default to 0) + /// (optional, default to 100) + /// (optional) + /// (optional, default to *) + /// (optional) + /// SearchResultWorkflowScheduleExecutionModel + public async ThreadTask.Task SearchV22Async(int? start = null, int? size = null, string sort = null, string freeText = null, string query = null) + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(SearchV22WithHttpInfo(start, size, sort, freeText, query)); + return localVarResponse.Data; + } + /// /// Search for workflows based on payload and other parameters use sort options as sort=<field>:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC. /// @@ -1386,13 +1228,13 @@ public ApiResponse SearchV22WithHttp // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -1402,16 +1244,16 @@ public ApiResponse SearchV22WithHttp if (sort != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "sort", sort)); // query parameter if (freeText != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "freeText", freeText)); // query parameter if (query != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "query", query)); // query parameter - // authentication (api_key) required + // authentication (api_key) required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken; } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1422,8 +1264,8 @@ public ApiResponse SearchV22WithHttp } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (SearchResultWorkflowScheduleExecutionModel)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(SearchResultWorkflowScheduleExecutionModel))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (SearchResultWorkflowScheduleExecutionModel)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(SearchResultWorkflowScheduleExecutionModel))); } /// @@ -1436,6 +1278,17 @@ public void TestTimeout() TestTimeoutWithHttpInfo(); } + /// + /// Asynchronous Test timeout - do not use in production + /// + /// Thrown when fails to make API call + /// + public async void TestTimeoutAsync() + { + await ThreadTask.Task.FromResult(TestTimeoutWithHttpInfo()); + } + + /// /// Test timeout - do not use in production /// @@ -1454,12 +1307,12 @@ public ApiResponse TestTimeoutWithHttpInfo() // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - }; + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -1471,9 +1324,9 @@ public ApiResponse TestTimeoutWithHttpInfo() } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1484,8 +1337,8 @@ public ApiResponse TestTimeoutWithHttpInfo() } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); } } } diff --git a/Conductor/Api/SecretResourceApi.cs b/Conductor/Api/SecretResourceApi.cs index 6374340d..e16fc568 100644 --- a/Conductor/Api/SecretResourceApi.cs +++ b/Conductor/Api/SecretResourceApi.cs @@ -4,227 +4,12 @@ using RestSharp; using Conductor.Client; using Conductor.Client.Models; +using ThreadTask = System.Threading.Tasks; +using conductor_csharp.Api; namespace Conductor.Api { - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface ISecretResourceApi : IApiAccessor - { - #region Synchronous Operations - /// - /// Delete a secret value by key - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// Object - Object DeleteSecret(string key); - - /// - /// Delete a secret value by key - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of Object - ApiResponse DeleteSecretWithHttpInfo(string key); - /// - /// Delete tags of the secret - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// - void DeleteTagForSecret(List body, string key); - - /// - /// Delete tags of the secret - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// ApiResponse of Object(void) - ApiResponse DeleteTagForSecretWithHttpInfo(List body, string key); - /// - /// Get secret value by key - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// Object - Object GetSecret(string key); - /// - /// Get secret value by key - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of Object - ApiResponse GetSecretWithHttpInfo(string key); - /// - /// Get tags by secret - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// List<TagObject> - List GetTags(string key); - - /// - /// Get tags by secret - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of List<TagObject> - ApiResponse> GetTagsWithHttpInfo(string key); - /// - /// List all secret names - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Object - Object ListAllSecretNames(); - - /// - /// List all secret names - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ApiResponse of Object - ApiResponse ListAllSecretNamesWithHttpInfo(); - /// - /// List all secret names user can grant access to - /// - /// - /// - /// - /// Thrown when fails to make API call - /// List<string> - List ListSecretsThatUserCanGrantAccessTo(); - - /// - /// List all secret names user can grant access to - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ApiResponse of List<string> - ApiResponse> ListSecretsThatUserCanGrantAccessToWithHttpInfo(); - /// - /// List all secret names along with tags user can grant access to - /// - /// - /// - /// - /// Thrown when fails to make API call - /// List<ExtendedSecret> - List ListSecretsWithTagsThatUserCanGrantAccessTo(); - - /// - /// List all secret names along with tags user can grant access to - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ApiResponse of List<ExtendedSecret> - ApiResponse> ListSecretsWithTagsThatUserCanGrantAccessToWithHttpInfo(); - /// - /// Put a secret value by key - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// Object - Object PutSecret(string body, string key); - - /// - /// Put a secret value by key - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// ApiResponse of Object - ApiResponse PutSecretWithHttpInfo(string body, string key); - /// - /// Tag a secret - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// - void PutTagForSecret(List body, string key); - - /// - /// Tag a secret - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// ApiResponse of Object(void) - ApiResponse PutTagForSecretWithHttpInfo(List body, string key); - /// - /// Check if secret exists - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// Object - Object SecretExists(string key); - - /// - /// Check if secret exists - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of Object - ApiResponse SecretExistsWithHttpInfo(string key); - #endregion Synchronous Operations - } /// /// Represents a collection of functions to interact with the API endpoints @@ -277,7 +62,7 @@ public SecretResourceApi(Conductor.Client.Configuration configuration = null) /// The base path public String GetBasePath() { - return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); + return this.Configuration.ApiClient.RestClient.Options.BaseUrl.ToString(); } /// @@ -314,6 +99,18 @@ public Object DeleteSecret(string key) return localVarResponse.Data; } + /// + /// Asynchronous Delete a secret value by key + /// + /// Thrown when fails to make API call + /// + /// Object + public async ThreadTask.Task DeleteSecretAsync(string key) + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(DeleteSecretWithHttpInfo(key)); + return localVarResponse.Data; + } + /// /// Delete a secret value by key /// @@ -336,28 +133,28 @@ public ApiResponse DeleteSecretWithHttpInfo(string key) // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); if (key != null) localVarPathParams.Add("key", this.Configuration.ApiClient.ParameterToString(key)); // path parameter - // authentication (api_key) required + // authentication (api_key) required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken; } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -368,8 +165,8 @@ public ApiResponse DeleteSecretWithHttpInfo(string key) } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); } /// @@ -384,6 +181,18 @@ public void DeleteTagForSecret(List body, string key) DeleteTagForSecretWithHttpInfo(body, key); } + /// + /// Asynchronous Delete tags of the secret + /// + /// Thrown when fails to make API call + /// + /// + /// + public async void DeleteTagForSecretAsync(List body, string key) + { + await ThreadTask.Task.FromResult(DeleteTagForSecretWithHttpInfo(body, key)); + } + /// /// Delete tags of the secret /// @@ -410,13 +219,13 @@ public ApiResponse DeleteTagForSecretWithHttpInfo(List body, // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - }; + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -437,9 +246,9 @@ public ApiResponse DeleteTagForSecretWithHttpInfo(List body, } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -450,8 +259,8 @@ public ApiResponse DeleteTagForSecretWithHttpInfo(List body, } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); } /// @@ -466,6 +275,18 @@ public Object GetSecret(string key) return localVarResponse.Data; } + /// + /// Asynchronous Get secret value by key + /// + /// Thrown when fails to make API call + /// + /// Object + public async ThreadTask.Task GetSecretAsync(string key) + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(GetSecretWithHttpInfo(key)); + return localVarResponse.Data; + } + /// /// Get secret value by key /// @@ -488,28 +309,28 @@ public ApiResponse GetSecretWithHttpInfo(string key) // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); if (key != null) localVarPathParams.Add("key", this.Configuration.ApiClient.ParameterToString(key)); // path parameter - // authentication (api_key) required + // authentication (api_key) required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken; } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -520,8 +341,8 @@ public ApiResponse GetSecretWithHttpInfo(string key) } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); } /// @@ -536,6 +357,18 @@ public List GetTags(string key) return localVarResponse.Data; } + /// + /// Asynchronous Get tags by secret + /// + /// Thrown when fails to make API call + /// + /// List<TagObject> + public async ThreadTask.Task> GetTagsAsync(string key) + { + ApiResponse> localVarResponse = await ThreadTask.Task.FromResult(GetTagsWithHttpInfo(key)); + return localVarResponse.Data; + } + /// /// Get tags by secret /// @@ -558,28 +391,28 @@ public ApiResponse> GetTagsWithHttpInfo(string key) // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); if (key != null) localVarPathParams.Add("key", this.Configuration.ApiClient.ParameterToString(key)); // path parameter - // authentication (api_key) required + // authentication (api_key) required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken; } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -590,8 +423,8 @@ public ApiResponse> GetTagsWithHttpInfo(string key) } return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (List)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (List)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); } /// @@ -605,6 +438,16 @@ public Object ListAllSecretNames() return localVarResponse.Data; } + /// + /// Asynchronous List all secret names + /// + /// Thrown when fails to make API call + /// Object + public async ThreadTask.Task ListAllSecretNamesAsync() + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(ListAllSecretNamesWithHttpInfo()); + return localVarResponse.Data; + } /// /// List all secret names /// @@ -623,13 +466,13 @@ public ApiResponse ListAllSecretNamesWithHttpInfo() // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -641,9 +484,9 @@ public ApiResponse ListAllSecretNamesWithHttpInfo() } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -654,8 +497,8 @@ public ApiResponse ListAllSecretNamesWithHttpInfo() } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); } /// @@ -669,6 +512,17 @@ public List ListSecretsThatUserCanGrantAccessTo() return localVarResponse.Data; } + /// + /// Asynchronous List all secret names + /// + /// Thrown when fails to make API call + /// ApiResponse of Object + public async ThreadTask.Task> ListSecretsThatUserCanGrantAccessToAsync() + { + ApiResponse> localVarResponse = await ThreadTask.Task.FromResult(ListSecretsThatUserCanGrantAccessToWithHttpInfo()); + return localVarResponse.Data; + } + /// /// List all secret names user can grant access to /// @@ -687,13 +541,13 @@ public ApiResponse> ListSecretsThatUserCanGrantAccessToWithHttpInfo // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -705,9 +559,9 @@ public ApiResponse> ListSecretsThatUserCanGrantAccessToWithHttpInfo } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -718,8 +572,8 @@ public ApiResponse> ListSecretsThatUserCanGrantAccessToWithHttpInfo } return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (List)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (List)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); } /// @@ -733,6 +587,17 @@ public List ListSecretsWithTagsThatUserCanGrantAccessTo() return localVarResponse.Data; } + /// + /// Asynchronous List all secret names along with tags user can grant access to + /// + /// Thrown when fails to make API call + /// List<ExtendedSecret> + public async ThreadTask.Task> ListSecretsWithTagsThatUserCanGrantAccessToAsync() + { + ApiResponse> localVarResponse = await ThreadTask.Task.FromResult(ListSecretsWithTagsThatUserCanGrantAccessToWithHttpInfo()); + return localVarResponse.Data; + } + /// /// List all secret names along with tags user can grant access to /// @@ -751,13 +616,13 @@ public ApiResponse> ListSecretsWithTagsThatUserCanGrantAcce // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -769,9 +634,9 @@ public ApiResponse> ListSecretsWithTagsThatUserCanGrantAcce } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -782,8 +647,8 @@ public ApiResponse> ListSecretsWithTagsThatUserCanGrantAcce } return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (List)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (List)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); } /// @@ -799,6 +664,19 @@ public Object PutSecret(string body, string key) return localVarResponse.Data; } + /// + /// Asynchronous Put a secret value by key + /// + /// Thrown when fails to make API call + /// + /// + /// Object + public async ThreadTask.Task PutSecretAsync(string body, string key) + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(PutSecretWithHttpInfo(body, key)); + return localVarResponse.Data; + } + /// /// Put a secret value by key /// @@ -825,14 +703,14 @@ public ApiResponse PutSecretWithHttpInfo(string body, string key) // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -853,9 +731,9 @@ public ApiResponse PutSecretWithHttpInfo(string body, string key) } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -866,8 +744,8 @@ public ApiResponse PutSecretWithHttpInfo(string body, string key) } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); } /// @@ -882,6 +760,18 @@ public void PutTagForSecret(List body, string key) PutTagForSecretWithHttpInfo(body, key); } + /// + /// Asynchronous Tag a secret + /// + /// Thrown when fails to make API call + /// + /// + /// + public async void PutTagForSecretAsync(List body, string key) + { + await ThreadTask.Task.FromResult(PutTagForSecretWithHttpInfo(body, key)); + } + /// /// Tag a secret /// @@ -908,13 +798,13 @@ public ApiResponse PutTagForSecretWithHttpInfo(List body, str // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - }; + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -935,9 +825,9 @@ public ApiResponse PutTagForSecretWithHttpInfo(List body, str } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -948,8 +838,8 @@ public ApiResponse PutTagForSecretWithHttpInfo(List body, str } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); } /// @@ -964,6 +854,18 @@ public Object SecretExists(string key) return localVarResponse.Data; } + /// + /// Asynchronous Check if secret exists + /// + /// Thrown when fails to make API call + /// + /// Object + public async ThreadTask.Task SecretExistsAsync(string key) + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(SecretExistsWithHttpInfo(key)); + return localVarResponse.Data; + } + /// /// Check if secret exists /// @@ -986,28 +888,28 @@ public ApiResponse SecretExistsWithHttpInfo(string key) // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); if (key != null) localVarPathParams.Add("key", this.Configuration.ApiClient.ParameterToString(key)); // path parameter - // authentication (api_key) required + // authentication (api_key) required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken; } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1018,8 +920,8 @@ public ApiResponse SecretExistsWithHttpInfo(string key) } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); } } } diff --git a/Conductor/Api/TagsApi.cs b/Conductor/Api/TagsApi.cs index a959ab3f..57557554 100644 --- a/Conductor/Api/TagsApi.cs +++ b/Conductor/Api/TagsApi.cs @@ -5,216 +5,12 @@ using RestSharp; using Conductor.Client; using Conductor.Client.Models; +using ThreadTask = System.Threading.Tasks; +using conductor_csharp.Api; namespace Conductor.Api { - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface ITagsApi : IApiAccessor - { - #region Synchronous Operations - /// - /// Adds the tag to the task - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// Object - Object AddTaskTag(TagObject body, string taskName); - /// - /// Adds the tag to the task - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// ApiResponse of Object - ApiResponse AddTaskTagWithHttpInfo(TagObject body, string taskName); - /// - /// Adds the tag to the workflow - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// Object - Object AddWorkflowTag(TagObject body, string name); - - /// - /// Adds the tag to the workflow - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// ApiResponse of Object - ApiResponse AddWorkflowTagWithHttpInfo(TagObject body, string name); - /// - /// Removes the tag of the task - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// Object - Object DeleteTaskTag(TagString body, string taskName); - - /// - /// Removes the tag of the task - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// ApiResponse of Object - ApiResponse DeleteTaskTagWithHttpInfo(TagString body, string taskName); - /// - /// Removes the tag of the workflow - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// Object - Object DeleteWorkflowTag(TagObject body, string name); - - /// - /// Removes the tag of the workflow - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// ApiResponse of Object - ApiResponse DeleteWorkflowTagWithHttpInfo(TagObject body, string name); - /// - /// List all tags - /// - /// - /// - /// - /// Thrown when fails to make API call - /// List<TagObject> - List GetTags(); - - /// - /// List all tags - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ApiResponse of List<TagObject> - ApiResponse> GetTagsWithHttpInfo(); - /// - /// Returns all the tags of the task - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// List<TagObject> - List GetTaskTags(string taskName); - - /// - /// Returns all the tags of the task - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of List<TagObject> - ApiResponse> GetTaskTagsWithHttpInfo(string taskName); - /// - /// Returns all the tags of the workflow - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// List<TagObject> - List GetWorkflowTags(string name); - - /// - /// Returns all the tags of the workflow - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of List<TagObject> - ApiResponse> GetWorkflowTagsWithHttpInfo(string name); - /// - /// Adds the tag to the task - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// Object - Object SetTaskTags(List body, string taskName); - - /// - /// Adds the tag to the task - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// ApiResponse of Object - ApiResponse SetTaskTagsWithHttpInfo(List body, string taskName); - /// - /// Set the tags of the workflow - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// Object - Object SetWorkflowTags(List body, string name); - - /// - /// Set the tags of the workflow - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// ApiResponse of Object - ApiResponse SetWorkflowTagsWithHttpInfo(List body, string name); - #endregion Synchronous Operations - } /// /// Represents a collection of functions to interact with the API endpoints @@ -267,7 +63,7 @@ public TagsApi(Conductor.Client.Configuration configuration = null) /// The base path public String GetBasePath() { - return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); + return this.Configuration.ApiClient.RestClient.Options.BaseUrl.ToString(); } /// @@ -305,6 +101,19 @@ public Object AddTaskTag(TagObject body, string taskName) return localVarResponse.Data; } + /// + /// Asynchronous Adds the tag to the task + /// + /// Thrown when fails to make API call + /// + /// + /// Object + public async ThreadTask.Task AddTaskTagAsync(TagObject body, string taskName) + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(AddTaskTagWithHttpInfo(body, taskName)); + return localVarResponse.Data; + } + /// /// Adds the tag to the task /// @@ -331,14 +140,14 @@ public ApiResponse AddTaskTagWithHttpInfo(TagObject body, string taskNam // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "*/*" - }; + "*/*" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -359,9 +168,9 @@ public ApiResponse AddTaskTagWithHttpInfo(TagObject body, string taskNam } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -372,8 +181,8 @@ public ApiResponse AddTaskTagWithHttpInfo(TagObject body, string taskNam } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); } /// @@ -389,6 +198,19 @@ public Object AddWorkflowTag(TagObject body, string name) return localVarResponse.Data; } + /// + /// Asynchronous Adds the tag to the workflow + /// + /// Thrown when fails to make API call + /// + /// + /// Object + public async ThreadTask.Task AddWorkflowTagAsync(TagObject body, string name) + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(AddWorkflowTagWithHttpInfo(body, name)); + return localVarResponse.Data; + } + /// /// Adds the tag to the workflow /// @@ -415,14 +237,14 @@ public ApiResponse AddWorkflowTagWithHttpInfo(TagObject body, string nam // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "*/*" - }; + "*/*" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -443,9 +265,9 @@ public ApiResponse AddWorkflowTagWithHttpInfo(TagObject body, string nam } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -456,8 +278,8 @@ public ApiResponse AddWorkflowTagWithHttpInfo(TagObject body, string nam } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); } /// @@ -473,6 +295,19 @@ public Object DeleteTaskTag(TagString body, string taskName) return localVarResponse.Data; } + /// + /// Asynchronous Removes the tag of the task + /// + /// Thrown when fails to make API call + /// + /// + /// Object + public async ThreadTask.Task DeleteTaskTagAsync(TagString body, string taskName) + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(DeleteTaskTagWithHttpInfo(body, taskName)); + return localVarResponse.Data; + } + /// /// Removes the tag of the task /// @@ -499,14 +334,14 @@ public ApiResponse DeleteTaskTagWithHttpInfo(TagString body, string task // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "*/*" - }; + "*/*" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -527,9 +362,9 @@ public ApiResponse DeleteTaskTagWithHttpInfo(TagString body, string task } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -540,8 +375,8 @@ public ApiResponse DeleteTaskTagWithHttpInfo(TagString body, string task } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); } /// @@ -557,6 +392,19 @@ public Object DeleteWorkflowTag(TagObject body, string name) return localVarResponse.Data; } + /// + /// Asynchronous Removes the tag of the workflow + /// + /// Thrown when fails to make API call + /// + /// + /// Object + public async ThreadTask.Task DeleteWorkflowTagAsync(TagObject body, string name) + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(DeleteWorkflowTagWithHttpInfo(body, name)); + return localVarResponse.Data; + } + /// /// Removes the tag of the workflow /// @@ -583,14 +431,14 @@ public ApiResponse DeleteWorkflowTagWithHttpInfo(TagObject body, string // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "*/*" - }; + "*/*" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -611,9 +459,9 @@ public ApiResponse DeleteWorkflowTagWithHttpInfo(TagObject body, string } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -624,8 +472,8 @@ public ApiResponse DeleteWorkflowTagWithHttpInfo(TagObject body, string } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); } /// @@ -639,6 +487,17 @@ public List GetTags() return localVarResponse.Data; } + /// + /// Asynchronous List all tags + /// + /// Thrown when fails to make API call + /// List<TagObject> + public async ThreadTask.Task> GetTagsAsync() + { + ApiResponse> localVarResponse = await ThreadTask.Task.FromResult(GetTagsWithHttpInfo()); + return localVarResponse.Data; + } + /// /// List all tags /// @@ -657,13 +516,13 @@ public ApiResponse> GetTagsWithHttpInfo() // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "*/*" - }; + "*/*" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -675,9 +534,9 @@ public ApiResponse> GetTagsWithHttpInfo() } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -688,8 +547,8 @@ public ApiResponse> GetTagsWithHttpInfo() } return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (List)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (List)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); } /// @@ -704,6 +563,18 @@ public List GetTaskTags(string taskName) return localVarResponse.Data; } + /// + /// Asynchronous Returns all the tags of the task + /// + /// Thrown when fails to make API call + /// + /// List<TagObject> + public async ThreadTask.Task> GetTaskTagsAsync(string taskName) + { + ApiResponse> localVarResponse = await ThreadTask.Task.FromResult(GetTaskTagsWithHttpInfo(taskName)); + return localVarResponse.Data; + } + /// /// Returns all the tags of the task /// @@ -726,28 +597,28 @@ public ApiResponse> GetTaskTagsWithHttpInfo(string taskName) // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); if (taskName != null) localVarPathParams.Add("taskName", this.Configuration.ApiClient.ParameterToString(taskName)); // path parameter - // authentication (api_key) required + // authentication (api_key) required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken; } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -758,8 +629,8 @@ public ApiResponse> GetTaskTagsWithHttpInfo(string taskName) } return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (List)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (List)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); } /// @@ -774,6 +645,18 @@ public List GetWorkflowTags(string name) return localVarResponse.Data; } + /// + /// Asynchronous Returns all the tags of the workflow + /// + /// Thrown when fails to make API call + /// + /// List<TagObject> + public async ThreadTask.Task> GetWorkflowTagsAsync(string name) + { + ApiResponse> localVarResponse = await ThreadTask.Task.FromResult(GetWorkflowTagsWithHttpInfo(name)); + return localVarResponse.Data; + } + /// /// Returns all the tags of the workflow /// @@ -796,28 +679,28 @@ public ApiResponse> GetWorkflowTagsWithHttpInfo(string name) // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); if (name != null) localVarPathParams.Add("name", this.Configuration.ApiClient.ParameterToString(name)); // path parameter - // authentication (api_key) required + // authentication (api_key) required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken; } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -828,8 +711,8 @@ public ApiResponse> GetWorkflowTagsWithHttpInfo(string name) } return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (List)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (List)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); } /// @@ -845,6 +728,19 @@ public Object SetTaskTags(List body, string taskName) return localVarResponse.Data; } + /// + /// Asynchronous Adds the tag to the task + /// + /// Thrown when fails to make API call + /// + /// + /// Object + public async ThreadTask.Task SetTaskTagsAsync(List body, string taskName) + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(SetTaskTagsWithHttpInfo(body, taskName)); + return localVarResponse.Data; + } + /// /// Adds the tag to the task /// @@ -871,14 +767,14 @@ public ApiResponse SetTaskTagsWithHttpInfo(List body, string // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "*/*" - }; + "*/*" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -899,9 +795,9 @@ public ApiResponse SetTaskTagsWithHttpInfo(List body, string } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -912,8 +808,8 @@ public ApiResponse SetTaskTagsWithHttpInfo(List body, string } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); } /// @@ -929,6 +825,19 @@ public Object SetWorkflowTags(List body, string name) return localVarResponse.Data; } + /// + /// Asynchronous Set the tags of the workflow + /// + /// Thrown when fails to make API call + /// + /// + /// Object + public async ThreadTask.Task SetWorkflowTagsAsync(List body, string name) + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(SetWorkflowTagsWithHttpInfo(body, name)); + return localVarResponse.Data; + } + /// /// Set the tags of the workflow /// @@ -955,14 +864,14 @@ public ApiResponse SetWorkflowTagsWithHttpInfo(List body, str // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "*/*" - }; + "*/*" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -983,9 +892,9 @@ public ApiResponse SetWorkflowTagsWithHttpInfo(List body, str } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -996,8 +905,8 @@ public ApiResponse SetWorkflowTagsWithHttpInfo(List body, str } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); } } } diff --git a/Conductor/Api/TaskResourceApi.cs b/Conductor/Api/TaskResourceApi.cs index f25b67e3..4b8e0c79 100644 --- a/Conductor/Api/TaskResourceApi.cs +++ b/Conductor/Api/TaskResourceApi.cs @@ -4,400 +4,13 @@ using RestSharp; using Conductor.Client; using Conductor.Client.Models; +using ThreadTask = System.Threading.Tasks; +using conductor_csharp.Api; + namespace Conductor.Api { - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface ITaskResourceApi : IApiAccessor - { - #region Synchronous Operations - /// - /// Get the details about each queue - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Dictionary<string, long?> - Dictionary All(); - - /// - /// Get the details about each queue - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ApiResponse of Dictionary<string, long?> - ApiResponse> AllWithHttpInfo(); - /// - /// Get the details about each queue - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Dictionary<string, Dictionary<string, Dictionary<string, long?>>> - Dictionary>> AllVerbose(); - - /// - /// Get the details about each queue - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ApiResponse of Dictionary<string, Dictionary<string, Dictionary<string, long?>>> - ApiResponse>>> AllVerboseWithHttpInfo(); - /// - /// Batch poll for a task of a certain type - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// (optional) - /// (optional, default to 1) - /// (optional, default to 100) - /// List<Task> - List BatchPoll(string tasktype, string workerid = null, string domain = null, int? count = null, int? timeout = null); - - /// - /// Batch poll for a task of a certain type - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// (optional) - /// (optional, default to 1) - /// (optional, default to 100) - /// ApiResponse of List<Task> - ApiResponse> BatchPollWithHttpInfo(string tasktype, string workerid = null, string domain = null, int? count = null, int? timeout = null); - /// - /// Get the last poll data for all task types - /// - /// - /// - /// - /// Thrown when fails to make API call - /// (optional) - /// (optional) - /// (optional) - /// (optional) - /// (optional) - /// (optional) - /// Dictionary<string, Object> - Dictionary GetAllPollData(long? workerSize = null, string workerOpt = null, long? queueSize = null, string queueOpt = null, long? lastPollTimeSize = null, string lastPollTimeOpt = null); - - /// - /// Get the last poll data for all task types - /// - /// - /// - /// - /// Thrown when fails to make API call - /// (optional) - /// (optional) - /// (optional) - /// (optional) - /// (optional) - /// (optional) - /// ApiResponse of Dictionary<string, Object> - ApiResponse> GetAllPollDataWithHttpInfo(long? workerSize = null, string workerOpt = null, long? queueSize = null, string queueOpt = null, long? lastPollTimeSize = null, string lastPollTimeOpt = null); - /// - /// Get the external uri where the task payload is to be stored - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// - /// ExternalStorageLocation - ExternalStorageLocation GetExternalStorageLocation(string path, string operation, string payloadType); - - /// - /// Get the external uri where the task payload is to be stored - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// - /// ApiResponse of ExternalStorageLocation - ApiResponse GetExternalStorageLocationWithHttpInfo(string path, string operation, string payloadType); - /// - /// Get the last poll data for a given task type - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// List<PollData> - List GetPollData(string taskType); - - /// - /// Get the last poll data for a given task type - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of List<PollData> - ApiResponse> GetPollDataWithHttpInfo(string taskType); - /// - /// Get task by Id - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// Task - Task GetTask(string taskId); - - /// - /// Get task by Id - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of Task - ApiResponse GetTaskWithHttpInfo(string taskId); - /// - /// Get Task Execution Logs - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// List<TaskExecLog> - List GetTaskLogs(string taskId); - - /// - /// Get Task Execution Logs - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of List<TaskExecLog> - ApiResponse> GetTaskLogsWithHttpInfo(string taskId); - /// - /// Log Task Execution Details - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// - void Log(string body, string taskId); - - /// - /// Log Task Execution Details - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// ApiResponse of Object(void) - ApiResponse LogWithHttpInfo(string body, string taskId); - /// - /// Poll for a task of a certain type - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// (optional) - /// Task - Task Poll(string tasktype, string workerid = null, string domain = null); - - /// - /// Poll for a task of a certain type - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// (optional) - /// ApiResponse of Task - ApiResponse PollWithHttpInfo(string tasktype, string workerid = null, string domain = null); - /// - /// Requeue pending tasks - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// string - string RequeuePendingTask(string taskType); - - /// - /// Requeue pending tasks - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of string - ApiResponse RequeuePendingTaskWithHttpInfo(string taskType); - /// - /// Search for tasks based in payload and other parameters - /// - /// - /// use sort options as sort=<field>:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC - /// - /// Thrown when fails to make API call - /// (optional, default to 0) - /// (optional, default to 100) - /// (optional) - /// (optional, default to *) - /// (optional) - /// SearchResultTaskSummary - SearchResultTaskSummary Search(int? start = null, int? size = null, string sort = null, string freeText = null, string query = null); - - /// - /// Search for tasks based in payload and other parameters - /// - /// - /// use sort options as sort=<field>:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC - /// - /// Thrown when fails to make API call - /// (optional, default to 0) - /// (optional, default to 100) - /// (optional) - /// (optional, default to *) - /// (optional) - /// ApiResponse of SearchResultTaskSummary - ApiResponse SearchWithHttpInfo(int? start = null, int? size = null, string sort = null, string freeText = null, string query = null); - /// - /// Search for tasks based in payload and other parameters - /// - /// - /// use sort options as sort=<field>:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC - /// - /// Thrown when fails to make API call - /// (optional, default to 0) - /// (optional, default to 100) - /// (optional) - /// (optional, default to *) - /// (optional) - /// SearchResultTask - SearchResultTask SearchV2(int? start = null, int? size = null, string sort = null, string freeText = null, string query = null); - - /// - /// Search for tasks based in payload and other parameters - /// - /// - /// use sort options as sort=<field>:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC - /// - /// Thrown when fails to make API call - /// (optional, default to 0) - /// (optional, default to 100) - /// (optional) - /// (optional, default to *) - /// (optional) - /// ApiResponse of SearchResultTask - ApiResponse SearchV2WithHttpInfo(int? start = null, int? size = null, string sort = null, string freeText = null, string query = null); - /// - /// Get Task type queue sizes - /// - /// - /// - /// - /// Thrown when fails to make API call - /// (optional) - /// Dictionary<string, int?> - Dictionary Size(List taskType = null); - - /// - /// Get Task type queue sizes - /// - /// - /// - /// - /// Thrown when fails to make API call - /// (optional) - /// ApiResponse of Dictionary<string, int?> - ApiResponse> SizeWithHttpInfo(List taskType = null); - /// - /// Update a task - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// string - string UpdateTask(TaskResult body); - - /// - /// Update a task - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of string - ApiResponse UpdateTaskWithHttpInfo(TaskResult body); - /// - /// Update a task By Ref Name - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// (optional) - /// string - string UpdateTask(Dictionary body, string workflowId, string taskRefName, string status, string workerid = null); - /// - /// Update a task By Ref Name - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// ApiResponse of string - ApiResponse UpdateTaskWithHttpInfo(Dictionary body, string workflowId, string taskRefName, string status, string workerid = null); - #endregion Synchronous Operations - } /// /// Represents a collection of functions to interact with the API endpoints @@ -450,7 +63,7 @@ public TaskResourceApi(Conductor.Client.Configuration configuration = null) /// The base path public String GetBasePath() { - return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); + return this.Configuration.ApiClient.RestClient.Options.BaseUrl.ToString(); } /// @@ -486,6 +99,17 @@ public Conductor.Client.ExceptionFactory ExceptionFactory return localVarResponse.Data; } + /// + /// Asynchronous Get the details about each queue + /// + /// Thrown when fails to make API call + /// Dictionary<string, long?> + public async ThreadTask.Task> AllAsync() + { + ApiResponse> localVarResponse = await ThreadTask.Task.FromResult(AllWithHttpInfo()); + return localVarResponse.Data; + } + /// /// Get the details about each queue /// @@ -504,13 +128,13 @@ public Conductor.Client.ExceptionFactory ExceptionFactory // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "*/*" - }; + "*/*" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -522,9 +146,9 @@ public Conductor.Client.ExceptionFactory ExceptionFactory } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -535,8 +159,8 @@ public Conductor.Client.ExceptionFactory ExceptionFactory } return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Dictionary)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Dictionary))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Dictionary)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Dictionary))); } /// @@ -550,6 +174,17 @@ public Conductor.Client.ExceptionFactory ExceptionFactory return localVarResponse.Data; } + /// + /// Asynchronous Get the details about each queue + /// + /// Thrown when fails to make API call + /// Dictionary<string, Dictionary<string, Dictionary<string, long?>>> + public async ThreadTask.Task>>> AllVerboseAsync() + { + ApiResponse>>> localVarResponse = await ThreadTask.Task.FromResult(AllVerboseWithHttpInfo()); + return localVarResponse.Data; + } + /// /// Get the details about each queue /// @@ -568,13 +203,13 @@ public Conductor.Client.ExceptionFactory ExceptionFactory // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "*/*" - }; + "*/*" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -586,9 +221,9 @@ public Conductor.Client.ExceptionFactory ExceptionFactory } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -599,8 +234,8 @@ public Conductor.Client.ExceptionFactory ExceptionFactory } return new ApiResponse>>>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Dictionary>>)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Dictionary>>))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Dictionary>>)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Dictionary>>))); } /// @@ -619,6 +254,22 @@ public List BatchPoll(string tasktype, string workerid = null, string doma return localVarResponse.Data; } + /// + /// Asynchronous Batch poll for a task of a certain type + /// + /// Thrown when fails to make API call + /// + /// (optional) + /// (optional) + /// (optional, default to 1) + /// (optional, default to 100) + /// List<Task> + public async ThreadTask.Task> BatchPollAsync(string tasktype, string workerid = null, string domain = null, int? count = null, int? timeout = null) + { + ApiResponse> localVarResponse = await ThreadTask.Task.FromResult(BatchPollWithHttpInfo(tasktype, workerid, domain, count, timeout)); + return localVarResponse.Data; + } + /// /// Batch poll for a task of a certain type /// @@ -645,13 +296,13 @@ public ApiResponse> BatchPollWithHttpInfo(string tasktype, string wor // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "*/*" - }; + "*/*" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -661,16 +312,16 @@ public ApiResponse> BatchPollWithHttpInfo(string tasktype, string wor if (domain != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "domain", domain)); // query parameter if (count != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "count", count)); // query parameter if (timeout != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "timeout", timeout)); // query parameter - // authentication (api_key) required + // authentication (api_key) required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken; } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -681,8 +332,8 @@ public ApiResponse> BatchPollWithHttpInfo(string tasktype, string wor } return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (List)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (List)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); } /// @@ -713,6 +364,23 @@ public Dictionary GetAllPollData(long? workerSize = null, string return localVarResponse.Data; } + /// + /// Asynchronous Get the last poll data for all task types + /// + /// Thrown when fails to make API call + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// Dictionary<string, Object> + public async ThreadTask.Task> GetAllPollDataAsync(long? workerSize = null, string workerOpt = null, long? queueSize = null, string queueOpt = null, long? lastPollTimeSize = null, string lastPollTimeOpt = null) + { + ApiResponse> localVarResponse = await ThreadTask.Task.FromResult(GetAllPollDataWithHttpInfo(workerSize, workerOpt, queueSize, queueOpt, lastPollTimeSize, lastPollTimeOpt)); + return localVarResponse.Data; + } + /// /// Get the last poll data for all task types /// @@ -737,13 +405,13 @@ public ApiResponse> GetAllPollDataWithHttpInfo(long? // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "*/*" - }; + "*/*" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -754,16 +422,16 @@ public ApiResponse> GetAllPollDataWithHttpInfo(long? if (queueOpt != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "queueOpt", queueOpt)); // query parameter if (lastPollTimeSize != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "lastPollTimeSize", lastPollTimeSize)); // query parameter if (lastPollTimeOpt != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "lastPollTimeOpt", lastPollTimeOpt)); // query parameter - // authentication (api_key) required + // authentication (api_key) required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken; } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -774,8 +442,8 @@ public ApiResponse> GetAllPollDataWithHttpInfo(long? } return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Dictionary)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Dictionary))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Dictionary)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Dictionary))); } /// @@ -792,6 +460,20 @@ public ExternalStorageLocation GetExternalStorageLocation(string path, string op return localVarResponse.Data; } + /// + /// Asynchronous Get the external uri where the task payload is to be stored + /// + /// Thrown when fails to make API call + /// + /// + /// + /// ExternalStorageLocation + public async ThreadTask.Task GetExternalStorageLocationAsync(string path, string operation, string payloadType) + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(GetExternalStorageLocationWithHttpInfo(path, operation, payloadType)); + return localVarResponse.Data; + } + /// /// Get the external uri where the task payload is to be stored /// @@ -822,13 +504,13 @@ public ApiResponse GetExternalStorageLocationWithHttpIn // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "*/*" - }; + "*/*" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -836,16 +518,16 @@ public ApiResponse GetExternalStorageLocationWithHttpIn if (path != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "path", path)); // query parameter if (operation != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "operation", operation)); // query parameter if (payloadType != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "payloadType", payloadType)); // query parameter - // authentication (api_key) required + // authentication (api_key) required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken; } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -856,8 +538,8 @@ public ApiResponse GetExternalStorageLocationWithHttpIn } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (ExternalStorageLocation)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ExternalStorageLocation))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (ExternalStorageLocation)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ExternalStorageLocation))); } /// @@ -872,6 +554,18 @@ public List GetPollData(string taskType) return localVarResponse.Data; } + /// + /// Asynchronous Get the last poll data for a given task type + /// + /// Thrown when fails to make API call + /// + /// List<PollData> + public async ThreadTask.Task> GetPollDataAsync(string taskType) + { + ApiResponse> localVarResponse = await ThreadTask.Task.FromResult(GetPollDataWithHttpInfo(taskType)); + return localVarResponse.Data; + } + /// /// Get the last poll data for a given task type /// @@ -894,28 +588,28 @@ public ApiResponse> GetPollDataWithHttpInfo(string taskType) // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "*/*" - }; + "*/*" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); if (taskType != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "taskType", taskType)); // query parameter - // authentication (api_key) required + // authentication (api_key) required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken; } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -926,8 +620,8 @@ public ApiResponse> GetPollDataWithHttpInfo(string taskType) } return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (List)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (List)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); } /// @@ -942,6 +636,18 @@ public Task GetTask(string taskId) return localVarResponse.Data; } + /// + /// Asynchronous Get task by Id + /// + /// Thrown when fails to make API call + /// + /// Task + public async ThreadTask.Task GetTaskAsync(string taskId) + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(GetTaskWithHttpInfo(taskId)); + return localVarResponse.Data; + } + /// /// Get task by Id /// @@ -964,28 +670,28 @@ public ApiResponse GetTaskWithHttpInfo(string taskId) // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "*/*" - }; + "*/*" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); if (taskId != null) localVarPathParams.Add("taskId", this.Configuration.ApiClient.ParameterToString(taskId)); // path parameter - // authentication (api_key) required + // authentication (api_key) required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken; } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -996,8 +702,8 @@ public ApiResponse GetTaskWithHttpInfo(string taskId) } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Task)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Task))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Task)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Task))); } /// @@ -1012,6 +718,18 @@ public List GetTaskLogs(string taskId) return localVarResponse.Data; } + /// + /// Asynchronous Get Task Execution Logs + /// + /// Thrown when fails to make API call + /// + /// List<TaskExecLog> + public async ThreadTask.Task> GetTaskLogsAsync(string taskId) + { + ApiResponse> localVarResponse = await ThreadTask.Task.FromResult(GetTaskLogsWithHttpInfo(taskId)); + return localVarResponse.Data; + } + /// /// Get Task Execution Logs /// @@ -1034,28 +752,28 @@ public ApiResponse> GetTaskLogsWithHttpInfo(string taskId) // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "*/*" - }; + "*/*" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); if (taskId != null) localVarPathParams.Add("taskId", this.Configuration.ApiClient.ParameterToString(taskId)); // path parameter - // authentication (api_key) required + // authentication (api_key) required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken; } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1066,8 +784,8 @@ public ApiResponse> GetTaskLogsWithHttpInfo(string taskId) } return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (List)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (List)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); } /// @@ -1082,6 +800,18 @@ public void Log(string body, string taskId) LogWithHttpInfo(body, taskId); } + /// + /// Asynchronous Log Task Execution Details + /// + /// Thrown when fails to make API call + /// + /// + /// + public async void LogAsync(string body, string taskId) + { + await ThreadTask.Task.FromResult(LogWithHttpInfo(body, taskId)); + } + /// /// Log Task Execution Details /// @@ -1108,13 +838,13 @@ public ApiResponse LogWithHttpInfo(string body, string taskId) // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - }; + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -1135,9 +865,9 @@ public ApiResponse LogWithHttpInfo(string body, string taskId) } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1148,8 +878,8 @@ public ApiResponse LogWithHttpInfo(string body, string taskId) } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); } /// @@ -1166,6 +896,20 @@ public Task Poll(string tasktype, string workerid = null, string domain = null) return localVarResponse.Data; } + /// + /// Asynchronous Poll for a task of a certain type + /// + /// Thrown when fails to make API call + /// + /// (optional) + /// (optional) + /// Task + public async ThreadTask.Task PollAsync(string tasktype, string workerid = null, string domain = null) + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(PollWithHttpInfo(tasktype, workerid, domain)); + return localVarResponse.Data; + } + /// /// Poll for a task of a certain type /// @@ -1190,13 +934,13 @@ public ApiResponse PollWithHttpInfo(string tasktype, string workerid = nul // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "*/*" - }; + "*/*" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -1204,16 +948,16 @@ public ApiResponse PollWithHttpInfo(string tasktype, string workerid = nul if (tasktype != null) localVarPathParams.Add("tasktype", this.Configuration.ApiClient.ParameterToString(tasktype)); // path parameter if (workerid != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "workerid", workerid)); // query parameter if (domain != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "domain", domain)); // query parameter - // authentication (api_key) required + // authentication (api_key) required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken; } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1224,8 +968,8 @@ public ApiResponse PollWithHttpInfo(string tasktype, string workerid = nul } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Task)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Task))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Task)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Task))); } /// @@ -1240,6 +984,18 @@ public string RequeuePendingTask(string taskType) return localVarResponse.Data; } + /// + /// Asynchronous Requeue pending tasks + /// + /// Thrown when fails to make API call + /// + /// string + public async ThreadTask.Task RequeuePendingTaskAsync(string taskType) + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(RequeuePendingTaskWithHttpInfo(taskType)); + return localVarResponse.Data; + } + /// /// Requeue pending tasks /// @@ -1262,28 +1018,28 @@ public ApiResponse RequeuePendingTaskWithHttpInfo(string taskType) // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "text/plain" - }; + "text/plain" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); if (taskType != null) localVarPathParams.Add("taskType", this.Configuration.ApiClient.ParameterToString(taskType)); // path parameter - // authentication (api_key) required + // authentication (api_key) required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken; } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1294,8 +1050,8 @@ public ApiResponse RequeuePendingTaskWithHttpInfo(string taskType) } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (string)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(string))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (string)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(string))); } /// @@ -1314,6 +1070,22 @@ public SearchResultTaskSummary Search(int? start = null, int? size = null, strin return localVarResponse.Data; } + /// + /// Asynchronous Search for tasks based in payload and other parameters use sort options as sort=<field>:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC + /// + /// Thrown when fails to make API call + /// (optional, default to 0) + /// (optional, default to 100) + /// (optional) + /// (optional, default to *) + /// (optional) + /// SearchResultTaskSummary + public async ThreadTask.Task SearchAsync(int? start = null, int? size = null, string sort = null, string freeText = null, string query = null) + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(SearchWithHttpInfo(start, size, sort, freeText, query)); + return localVarResponse.Data; + } + /// /// Search for tasks based in payload and other parameters use sort options as sort=<field>:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC /// @@ -1337,13 +1109,13 @@ public ApiResponse SearchWithHttpInfo(int? start = null // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "*/*" - }; + "*/*" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -1353,16 +1125,16 @@ public ApiResponse SearchWithHttpInfo(int? start = null if (sort != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "sort", sort)); // query parameter if (freeText != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "freeText", freeText)); // query parameter if (query != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "query", query)); // query parameter - // authentication (api_key) required + // authentication (api_key) required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken; } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1373,8 +1145,8 @@ public ApiResponse SearchWithHttpInfo(int? start = null } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (SearchResultTaskSummary)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(SearchResultTaskSummary))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (SearchResultTaskSummary)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(SearchResultTaskSummary))); } /// @@ -1393,6 +1165,22 @@ public SearchResultTask SearchV2(int? start = null, int? size = null, string sor return localVarResponse.Data; } + /// + /// Asynchronous Search for tasks based in payload and other parameters use sort options as sort=<field>:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC + /// + /// Thrown when fails to make API call + /// (optional, default to 0) + /// (optional, default to 100) + /// (optional) + /// (optional, default to *) + /// (optional) + /// SearchResultTask + public async ThreadTask.Task SearchV2Async(int? start = null, int? size = null, string sort = null, string freeText = null, string query = null) + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(SearchV2WithHttpInfo(start, size, sort, freeText, query)); + return localVarResponse.Data; + } + /// /// Search for tasks based in payload and other parameters use sort options as sort=<field>:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC /// @@ -1416,13 +1204,13 @@ public ApiResponse SearchV2WithHttpInfo(int? start = null, int // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "*/*" - }; + "*/*" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -1432,16 +1220,16 @@ public ApiResponse SearchV2WithHttpInfo(int? start = null, int if (sort != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "sort", sort)); // query parameter if (freeText != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "freeText", freeText)); // query parameter if (query != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "query", query)); // query parameter - // authentication (api_key) required + // authentication (api_key) required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken; } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1452,8 +1240,8 @@ public ApiResponse SearchV2WithHttpInfo(int? start = null, int } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (SearchResultTask)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(SearchResultTask))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (SearchResultTask)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(SearchResultTask))); } /// @@ -1468,6 +1256,18 @@ public ApiResponse SearchV2WithHttpInfo(int? start = null, int return localVarResponse.Data; } + /// + /// Asynchronous Get Task type queue sizes + /// + /// Thrown when fails to make API call + /// (optional) + /// Dictionary<string, int?> + public async ThreadTask.Task> SizeAsync(List taskType = null) + { + ApiResponse> localVarResponse = await ThreadTask.Task.FromResult(SizeWithHttpInfo(taskType)); + return localVarResponse.Data; + } + /// /// Get Task type queue sizes /// @@ -1487,28 +1287,28 @@ public ApiResponse SearchV2WithHttpInfo(int? start = null, int // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "*/*" - }; + "*/*" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); if (taskType != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "taskType", taskType)); // query parameter - // authentication (api_key) required + // authentication (api_key) required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken; } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1519,8 +1319,8 @@ public ApiResponse SearchV2WithHttpInfo(int? start = null, int } return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Dictionary)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Dictionary))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Dictionary)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Dictionary))); } /// @@ -1535,6 +1335,18 @@ public string UpdateTask(TaskResult body) return localVarResponse.Data; } + /// + /// Asynchronous Update a task + /// + /// Thrown when fails to make API call + /// + /// string + public async ThreadTask.Task UpdateTaskAsync(TaskResult body) + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(UpdateTaskWithHttpInfo(body)); + return localVarResponse.Data; + } + /// /// Update a task /// @@ -1557,14 +1369,14 @@ public ApiResponse UpdateTaskWithHttpInfo(TaskResult body) // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "text/plain" - }; + "text/plain" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -1584,9 +1396,9 @@ public ApiResponse UpdateTaskWithHttpInfo(TaskResult body) } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1597,8 +1409,8 @@ public ApiResponse UpdateTaskWithHttpInfo(TaskResult body) } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (string)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(string))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (string)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(string))); } /// @@ -1617,6 +1429,22 @@ public string UpdateTask(Dictionary body, string workflowId, str return localVarResponse.Data; } + /// + /// Asynchronous Update a task By Ref Name + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// (optional) + /// string + public async ThreadTask.Task UpdateTaskAsync(Dictionary body, string workflowId, string taskRefName, string status, string workerid = null) + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(UpdateTaskWithHttpInfo(body, workflowId, taskRefName, status, workerid)); + return localVarResponse.Data; + } + /// /// Update a task By Ref Name /// @@ -1651,14 +1479,14 @@ public ApiResponse UpdateTaskWithHttpInfo(Dictionary bod // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "text/plain" - }; + "text/plain" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -1687,9 +1515,9 @@ public ApiResponse UpdateTaskWithHttpInfo(Dictionary bod } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1700,18 +1528,18 @@ public ApiResponse UpdateTaskWithHttpInfo(Dictionary bod } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (string)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(string))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (string)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(string))); } // public ExternalStorageLocation GetExternalStorageLocation(string path, string operation, string payloadType) // { - // throw new NotImplementedException(); + // throw new NotImplementedException(); // } // public ApiResponse GetExternalStorageLocationWithHttpInfo(string path, string operation, string payloadType) // { - // throw new NotImplementedException(); + // throw new NotImplementedException(); // } } } diff --git a/Conductor/Api/TokenResourceApi.cs b/Conductor/Api/TokenResourceApi.cs index cd1a1605..7cb3f9c0 100644 --- a/Conductor/Api/TokenResourceApi.cs +++ b/Conductor/Api/TokenResourceApi.cs @@ -4,59 +4,12 @@ using RestSharp; using Conductor.Client; using Conductor.Client.Models; +using ThreadTask = System.Threading.Tasks; +using conductor_csharp.Api; namespace Conductor.Api { - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface ITokenResourceApi : IApiAccessor - { - #region Synchronous Operations - /// - /// Generate JWT with the given access key - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// Response - Token GenerateToken(GenerateTokenRequest body); - - /// - /// Generate JWT with the given access key - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of Response - ApiResponse GenerateTokenWithHttpInfo(GenerateTokenRequest body); - /// - /// Get the user info from the token - /// - /// - /// - /// - /// Thrown when fails to make API call - /// (optional, default to false) - /// Object - Object GetUserInfo(bool? claims = null); - /// - /// Get the user info from the token - /// - /// - /// - /// - /// Thrown when fails to make API call - /// (optional, default to false) - /// ApiResponse of Object - ApiResponse GetUserInfoWithHttpInfo(bool? claims = null); - #endregion Synchronous Operations - } /// /// Represents a collection of functions to interact with the API endpoints @@ -109,7 +62,7 @@ public TokenResourceApi(Conductor.Client.Configuration configuration = null) /// The base path public String GetBasePath() { - return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); + return this.Configuration.ApiClient.RestClient.Options.BaseUrl.ToString(); } /// @@ -146,6 +99,18 @@ public Token GenerateToken(GenerateTokenRequest body) return localVarResponse.Data; } + /// + /// Asynchronous Generate JWT with the given access key + /// + /// Thrown when fails to make API call + /// + /// Response + public async ThreadTask.Task GenerateTokenAsync(GenerateTokenRequest body) + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(GenerateTokenWithHttpInfo(body)); + return localVarResponse.Data; + } + /// /// Generate JWT with the given access key /// @@ -168,14 +133,14 @@ public ApiResponse GenerateTokenWithHttpInfo(GenerateTokenRequest body) // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -190,9 +155,9 @@ public ApiResponse GenerateTokenWithHttpInfo(GenerateTokenRequest body) } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -203,8 +168,8 @@ public ApiResponse GenerateTokenWithHttpInfo(GenerateTokenRequest body) } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Token)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Token))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Token)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Token))); } /// @@ -219,6 +184,18 @@ public Object GetUserInfo(bool? claims = null) return localVarResponse.Data; } + /// + /// Asynchronous Get the user info from the token + /// + /// Thrown when fails to make API call + /// (optional, default to false) + /// Object + public async ThreadTask.Task GetUserInfoAsync(bool? claims = null) + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(GetUserInfoWithHttpInfo(claims)); + return localVarResponse.Data; + } + /// /// Get the user info from the token /// @@ -238,13 +215,13 @@ public ApiResponse GetUserInfoWithHttpInfo(bool? claims = null) // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -252,9 +229,9 @@ public ApiResponse GetUserInfoWithHttpInfo(bool? claims = null) if (claims != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "claims", claims)); // query parameter // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -265,8 +242,8 @@ public ApiResponse GetUserInfoWithHttpInfo(bool? claims = null) } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); } } } diff --git a/Conductor/Api/UserResourceApi.cs b/Conductor/Api/UserResourceApi.cs index 3e81b6c7..2127e7f0 100644 --- a/Conductor/Api/UserResourceApi.cs +++ b/Conductor/Api/UserResourceApi.cs @@ -4,147 +4,12 @@ using RestSharp; using Conductor.Client; using Conductor.Client.Models; +using ThreadTask = System.Threading.Tasks; +using conductor_csharp.Api; namespace Conductor.Api { - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IUserResourceApi : IApiAccessor - { - #region Synchronous Operations - /// - /// Delete a user - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// Response - Response DeleteUser(string id); - - /// - /// Delete a user - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of Response - ApiResponse DeleteUserWithHttpInfo(string id); - /// - /// Get the permissions this user has over workflows and tasks - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// Object - Object GetGrantedPermissions(string userId); - - /// - /// Get the permissions this user has over workflows and tasks - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of Object - ApiResponse GetGrantedPermissionsWithHttpInfo(string userId); - /// - /// Get a user by id - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// Object - Object GetUser(string id); - - /// - /// Get a user by id - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of Object - ApiResponse GetUserWithHttpInfo(string id); - /// - /// Get all users - /// - /// - /// - /// - /// Thrown when fails to make API call - /// (optional, default to false) - /// List<ConductorUser> - List ListUsers(bool? apps = null); - - /// - /// Get all users - /// - /// - /// - /// - /// Thrown when fails to make API call - /// (optional, default to false) - /// ApiResponse of List<ConductorUser> - ApiResponse> ListUsersWithHttpInfo(bool? apps = null); - /// - /// Send an email with a link to this cluster - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Object - Object SendInviteEmail(string id, ConductorUser body = null); - - /// - /// Send an email with a link to this cluster - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// ApiResponse of Object - ApiResponse SendInviteEmailWithHttpInfo(string id, ConductorUser body = null); - /// - /// Create or update a user - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// Object - Object UpsertUser(UpsertUserRequest body, string id); - /// - /// Create or update a user - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// ApiResponse of Object - ApiResponse UpsertUserWithHttpInfo(UpsertUserRequest body, string id); - #endregion Synchronous Operations - } /// /// Represents a collection of functions to interact with the API endpoints @@ -197,7 +62,7 @@ public UserResourceApi(Conductor.Client.Configuration configuration = null) /// The base path public String GetBasePath() { - return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); + return this.Configuration.ApiClient.RestClient.Options.BaseUrl.ToString(); } /// @@ -234,6 +99,18 @@ public Response DeleteUser(string id) return localVarResponse.Data; } + /// + /// Asynchronous Delete a user + /// + /// Thrown when fails to make API call + /// + /// Response + public async ThreadTask.Task DeleteUserAsync(string id) + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(DeleteUserWithHttpInfo(id)); + return localVarResponse.Data; + } + /// /// Delete a user /// @@ -256,28 +133,28 @@ public ApiResponse DeleteUserWithHttpInfo(string id) // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); if (id != null) localVarPathParams.Add("id", this.Configuration.ApiClient.ParameterToString(id)); // path parameter - // authentication (api_key) required + // authentication (api_key) required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken; } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -288,8 +165,8 @@ public ApiResponse DeleteUserWithHttpInfo(string id) } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Response)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Response))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Response)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Response))); } /// @@ -304,6 +181,18 @@ public Object GetGrantedPermissions(string userId) return localVarResponse.Data; } + /// + /// Asynchronous Get the permissions this user has over workflows and tasks + /// + /// Thrown when fails to make API call + /// + /// Object + public async ThreadTask.Task GetGrantedPermissionsAsync(string userId) + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(GetGrantedPermissionsWithHttpInfo(userId)); + return localVarResponse.Data; + } + /// /// Get the permissions this user has over workflows and tasks /// @@ -326,28 +215,28 @@ public ApiResponse GetGrantedPermissionsWithHttpInfo(string userId) // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); if (userId != null) localVarPathParams.Add("userId", this.Configuration.ApiClient.ParameterToString(userId)); // path parameter - // authentication (api_key) required + // authentication (api_key) required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken; } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -358,8 +247,8 @@ public ApiResponse GetGrantedPermissionsWithHttpInfo(string userId) } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); } /// @@ -374,6 +263,18 @@ public Object GetUser(string id) return localVarResponse.Data; } + /// + /// Asynchronous Get a user by id + /// + /// Thrown when fails to make API call + /// + /// Object + public async ThreadTask.Task GetUserAsync(string id) + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(GetUserWithHttpInfo(id)); + return localVarResponse.Data; + } + /// /// Get a user by id /// @@ -396,28 +297,28 @@ public ApiResponse GetUserWithHttpInfo(string id) // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); if (id != null) localVarPathParams.Add("id", this.Configuration.ApiClient.ParameterToString(id)); // path parameter - // authentication (api_key) required + // authentication (api_key) required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken; } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -428,8 +329,8 @@ public ApiResponse GetUserWithHttpInfo(string id) } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); } /// @@ -444,6 +345,18 @@ public List ListUsers(bool? apps = null) return localVarResponse.Data; } + /// + /// Asynchronous Get all users + /// + /// Thrown when fails to make API call + /// (optional, default to false) + /// List<ConductorUser> + public async ThreadTask.Task> ListUsersAsync(bool? apps = null) + { + ApiResponse> localVarResponse = await ThreadTask.Task.FromResult(ListUsersWithHttpInfo(apps)); + return localVarResponse.Data; + } + /// /// Get all users /// @@ -463,28 +376,28 @@ public ApiResponse> ListUsersWithHttpInfo(bool? apps = null) // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); if (apps != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "apps", apps)); // query parameter - // authentication (api_key) required + // authentication (api_key) required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken; } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -495,8 +408,8 @@ public ApiResponse> ListUsersWithHttpInfo(bool? apps = null) } return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (List)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (List)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); } /// @@ -512,6 +425,19 @@ public Object SendInviteEmail(string id, ConductorUser body = null) return localVarResponse.Data; } + /// + /// Asynchronous Send an email with a link to this cluster + /// + /// Thrown when fails to make API call + /// + /// (optional) + /// Object + public async ThreadTask.Task SendInviteEmailAsync(string id, ConductorUser body = null) + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(SendInviteEmailWithHttpInfo(id, body)); + return localVarResponse.Data; + } + /// /// Send an email with a link to this cluster /// @@ -535,14 +461,14 @@ public ApiResponse SendInviteEmailWithHttpInfo(string id, ConductorUser // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -563,9 +489,9 @@ public ApiResponse SendInviteEmailWithHttpInfo(string id, ConductorUser } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -576,8 +502,8 @@ public ApiResponse SendInviteEmailWithHttpInfo(string id, ConductorUser } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); } /// @@ -593,6 +519,19 @@ public Object UpsertUser(UpsertUserRequest body, string id) return localVarResponse.Data; } + /// + /// Asynchronous Create or update a user + /// + /// Thrown when fails to make API call + /// + /// + /// Object + public async ThreadTask.Task UpsertUserAsync(UpsertUserRequest body, string id) + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(UpsertUserWithHttpInfo(body, id)); + return localVarResponse.Data; + } + /// /// Create or update a user /// @@ -619,14 +558,14 @@ public ApiResponse UpsertUserWithHttpInfo(UpsertUserRequest body, string // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -647,9 +586,9 @@ public ApiResponse UpsertUserWithHttpInfo(UpsertUserRequest body, string } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -660,8 +599,8 @@ public ApiResponse UpsertUserWithHttpInfo(UpsertUserRequest body, string } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); } } } diff --git a/Conductor/Api/WorkflowBulkResourceApi.cs b/Conductor/Api/WorkflowBulkResourceApi.cs index dd1622a6..2f1f39d4 100644 --- a/Conductor/Api/WorkflowBulkResourceApi.cs +++ b/Conductor/Api/WorkflowBulkResourceApi.cs @@ -4,128 +4,12 @@ using RestSharp; using Conductor.Client; using Conductor.Client.Models; +using ThreadTask = System.Threading.Tasks; +using conductor_csharp.Api; namespace Conductor.Api { - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IWorkflowBulkResourceApi : IApiAccessor - { - #region Synchronous Operations - /// - /// Pause the list of workflows - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// BulkResponse - BulkResponse PauseWorkflow(List body); - /// - /// Pause the list of workflows - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of BulkResponse - ApiResponse PauseWorkflowWithHttpInfo(List body); - /// - /// Restart the list of completed workflow - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// (optional, default to false) - /// BulkResponse - BulkResponse Restart(List body, bool? useLatestDefinitions = null); - - /// - /// Restart the list of completed workflow - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// (optional, default to false) - /// ApiResponse of BulkResponse - ApiResponse RestartWithHttpInfo(List body, bool? useLatestDefinitions = null); - /// - /// Resume the list of workflows - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// BulkResponse - BulkResponse ResumeWorkflow(List body); - - /// - /// Resume the list of workflows - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of BulkResponse - ApiResponse ResumeWorkflowWithHttpInfo(List body); - /// - /// Retry the last failed task for each workflow from the list - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// BulkResponse - BulkResponse Retry(List body); - - /// - /// Retry the last failed task for each workflow from the list - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of BulkResponse - ApiResponse RetryWithHttpInfo(List body); - /// - /// Terminate workflows execution - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// (optional, default to false) - /// BulkResponse - BulkResponse Terminate(List body, string reason = null, bool? triggerFailureWorkflow = null); - - /// - /// Terminate workflows execution - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// (optional, default to false) - /// ApiResponse of BulkResponse - ApiResponse TerminateWithHttpInfo(List body, string reason = null, bool? triggerFailureWorkflow = null); - #endregion Synchronous Operations - } /// /// Represents a collection of functions to interact with the API endpoints @@ -178,7 +62,7 @@ public WorkflowBulkResourceApi(Conductor.Client.Configuration configuration = nu /// The base path public String GetBasePath() { - return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); + return this.Configuration.ApiClient.RestClient.Options.BaseUrl.ToString(); } /// @@ -215,6 +99,18 @@ public BulkResponse PauseWorkflow(List body) return localVarResponse.Data; } + /// + /// Asynchronous Pause the list of workflows + /// + /// Thrown when fails to make API call + /// + /// BulkResponse + public async ThreadTask.Task PauseWorkflowAsync(List body) + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(PauseWorkflowWithHttpInfo(body)); + return localVarResponse.Data; + } + /// /// Pause the list of workflows /// @@ -237,14 +133,14 @@ public ApiResponse PauseWorkflowWithHttpInfo(List body) // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "*/*" - }; + "*/*" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -264,9 +160,9 @@ public ApiResponse PauseWorkflowWithHttpInfo(List body) } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -277,8 +173,8 @@ public ApiResponse PauseWorkflowWithHttpInfo(List body) } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (BulkResponse)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(BulkResponse))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (BulkResponse)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(BulkResponse))); } /// @@ -294,6 +190,19 @@ public BulkResponse Restart(List body, bool? useLatestDefinitions = null return localVarResponse.Data; } + /// + /// Asynchronous Restart the list of completed workflow + /// + /// Thrown when fails to make API call + /// + /// (optional, default to false) + /// BulkResponse + public async ThreadTask.Task RestartAsync(List body, bool? useLatestDefinitions = null) + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(RestartWithHttpInfo(body, useLatestDefinitions)); + return localVarResponse.Data; + } + /// /// Restart the list of completed workflow /// @@ -317,14 +226,14 @@ public ApiResponse RestartWithHttpInfo(List body, bool? us // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "*/*" - }; + "*/*" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -345,9 +254,9 @@ public ApiResponse RestartWithHttpInfo(List body, bool? us } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -358,8 +267,8 @@ public ApiResponse RestartWithHttpInfo(List body, bool? us } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (BulkResponse)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(BulkResponse))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (BulkResponse)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(BulkResponse))); } /// @@ -374,6 +283,18 @@ public BulkResponse ResumeWorkflow(List body) return localVarResponse.Data; } + /// + /// Asynchronous Resume the list of workflows + /// + /// Thrown when fails to make API call + /// + /// BulkResponse + public async ThreadTask.Task ResumeWorkflowAsync(List body) + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(ResumeWorkflowWithHttpInfo(body)); + return localVarResponse.Data; + } + /// /// Resume the list of workflows /// @@ -396,14 +317,14 @@ public ApiResponse ResumeWorkflowWithHttpInfo(List body) // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "*/*" - }; + "*/*" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -423,9 +344,9 @@ public ApiResponse ResumeWorkflowWithHttpInfo(List body) } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -436,8 +357,8 @@ public ApiResponse ResumeWorkflowWithHttpInfo(List body) } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (BulkResponse)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(BulkResponse))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (BulkResponse)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(BulkResponse))); } /// @@ -452,6 +373,18 @@ public BulkResponse Retry(List body) return localVarResponse.Data; } + /// + /// Asynchronous Retry the last failed task for each workflow from the list + /// + /// Thrown when fails to make API call + /// + /// BulkResponse + public async ThreadTask.Task RetryAsync(List body) + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(RetryWithHttpInfo(body)); + return localVarResponse.Data; + } + /// /// Retry the last failed task for each workflow from the list /// @@ -474,14 +407,14 @@ public ApiResponse RetryWithHttpInfo(List body) // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "*/*" - }; + "*/*" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -501,9 +434,9 @@ public ApiResponse RetryWithHttpInfo(List body) } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -514,8 +447,8 @@ public ApiResponse RetryWithHttpInfo(List body) } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (BulkResponse)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(BulkResponse))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (BulkResponse)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(BulkResponse))); } /// @@ -532,6 +465,20 @@ public BulkResponse Terminate(List body, string reason = null, bool? tri return localVarResponse.Data; } + /// + /// Asynchronous Terminate workflows execution + /// + /// Thrown when fails to make API call + /// + /// (optional) + /// (optional, default to false) + /// BulkResponse + public async ThreadTask.Task TerminateAsync(List body, string reason = null, bool? triggerFailureWorkflow = null) + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(TerminateWithHttpInfo(body, reason, triggerFailureWorkflow)); + return localVarResponse.Data; + } + /// /// Terminate workflows execution /// @@ -556,14 +503,14 @@ public ApiResponse TerminateWithHttpInfo(List body, string // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "*/*" - }; + "*/*" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -585,9 +532,9 @@ public ApiResponse TerminateWithHttpInfo(List body, string } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -598,8 +545,8 @@ public ApiResponse TerminateWithHttpInfo(List body, string } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (BulkResponse)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(BulkResponse))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (BulkResponse)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(BulkResponse))); } } } diff --git a/Conductor/Api/WorkflowResourceApi.cs b/Conductor/Api/WorkflowResourceApi.cs index 409632af..b8baf2c6 100644 --- a/Conductor/Api/WorkflowResourceApi.cs +++ b/Conductor/Api/WorkflowResourceApi.cs @@ -4,722 +4,12 @@ using RestSharp; using Conductor.Client; using Conductor.Client.Models; +using ThreadTask = System.Threading.Tasks; +using conductor_csharp.Api; namespace Conductor.Api { - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IWorkflowResourceApi : IApiAccessor - { - #region Synchronous Operations - /// - /// Starts the decision task for a workflow - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - void Decide(string workflowId); - - /// - /// Starts the decision task for a workflow - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of Object(void) - ApiResponse DecideWithHttpInfo(string workflowId); - /// - /// Removes the workflow from the system - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// (optional, default to true) - /// - void Delete(string workflowId, bool? archiveWorkflow = null); - - /// - /// Removes the workflow from the system - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// (optional, default to true) - /// ApiResponse of Object(void) - ApiResponse DeleteWithHttpInfo(string workflowId, bool? archiveWorkflow = null); - /// - /// Execute a workflow synchronously - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// (optional) - /// WorkflowRun - WorkflowRun ExecuteWorkflow(StartWorkflowRequest body, string requestId, string name, int? version, string waitUntilTaskRef = null); - - /// - /// Update the value of the workflow variables for the given workflow id - /// - /// - /// ApiResponse of Object(void) - Object UpdateWorkflowVariables(Workflow workflow); - /// - /// Execute a workflow synchronously - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// (optional) - /// ApiResponse of WorkflowRun - ApiResponse ExecuteWorkflowWithHttpInfo(StartWorkflowRequest body, string requestId, string name, int? version, string waitUntilTaskRef = null); - /// - /// Gets the workflow by workflow id - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// (optional, default to true) - /// (optional, default to false) - /// Workflow - Workflow GetExecutionStatus(string workflowId, bool? includeTasks = null, bool? summarize = null); - - /// - /// Gets the workflow by workflow id - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// (optional, default to true) - /// (optional, default to false) - /// ApiResponse of Workflow - ApiResponse GetExecutionStatusWithHttpInfo(string workflowId, bool? includeTasks = null, bool? summarize = null); - /// - /// Gets the workflow tasks by workflow id - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// (optional, default to 0) - /// (optional, default to 15) - /// (optional) - /// TaskListSearchResultSummary - TaskListSearchResultSummary GetExecutionStatusTaskList(string workflowId, int? start = null, int? count = null, string status = null); - - /// - /// Gets the workflow tasks by workflow id - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// (optional, default to 0) - /// (optional, default to 15) - /// (optional) - /// ApiResponse of TaskListSearchResultSummary - ApiResponse GetExecutionStatusTaskListWithHttpInfo(string workflowId, int? start = null, int? count = null, string status = null); - /// - /// Get the uri and path of the external storage where the workflow payload is to be stored - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// - /// ExternalStorageLocation - ExternalStorageLocation GetExternalStorageLocation(string path, string operation, string payloadType); - - /// - /// Get the uri and path of the external storage where the workflow payload is to be stored - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// - /// ApiResponse of ExternalStorageLocation - ApiResponse GetExternalStorageLocationWithHttpInfo(string path, string operation, string payloadType); - /// - /// Retrieve all the running workflows - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// (optional, default to 1) - /// (optional) - /// (optional) - /// List<string> - List GetRunningWorkflow(string name, int? version = null, long? startTime = null, long? endTime = null); - - /// - /// Retrieve all the running workflows - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// (optional, default to 1) - /// (optional) - /// (optional) - /// ApiResponse of List<string> - ApiResponse> GetRunningWorkflowWithHttpInfo(string name, int? version = null, long? startTime = null, long? endTime = null); - /// - /// Gets the workflow by workflow id - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// (optional, default to false) - /// (optional, default to false) - /// WorkflowStatus - WorkflowStatus GetWorkflowStatusSummary(string workflowId, bool? includeOutput = null, bool? includeVariables = null); - - /// - /// Gets the workflow by workflow id - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// (optional, default to false) - /// (optional, default to false) - /// ApiResponse of WorkflowStatus - ApiResponse GetWorkflowStatusSummaryWithHttpInfo(string workflowId, bool? includeOutput = null, bool? includeVariables = null); - /// - /// Lists workflows for the given correlation id list - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// (optional, default to false) - /// (optional, default to false) - /// Dictionary<string, List<Workflow>> - Dictionary> GetWorkflows(List body, string name, bool? includeClosed = null, bool? includeTasks = null); - - /// - /// Lists workflows for the given correlation id list - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// (optional, default to false) - /// (optional, default to false) - /// ApiResponse of Dictionary<string, List<Workflow>> - ApiResponse>> GetWorkflowsWithHttpInfo(List body, string name, bool? includeClosed = null, bool? includeTasks = null); - /// - /// Lists workflows for the given correlation id list and workflow name list - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// (optional, default to false) - /// (optional, default to false) - /// Dictionary<string, List<Workflow>> - Dictionary> GetWorkflows(CorrelationIdsSearchRequest body, bool? includeClosed = null, bool? includeTasks = null); - - /// - /// Lists workflows for the given correlation id list and workflow name list - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// (optional, default to false) - /// (optional, default to false) - /// ApiResponse of Dictionary<string, List<Workflow>> - ApiResponse>> GetWorkflowsWithHttpInfo(CorrelationIdsSearchRequest body, bool? includeClosed = null, bool? includeTasks = null); - /// - /// Lists workflows for the given correlation id - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// (optional, default to false) - /// (optional, default to false) - /// List<Workflow> - List GetWorkflows(string name, string correlationId, bool? includeClosed = null, bool? includeTasks = null); - - /// - /// Lists workflows for the given correlation id - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// (optional, default to false) - /// (optional, default to false) - /// ApiResponse of List<Workflow> - ApiResponse> GetWorkflowsWithHttpInfo(string name, string correlationId, bool? includeClosed = null, bool? includeTasks = null); - /// - /// Pauses the workflow - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - void PauseWorkflow(string workflowId); - - /// - /// Pauses the workflow - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of Object(void) - ApiResponse PauseWorkflowWithHttpInfo(string workflowId); - /// - /// Jump workflow execution to given task - /// - /// - /// Jump workflow execution to given task. - /// - /// Thrown when fails to make API call - /// - /// - /// (optional) - /// - void JumpToTask(string workflowId, Dictionary input, string taskReferenceName = null); - - /// - /// Jump workflow execution to given task - /// - /// - /// Jump workflow execution to given task. - /// - /// Thrown when fails to make API call - /// - /// - /// (optional) - /// ApiResponse of Object(void) - ApiResponse JumpToTaskWithHttpInfo(Dictionary body, string workflowId, string taskReferenceName = null); - - /// - /// Reruns the workflow from a specific task - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// string - string Rerun(RerunWorkflowRequest body, string workflowId); - - /// - /// Reruns the workflow from a specific task - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// ApiResponse of string - ApiResponse RerunWithHttpInfo(RerunWorkflowRequest body, string workflowId); - /// - /// Resets callback times of all non-terminal SIMPLE tasks to 0 - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - void ResetWorkflow(string workflowId); - - /// - /// Resets callback times of all non-terminal SIMPLE tasks to 0 - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of Object(void) - ApiResponse ResetWorkflowWithHttpInfo(string workflowId); - /// - /// Restarts a completed workflow - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// (optional, default to false) - /// - void Restart(string workflowId, bool? useLatestDefinitions = null); - - /// - /// Restarts a completed workflow - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// (optional, default to false) - /// ApiResponse of Object(void) - ApiResponse RestartWithHttpInfo(string workflowId, bool? useLatestDefinitions = null); - /// - /// Resumes the workflow - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - void ResumeWorkflow(string workflowId); - - /// - /// Resumes the workflow - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of Object(void) - ApiResponse ResumeWorkflowWithHttpInfo(string workflowId); - /// - /// Retries the last failed task - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// (optional, default to false) - /// - void Retry(string workflowId, bool? resumeSubworkflowTasks = null); - - /// - /// Retries the last failed task - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// (optional, default to false) - /// ApiResponse of Object(void) - ApiResponse RetryWithHttpInfo(string workflowId, bool? resumeSubworkflowTasks = null); - /// - /// Search for workflows based on payload and other parameters - /// - /// - /// use sort options as sort=<field>:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC. - /// - /// Thrown when fails to make API call - /// (optional) - /// (optional, default to 0) - /// (optional, default to 100) - /// (optional) - /// (optional, default to *) - /// (optional) - /// (optional, default to false) - /// ScrollableSearchResultWorkflowSummary - ScrollableSearchResultWorkflowSummary Search(string queryId = null, int? start = null, int? size = null, string sort = null, string freeText = null, string query = null, bool? skipCache = null); - - /// - /// Search for workflows based on payload and other parameters - /// - /// - /// use sort options as sort=<field>:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC. - /// - /// Thrown when fails to make API call - /// (optional) - /// (optional, default to 0) - /// (optional, default to 100) - /// (optional) - /// (optional, default to *) - /// (optional) - /// (optional, default to false) - /// ApiResponse of ScrollableSearchResultWorkflowSummary - ApiResponse SearchWithHttpInfo(string queryId = null, int? start = null, int? size = null, string sort = null, string freeText = null, string query = null, bool? skipCache = null); - /// - /// Search for workflows based on payload and other parameters - /// - /// - /// use sort options as sort=<field>:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC. - /// - /// Thrown when fails to make API call - /// (optional, default to 0) - /// (optional, default to 100) - /// (optional) - /// (optional, default to *) - /// (optional) - /// SearchResultWorkflow - SearchResultWorkflow SearchV2(int? start = null, int? size = null, string sort = null, string freeText = null, string query = null); - - /// - /// Search for workflows based on payload and other parameters - /// - /// - /// use sort options as sort=<field>:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC. - /// - /// Thrown when fails to make API call - /// (optional, default to 0) - /// (optional, default to 100) - /// (optional) - /// (optional, default to *) - /// (optional) - /// ApiResponse of SearchResultWorkflow - ApiResponse SearchV2WithHttpInfo(int? start = null, int? size = null, string sort = null, string freeText = null, string query = null); - /// - /// Search for workflows based on task parameters - /// - /// - /// use sort options as sort=<field>:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC - /// - /// Thrown when fails to make API call - /// (optional, default to 0) - /// (optional, default to 100) - /// (optional) - /// (optional, default to *) - /// (optional) - /// SearchResultWorkflowSummary - SearchResultWorkflowSummary SearchWorkflowsByTasks(int? start = null, int? size = null, string sort = null, string freeText = null, string query = null); - - /// - /// Search for workflows based on task parameters - /// - /// - /// use sort options as sort=<field>:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC - /// - /// Thrown when fails to make API call - /// (optional, default to 0) - /// (optional, default to 100) - /// (optional) - /// (optional, default to *) - /// (optional) - /// ApiResponse of SearchResultWorkflowSummary - ApiResponse SearchWorkflowsByTasksWithHttpInfo(int? start = null, int? size = null, string sort = null, string freeText = null, string query = null); - /// - /// Search for workflows based on task parameters - /// - /// - /// use sort options as sort=<field>:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC - /// - /// Thrown when fails to make API call - /// (optional, default to 0) - /// (optional, default to 100) - /// (optional) - /// (optional, default to *) - /// (optional) - /// SearchResultWorkflow - SearchResultWorkflow SearchWorkflowsByTasksV2(int? start = null, int? size = null, string sort = null, string freeText = null, string query = null); - - /// - /// Search for workflows based on task parameters - /// - /// - /// use sort options as sort=<field>:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC - /// - /// Thrown when fails to make API call - /// (optional, default to 0) - /// (optional, default to 100) - /// (optional) - /// (optional, default to *) - /// (optional) - /// ApiResponse of SearchResultWorkflow - ApiResponse SearchWorkflowsByTasksV2WithHttpInfo(int? start = null, int? size = null, string sort = null, string freeText = null, string query = null); - /// - /// Skips a given task from a current running workflow - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - void SkipTaskFromWorkflow(string workflowId, string taskReferenceName, SkipTaskRequest skipTaskRequest); - - /// - /// Skips a given task from a current running workflow - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// - /// ApiResponse of Object(void) - ApiResponse SkipTaskFromWorkflowWithHttpInfo(string workflowId, string taskReferenceName, SkipTaskRequest skipTaskRequest); - /// - /// Start a new workflow with StartWorkflowRequest, which allows task to be executed in a domain - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// string - string StartWorkflow(StartWorkflowRequest body); - - /// - /// Start a new workflow with StartWorkflowRequest, which allows task to be executed in a domain - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of string - ApiResponse StartWorkflowWithHttpInfo(StartWorkflowRequest body); - /// - /// Start a new workflow. Returns the ID of the workflow instance that can be later used for tracking - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// (optional) - /// (optional) - /// (optional, default to 0) - /// string - string StartWorkflow(string name, Dictionary body, int? version = null, string correlationId = null, int? priority = null); - - /// - /// Start a new workflow. Returns the ID of the workflow instance that can be later used for tracking - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// (optional) - /// (optional) - /// (optional, default to 0) - /// ApiResponse of string - ApiResponse StartWorkflowWithHttpInfo(string name, Dictionary body, int? version = null, string correlationId = null, int? priority = null); - /// - /// Terminate workflow execution - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// (optional, default to false) - /// - void Terminate(string workflowId, string reason = null, bool? triggerFailureWorkflow = null); - - /// - /// Terminate workflow execution - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// (optional, default to false) - /// ApiResponse of Object(void) - ApiResponse TerminateWithHttpInfo(string workflowId, string reason = null, bool? triggerFailureWorkflow = null); - /// - /// Test workflow execution using mock data - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// Workflow - Workflow TestWorkflow(WorkflowTestRequest body); - - /// - /// Test workflow execution using mock data - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of Workflow - ApiResponse TestWorkflowWithHttpInfo(WorkflowTestRequest body); - /// - /// Force upload all completed workflows to document store - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Object - Object UploadCompletedWorkflows(); - /// - /// Force upload all completed workflows to document store - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ApiResponse of Object - ApiResponse UploadCompletedWorkflowsWithHttpInfo(); - #endregion Synchronous Operations - } /// /// Represents a collection of functions to interact with the API endpoints @@ -772,7 +62,7 @@ public WorkflowResourceApi(Conductor.Client.Configuration configuration = null) /// The base path public String GetBasePath() { - return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); + return this.Configuration.ApiClient.RestClient.Options.BaseUrl.ToString(); } /// @@ -808,6 +98,17 @@ public void Decide(string workflowId) DecideWithHttpInfo(workflowId); } + /// + /// Asynchronous Starts the decision task for a workflow + /// + /// Thrown when fails to make API call + /// + /// + public async void DecideAsync(string workflowId) + { + await ThreadTask.Task.FromResult(DecideWithHttpInfo(workflowId)); + } + /// /// Starts the decision task for a workflow /// @@ -830,27 +131,27 @@ public ApiResponse DecideWithHttpInfo(string workflowId) // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - }; + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); if (workflowId != null) localVarPathParams.Add("workflowId", this.Configuration.ApiClient.ParameterToString(workflowId)); // path parameter - // authentication (api_key) required + // authentication (api_key) required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken; } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -861,8 +162,8 @@ public ApiResponse DecideWithHttpInfo(string workflowId) } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); } /// @@ -877,6 +178,16 @@ public void Delete(string workflowId, bool? archiveWorkflow = null) DeleteWithHttpInfo(workflowId, archiveWorkflow); } + /// + /// Asynchronous Removes the workflow from the system + /// + /// + /// + public async void DeleteAsync(string workflowId, bool? archiveWorkflow = null) + { + await ThreadTask.Task.FromResult(DeleteWithHttpInfo(workflowId, archiveWorkflow)); + } + /// /// Removes the workflow from the system /// @@ -900,28 +211,28 @@ public ApiResponse DeleteWithHttpInfo(string workflowId, bool? archiveWo // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - }; + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); if (workflowId != null) localVarPathParams.Add("workflowId", this.Configuration.ApiClient.ParameterToString(workflowId)); // path parameter if (archiveWorkflow != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "archiveWorkflow", archiveWorkflow)); // query parameter - // authentication (api_key) required + // authentication (api_key) required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken; } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -932,8 +243,8 @@ public ApiResponse DeleteWithHttpInfo(string workflowId, bool? archiveWo } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); } /// @@ -953,7 +264,23 @@ public WorkflowRun ExecuteWorkflow(StartWorkflowRequest body, string requestId, } /// - /// Execute a workflow synchronously + /// Asynchronous Execute a workflow + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// (optional) + /// WorkflowRun + public async ThreadTask.Task ExecuteWorkflowAsync(StartWorkflowRequest body, string requestId, string name, int? version, string waitUntilTaskRef = null) + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(ExecuteWorkflowWithHttpInfo(body, requestId, name, version, waitUntilTaskRef)); + return localVarResponse.Data; + } + + /// + /// Execute a workflow /// /// Thrown when fails to make API call /// @@ -987,14 +314,14 @@ public ApiResponse ExecuteWorkflowWithHttpInfo(StartWorkflowRequest // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -1018,9 +345,9 @@ public ApiResponse ExecuteWorkflowWithHttpInfo(StartWorkflowRequest } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1031,16 +358,37 @@ public ApiResponse ExecuteWorkflowWithHttpInfo(StartWorkflowRequest } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (WorkflowRun)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(WorkflowRun))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (WorkflowRun)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(WorkflowRun))); } + /// + /// Update the Workflow variables synchronously + /// + /// + /// public Object UpdateWorkflowVariables(Workflow workflow) { ApiResponse localVarResponse = UpdateWorkflowVariablesWithHttpInfo(workflow); return localVarResponse.Data; } + /// + /// Asynchronous Update the Workflow variables + /// + /// + /// + public async ThreadTask.Task UpdateWorkflowVariablesAsync(Workflow workflow) + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(UpdateWorkflowVariablesWithHttpInfo(workflow)); + return localVarResponse.Data; + } + + /// + /// Update the Workflow variables + /// + /// + /// public ApiResponse UpdateWorkflowVariablesWithHttpInfo(Workflow workflow) { // verify the required parameter 'body' is set @@ -1063,14 +411,14 @@ public ApiResponse UpdateWorkflowVariablesWithHttpInfo(Workflow workflow // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "*/*" - }; + "*/*" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -1086,9 +434,9 @@ public ApiResponse UpdateWorkflowVariablesWithHttpInfo(Workflow workflow localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken; } - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) @@ -1098,8 +446,8 @@ public ApiResponse UpdateWorkflowVariablesWithHttpInfo(Workflow workflow } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); } /// @@ -1116,6 +464,22 @@ public Workflow GetExecutionStatus(string workflowId, bool? includeTasks = null, return localVarResponse.Data; } + + /// + /// Asynchronous Gets the workflow by workflow id + /// + /// Thrown when fails to make API call + /// + /// (optional, default to true) + /// (optional, default to false) + /// Workflow + public async ThreadTask.Task GetExecutionStatusAsync(string workflowId, bool? includeTasks = null, bool? summarize = null) + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(GetExecutionStatusWithHttpInfo(workflowId, includeTasks, summarize)); + return localVarResponse.Data; + } + + /// /// Gets the workflow by workflow id /// @@ -1140,13 +504,13 @@ public ApiResponse GetExecutionStatusWithHttpInfo(string workflowId, b // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "*/*" - }; + "*/*" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -1154,16 +518,16 @@ public ApiResponse GetExecutionStatusWithHttpInfo(string workflowId, b if (workflowId != null) localVarPathParams.Add("workflowId", this.Configuration.ApiClient.ParameterToString(workflowId)); // path parameter if (includeTasks != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "includeTasks", includeTasks)); // query parameter if (summarize != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "summarize", summarize)); // query parameter - // authentication (api_key) required + // authentication (api_key) required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken; } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1174,8 +538,8 @@ public ApiResponse GetExecutionStatusWithHttpInfo(string workflowId, b } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Workflow)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Workflow))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Workflow)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Workflow))); } /// @@ -1193,6 +557,21 @@ public TaskListSearchResultSummary GetExecutionStatusTaskList(string workflowId, return localVarResponse.Data; } + /// + /// Asynchronous Gets the workflow tasks by workflow id + /// + /// Thrown when fails to make API call + /// + /// (optional, default to 0) + /// (optional, default to 15) + /// (optional) + /// TaskListSearchResultSummary + public async ThreadTask.Task GetExecutionStatusTaskListAsync(string workflowId, int? start = null, int? count = null, string status = null) + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(GetExecutionStatusTaskListWithHttpInfo(workflowId, start, count, status)); + return localVarResponse.Data; + } + /// /// Gets the workflow tasks by workflow id /// @@ -1218,13 +597,13 @@ public ApiResponse GetExecutionStatusTaskListWithHt // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "*/*" - }; + "*/*" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -1233,16 +612,16 @@ public ApiResponse GetExecutionStatusTaskListWithHt if (start != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "start", start)); // query parameter if (count != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "count", count)); // query parameter if (status != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "status", status)); // query parameter - // authentication (api_key) required + // authentication (api_key) required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken; } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1253,21 +632,35 @@ public ApiResponse GetExecutionStatusTaskListWithHt } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (TaskListSearchResultSummary)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(TaskListSearchResultSummary))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (TaskListSearchResultSummary)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(TaskListSearchResultSummary))); + } + + /// + /// Get the uri and path of the external storage where the workflow payload is to be stored + /// + /// Thrown when fails to make API call + /// + /// + /// + /// ExternalStorageLocation + public ExternalStorageLocation GetExternalStorageLocation(string path, string operation, string payloadType) + { + ApiResponse localVarResponse = GetExternalStorageLocationWithHttpInfo(path, operation, payloadType); + return localVarResponse.Data; } /// - /// Get the uri and path of the external storage where the workflow payload is to be stored + /// Asynchronous Get the uri and path of the external storage where the workflow payload is to be stored /// /// Thrown when fails to make API call /// /// /// /// ExternalStorageLocation - public ExternalStorageLocation GetExternalStorageLocation(string path, string operation, string payloadType) + public async ThreadTask.Task GetExternalStorageLocationAsync(string path, string operation, string payloadType) { - ApiResponse localVarResponse = GetExternalStorageLocationWithHttpInfo(path, operation, payloadType); + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(GetExternalStorageLocationWithHttpInfo(path, operation, payloadType)); return localVarResponse.Data; } @@ -1301,13 +694,13 @@ public ApiResponse GetExternalStorageLocationWithHttpIn // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "*/*" - }; + "*/*" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -1315,16 +708,16 @@ public ApiResponse GetExternalStorageLocationWithHttpIn if (path != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "path", path)); // query parameter if (operation != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "operation", operation)); // query parameter if (payloadType != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "payloadType", payloadType)); // query parameter - // authentication (api_key) required + // authentication (api_key) required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken; } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1335,8 +728,8 @@ public ApiResponse GetExternalStorageLocationWithHttpIn } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (ExternalStorageLocation)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ExternalStorageLocation))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (ExternalStorageLocation)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ExternalStorageLocation))); } /// @@ -1354,6 +747,21 @@ public List GetRunningWorkflow(string name, int? version = null, long? s return localVarResponse.Data; } + /// + /// Asynchronous Retrieve all the running workflows + /// + /// Thrown when fails to make API call + /// + /// (optional, default to 1) + /// (optional) + /// (optional) + /// List<string> + public async ThreadTask.Task> GetRunningWorkflowAsync(string name, int? version = null, long? startTime = null, long? endTime = null) + { + ApiResponse> localVarResponse = await ThreadTask.Task.FromResult(GetRunningWorkflowWithHttpInfo(name, version, startTime, endTime)); + return localVarResponse.Data; + } + /// /// Retrieve all the running workflows /// @@ -1379,13 +787,13 @@ public ApiResponse> GetRunningWorkflowWithHttpInfo(string name, int // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "*/*" - }; + "*/*" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -1394,16 +802,16 @@ public ApiResponse> GetRunningWorkflowWithHttpInfo(string name, int if (version != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "version", version)); // query parameter if (startTime != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "startTime", startTime)); // query parameter if (endTime != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "endTime", endTime)); // query parameter - // authentication (api_key) required + // authentication (api_key) required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken; } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1414,8 +822,8 @@ public ApiResponse> GetRunningWorkflowWithHttpInfo(string name, int } return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (List)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (List)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); } /// @@ -1432,6 +840,20 @@ public WorkflowStatus GetWorkflowStatusSummary(string workflowId, bool? includeO return localVarResponse.Data; } + /// + /// Asynchronous Gets the workflow by workflow id + /// + /// Thrown when fails to make API call + /// + /// (optional, default to false) + /// (optional, default to false) + /// WorkflowStatus + public async ThreadTask.Task GetWorkflowStatusSummaryAsync(string workflowId, bool? includeOutput = null, bool? includeVariables = null) + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(GetWorkflowStatusSummaryWithHttpInfo(workflowId, includeOutput, includeVariables)); + return localVarResponse.Data; + } + /// /// Gets the workflow by workflow id /// @@ -1456,13 +878,13 @@ public ApiResponse GetWorkflowStatusSummaryWithHttpInfo(string w // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "*/*" - }; + "*/*" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -1470,16 +892,16 @@ public ApiResponse GetWorkflowStatusSummaryWithHttpInfo(string w if (workflowId != null) localVarPathParams.Add("workflowId", this.Configuration.ApiClient.ParameterToString(workflowId)); // path parameter if (includeOutput != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "includeOutput", includeOutput)); // query parameter if (includeVariables != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "includeVariables", includeVariables)); // query parameter - // authentication (api_key) required + // authentication (api_key) required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken; } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1490,8 +912,8 @@ public ApiResponse GetWorkflowStatusSummaryWithHttpInfo(string w } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (WorkflowStatus)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(WorkflowStatus))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (WorkflowStatus)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(WorkflowStatus))); } /// @@ -1509,6 +931,21 @@ public Dictionary> GetWorkflows(List body, string return localVarResponse.Data; } + /// + /// Asynchronous Lists workflows for the given correlation id list + /// + /// Thrown when fails to make API call + /// + /// + /// (optional, default to false) + /// (optional, default to false) + /// Dictionary<string, List<Workflow>> + public async ThreadTask.Task>> GetWorkflowsAsync(List body, string name, bool? includeClosed = null, bool? includeTasks = null) + { + ApiResponse>> localVarResponse = await ThreadTask.Task.FromResult(GetWorkflowsWithHttpInfo(body, name, includeClosed, includeTasks)); + return localVarResponse.Data; + } + /// /// Lists workflows for the given correlation id list /// @@ -1537,14 +974,14 @@ public ApiResponse>> GetWorkflowsWithHttpInfo( // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "*/*" - }; + "*/*" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -1567,9 +1004,9 @@ public ApiResponse>> GetWorkflowsWithHttpInfo( } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1580,8 +1017,8 @@ public ApiResponse>> GetWorkflowsWithHttpInfo( } return new ApiResponse>>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Dictionary>)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Dictionary>))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Dictionary>)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Dictionary>))); } /// @@ -1598,6 +1035,20 @@ public Dictionary> GetWorkflows(CorrelationIdsSearchReque return localVarResponse.Data; } + /// + /// Asynchronous Lists workflows for the given correlation id list and workflow name list + /// + /// Thrown when fails to make API call + /// + /// (optional, default to false) + /// (optional, default to false) + /// Dictionary<string, List<Workflow>> + public async ThreadTask.Task>> GetWorkflowsAsync(CorrelationIdsSearchRequest body, bool? includeClosed = null, bool? includeTasks = null) + { + ApiResponse>> localVarResponse = await ThreadTask.Task.FromResult(GetWorkflowsWithHttpInfo(body, includeClosed, includeTasks)); + return localVarResponse.Data; + } + /// /// Lists workflows for the given correlation id list and workflow name list /// @@ -1622,14 +1073,14 @@ public ApiResponse>> GetWorkflowsWithHttpInfo( // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "*/*" - }; + "*/*" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -1651,9 +1102,9 @@ public ApiResponse>> GetWorkflowsWithHttpInfo( } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1664,8 +1115,8 @@ public ApiResponse>> GetWorkflowsWithHttpInfo( } return new ApiResponse>>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Dictionary>)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Dictionary>))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Dictionary>)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Dictionary>))); } /// @@ -1683,6 +1134,21 @@ public List GetWorkflows(string name, string correlationId, bool? incl return localVarResponse.Data; } + /// + /// Asynchronous Lists workflows for the given correlation id + /// + /// Thrown when fails to make API call + /// + /// + /// (optional, default to false) + /// (optional, default to false) + /// List<Workflow> + public async ThreadTask.Task> GetWorkflowsAsync(string name, string correlationId, bool? includeClosed = null, bool? includeTasks = null) + { + ApiResponse> localVarResponse = await ThreadTask.Task.FromResult(GetWorkflowsWithHttpInfo(name, correlationId, includeClosed, includeTasks)); + return localVarResponse.Data; + } + /// /// Lists workflows for the given correlation id /// @@ -1711,13 +1177,13 @@ public ApiResponse> GetWorkflowsWithHttpInfo(string name, string // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "*/*" - }; + "*/*" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -1726,16 +1192,16 @@ public ApiResponse> GetWorkflowsWithHttpInfo(string name, string if (correlationId != null) localVarPathParams.Add("correlationId", this.Configuration.ApiClient.ParameterToString(correlationId)); // path parameter if (includeClosed != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "includeClosed", includeClosed)); // query parameter if (includeTasks != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "includeTasks", includeTasks)); // query parameter - // authentication (api_key) required + // authentication (api_key) required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken; } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1746,8 +1212,8 @@ public ApiResponse> GetWorkflowsWithHttpInfo(string name, string } return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (List)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (List)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); } /// @@ -1761,6 +1227,17 @@ public void PauseWorkflow(string workflowId) PauseWorkflowWithHttpInfo(workflowId); } + /// + /// Asynchronous Pauses the workflow + /// + /// Thrown when fails to make API call + /// + /// + public async void PauseWorkflowAsync(string workflowId) + { + await ThreadTask.Task.FromResult(PauseWorkflowWithHttpInfo(workflowId)); + } + /// /// Pauses the workflow /// @@ -1783,27 +1260,27 @@ public ApiResponse PauseWorkflowWithHttpInfo(string workflowId) // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - }; + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); if (workflowId != null) localVarPathParams.Add("workflowId", this.Configuration.ApiClient.ParameterToString(workflowId)); // path parameter - // authentication (api_key) required + // authentication (api_key) required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken; } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1814,8 +1291,8 @@ public ApiResponse PauseWorkflowWithHttpInfo(string workflowId) } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); } @@ -1832,6 +1309,19 @@ public void JumpToTask(string workflowId, Dictionary input, stri JumpToTaskWithHttpInfo(input, workflowId, taskReferenceName); } + /// + /// Asynchronous Jump workflow execution to given task Jump workflow execution to given task. + /// + /// Thrown when fails to make API call + /// + /// + /// (optional) + /// + public async void JumpToTaskAsync(string workflowId, Dictionary input, string taskReferenceName = null) + { + await ThreadTask.Task.FromResult(JumpToTaskWithHttpInfo(input, workflowId, taskReferenceName)); + } + /// /// Jump workflow execution to given task Jump workflow execution to given task. @@ -1860,13 +1350,13 @@ public ApiResponse JumpToTaskWithHttpInfo(Dictionary bod // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - }; + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -1888,9 +1378,9 @@ public ApiResponse JumpToTaskWithHttpInfo(Dictionary bod } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1901,8 +1391,8 @@ public ApiResponse JumpToTaskWithHttpInfo(Dictionary bod } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); } @@ -1919,6 +1409,19 @@ public string Rerun(RerunWorkflowRequest body, string workflowId) return localVarResponse.Data; } + /// + /// Asynchonous Reruns the workflow from a specific task + /// + /// Thrown when fails to make API call + /// + /// + /// string + public async ThreadTask.Task RerunAsync(RerunWorkflowRequest body, string workflowId) + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(RerunWithHttpInfo(body, workflowId)); + return localVarResponse.Data; + } + /// /// Reruns the workflow from a specific task /// @@ -1945,14 +1448,14 @@ public ApiResponse RerunWithHttpInfo(RerunWorkflowRequest body, string w // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "text/plain" - }; + "text/plain" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -1973,9 +1476,9 @@ public ApiResponse RerunWithHttpInfo(RerunWorkflowRequest body, string w } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1986,8 +1489,8 @@ public ApiResponse RerunWithHttpInfo(RerunWorkflowRequest body, string w } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (string)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(string))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (string)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(string))); } /// @@ -2001,6 +1504,17 @@ public void ResetWorkflow(string workflowId) ResetWorkflowWithHttpInfo(workflowId); } + /// + /// Asynchronous Resets callback times of all non-terminal SIMPLE tasks to 0 + /// + /// Thrown when fails to make API call + /// + /// + public async void ResetWorkflowAsync(string workflowId) + { + await ThreadTask.Task.FromResult(ResetWorkflowWithHttpInfo(workflowId)); + } + /// /// Resets callback times of all non-terminal SIMPLE tasks to 0 /// @@ -2023,27 +1537,27 @@ public ApiResponse ResetWorkflowWithHttpInfo(string workflowId) // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - }; + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); if (workflowId != null) localVarPathParams.Add("workflowId", this.Configuration.ApiClient.ParameterToString(workflowId)); // path parameter - // authentication (api_key) required + // authentication (api_key) required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken; } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -2054,8 +1568,8 @@ public ApiResponse ResetWorkflowWithHttpInfo(string workflowId) } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); } /// @@ -2070,6 +1584,18 @@ public void Restart(string workflowId, bool? useLatestDefinitions = null) RestartWithHttpInfo(workflowId, useLatestDefinitions); } + /// + /// Asynchronous Restarts a completed workflow + /// + /// Thrown when fails to make API call + /// + /// (optional, default to false) + /// + public async void RestartAsync(string workflowId, bool? useLatestDefinitions = null) + { + await ThreadTask.Task.FromResult(RestartWithHttpInfo(workflowId, useLatestDefinitions)); + } + /// /// Restarts a completed workflow /// @@ -2093,28 +1619,28 @@ public ApiResponse RestartWithHttpInfo(string workflowId, bool? useLates // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - }; + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); if (workflowId != null) localVarPathParams.Add("workflowId", this.Configuration.ApiClient.ParameterToString(workflowId)); // path parameter if (useLatestDefinitions != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "useLatestDefinitions", useLatestDefinitions)); // query parameter - // authentication (api_key) required + // authentication (api_key) required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken; } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -2125,8 +1651,8 @@ public ApiResponse RestartWithHttpInfo(string workflowId, bool? useLates } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); } /// @@ -2140,6 +1666,17 @@ public void ResumeWorkflow(string workflowId) ResumeWorkflowWithHttpInfo(workflowId); } + /// + /// Asynchronous Resumes the workflow + /// + /// Thrown when fails to make API call + /// + /// + public async void ResumeWorkflowAsync(string workflowId) + { + await ThreadTask.Task.FromResult(ResumeWorkflowWithHttpInfo(workflowId)); + } + /// /// Resumes the workflow /// @@ -2162,27 +1699,27 @@ public ApiResponse ResumeWorkflowWithHttpInfo(string workflowId) // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - }; + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); if (workflowId != null) localVarPathParams.Add("workflowId", this.Configuration.ApiClient.ParameterToString(workflowId)); // path parameter - // authentication (api_key) required + // authentication (api_key) required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken; } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -2193,8 +1730,8 @@ public ApiResponse ResumeWorkflowWithHttpInfo(string workflowId) } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); } /// @@ -2209,6 +1746,18 @@ public void Retry(string workflowId, bool? resumeSubworkflowTasks = null) RetryWithHttpInfo(workflowId, resumeSubworkflowTasks); } + /// + /// Asynchonous Retries the last failed task + /// + /// Thrown when fails to make API call + /// + /// (optional, default to false) + /// + public async void RetryAsync(string workflowId, bool? resumeSubworkflowTasks = null) + { + await ThreadTask.Task.FromResult(RetryWithHttpInfo(workflowId, resumeSubworkflowTasks)); + } + /// /// Retries the last failed task /// @@ -2232,28 +1781,28 @@ public ApiResponse RetryWithHttpInfo(string workflowId, bool? resumeSubw // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - }; + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); if (workflowId != null) localVarPathParams.Add("workflowId", this.Configuration.ApiClient.ParameterToString(workflowId)); // path parameter if (resumeSubworkflowTasks != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "resumeSubworkflowTasks", resumeSubworkflowTasks)); // query parameter - // authentication (api_key) required + // authentication (api_key) required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken; } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -2264,8 +1813,8 @@ public ApiResponse RetryWithHttpInfo(string workflowId, bool? resumeSubw } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); } /// @@ -2286,6 +1835,24 @@ public ScrollableSearchResultWorkflowSummary Search(string queryId = null, int? return localVarResponse.Data; } + /// + /// Asynchonous Search for workflows based on payload and other parameters use sort options as sort=<field>:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC. + /// + /// Thrown when fails to make API call + /// (optional) + /// (optional, default to 0) + /// (optional, default to 100) + /// (optional) + /// (optional, default to *) + /// (optional) + /// (optional, default to false) + /// ScrollableSearchResultWorkflowSummary + public async ThreadTask.Task SearchAsync(string queryId = null, int? start = null, int? size = null, string sort = null, string freeText = null, string query = null, bool? skipCache = null) + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(SearchWithHttpInfo(queryId, start, size, sort, freeText, query, skipCache)); + return localVarResponse.Data; + } + /// /// Search for workflows based on payload and other parameters use sort options as sort=<field>:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC. /// @@ -2311,13 +1878,13 @@ public ApiResponse SearchWithHttpInfo(str // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "*/*" - }; + "*/*" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -2329,16 +1896,16 @@ public ApiResponse SearchWithHttpInfo(str if (freeText != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "freeText", freeText)); // query parameter if (query != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "query", query)); // query parameter if (skipCache != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "skipCache", skipCache)); // query parameter - // authentication (api_key) required + // authentication (api_key) required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken; } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -2349,8 +1916,8 @@ public ApiResponse SearchWithHttpInfo(str } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (ScrollableSearchResultWorkflowSummary)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ScrollableSearchResultWorkflowSummary))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (ScrollableSearchResultWorkflowSummary)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ScrollableSearchResultWorkflowSummary))); } /// @@ -2369,6 +1936,22 @@ public SearchResultWorkflow SearchV2(int? start = null, int? size = null, string return localVarResponse.Data; } + /// + /// Asynchronous Search for workflows based on payload and other parameters use sort options as sort=<field>:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC. + /// + /// Thrown when fails to make API call + /// (optional, default to 0) + /// (optional, default to 100) + /// (optional) + /// (optional, default to *) + /// (optional) + /// SearchResultWorkflow + public async ThreadTask.Task SearchV2Async(int? start = null, int? size = null, string sort = null, string freeText = null, string query = null) + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(SearchV2WithHttpInfo(start, size, sort, freeText, query)); + return localVarResponse.Data; + } + /// /// Search for workflows based on payload and other parameters use sort options as sort=<field>:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC. /// @@ -2392,13 +1975,13 @@ public ApiResponse SearchV2WithHttpInfo(int? start = null, // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "*/*" - }; + "*/*" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -2408,16 +1991,16 @@ public ApiResponse SearchV2WithHttpInfo(int? start = null, if (sort != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "sort", sort)); // query parameter if (freeText != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "freeText", freeText)); // query parameter if (query != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "query", query)); // query parameter - // authentication (api_key) required + // authentication (api_key) required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken; } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -2428,8 +2011,8 @@ public ApiResponse SearchV2WithHttpInfo(int? start = null, } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (SearchResultWorkflow)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(SearchResultWorkflow))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (SearchResultWorkflow)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(SearchResultWorkflow))); } /// @@ -2448,6 +2031,22 @@ public SearchResultWorkflowSummary SearchWorkflowsByTasks(int? start = null, int return localVarResponse.Data; } + /// + /// Asynchronous Search for workflows based on task parameters use sort options as sort=<field>:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC + /// + /// Thrown when fails to make API call + /// (optional, default to 0) + /// (optional, default to 100) + /// (optional) + /// (optional, default to *) + /// (optional) + /// SearchResultWorkflowSummary + public async ThreadTask.Task SearchWorkflowsByTasksAsync(int? start = null, int? size = null, string sort = null, string freeText = null, string query = null) + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(SearchWorkflowsByTasksWithHttpInfo(start, size, sort, freeText, query)); + return localVarResponse.Data; + } + /// /// Search for workflows based on task parameters use sort options as sort=<field>:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC /// @@ -2471,13 +2070,13 @@ public ApiResponse SearchWorkflowsByTasksWithHttpIn // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "*/*" - }; + "*/*" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -2487,16 +2086,16 @@ public ApiResponse SearchWorkflowsByTasksWithHttpIn if (sort != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "sort", sort)); // query parameter if (freeText != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "freeText", freeText)); // query parameter if (query != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "query", query)); // query parameter - // authentication (api_key) required + // authentication (api_key) required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken; } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -2507,8 +2106,8 @@ public ApiResponse SearchWorkflowsByTasksWithHttpIn } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (SearchResultWorkflowSummary)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(SearchResultWorkflowSummary))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (SearchResultWorkflowSummary)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(SearchResultWorkflowSummary))); } /// @@ -2527,6 +2126,22 @@ public SearchResultWorkflow SearchWorkflowsByTasksV2(int? start = null, int? siz return localVarResponse.Data; } + /// + /// Asynchronous Search for workflows based on task parameters use sort options as sort=<field>:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC + /// + /// Thrown when fails to make API call + /// (optional, default to 0) + /// (optional, default to 100) + /// (optional) + /// (optional, default to *) + /// (optional) + /// SearchResultWorkflow + public async ThreadTask.Task SearchWorkflowsByTasksV2Async(int? start = null, int? size = null, string sort = null, string freeText = null, string query = null) + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(SearchWorkflowsByTasksV2WithHttpInfo(start, size, sort, freeText, query)); + return localVarResponse.Data; + } + /// /// Search for workflows based on task parameters use sort options as sort=<field>:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC /// @@ -2550,13 +2165,13 @@ public ApiResponse SearchWorkflowsByTasksV2WithHttpInfo(in // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "*/*" - }; + "*/*" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -2566,16 +2181,16 @@ public ApiResponse SearchWorkflowsByTasksV2WithHttpInfo(in if (sort != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "sort", sort)); // query parameter if (freeText != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "freeText", freeText)); // query parameter if (query != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "query", query)); // query parameter - // authentication (api_key) required + // authentication (api_key) required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken; } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -2586,8 +2201,8 @@ public ApiResponse SearchWorkflowsByTasksV2WithHttpInfo(in } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (SearchResultWorkflow)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(SearchResultWorkflow))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (SearchResultWorkflow)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(SearchResultWorkflow))); } /// @@ -2603,6 +2218,19 @@ public void SkipTaskFromWorkflow(string workflowId, string taskReferenceName, Sk SkipTaskFromWorkflowWithHttpInfo(workflowId, taskReferenceName, skipTaskRequest); } + /// + /// Asynchronous Skips a given task from a current running workflow + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + public async void SkipTaskFromWorkflowAsync(string workflowId, string taskReferenceName, SkipTaskRequest skipTaskRequest) + { + await ThreadTask.Task.FromResult(SkipTaskFromWorkflowWithHttpInfo(workflowId, taskReferenceName, skipTaskRequest)); + } + /// /// Skips a given task from a current running workflow /// @@ -2633,12 +2261,12 @@ public ApiResponse SkipTaskFromWorkflowWithHttpInfo(string workflowId, s // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - }; + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -2646,16 +2274,16 @@ public ApiResponse SkipTaskFromWorkflowWithHttpInfo(string workflowId, s if (workflowId != null) localVarPathParams.Add("workflowId", this.Configuration.ApiClient.ParameterToString(workflowId)); // path parameter if (taskReferenceName != null) localVarPathParams.Add("taskReferenceName", this.Configuration.ApiClient.ParameterToString(taskReferenceName)); // path parameter if (skipTaskRequest != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "skipTaskRequest", skipTaskRequest)); // query parameter - // authentication (api_key) required + // authentication (api_key) required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken; } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -2666,8 +2294,8 @@ public ApiResponse SkipTaskFromWorkflowWithHttpInfo(string workflowId, s } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); } /// @@ -2682,6 +2310,18 @@ public string StartWorkflow(StartWorkflowRequest body) return localVarResponse.Data; } + /// + /// Asynchronous Start a new workflow with StartWorkflowRequest, which allows task to be executed in a domain + /// + /// Thrown when fails to make API call + /// + /// string + public async ThreadTask.Task StartWorkflowAsync(StartWorkflowRequest body) + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(StartWorkflowWithHttpInfo(body)); + return localVarResponse.Data; + } + /// /// Start a new workflow with StartWorkflowRequest, which allows task to be executed in a domain /// @@ -2704,14 +2344,14 @@ public ApiResponse StartWorkflowWithHttpInfo(StartWorkflowRequest body) // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "text/plain" - }; + "text/plain" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -2731,9 +2371,9 @@ public ApiResponse StartWorkflowWithHttpInfo(StartWorkflowRequest body) } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -2744,8 +2384,8 @@ public ApiResponse StartWorkflowWithHttpInfo(StartWorkflowRequest body) } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (string)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(string))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (string)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(string))); } /// @@ -2764,6 +2404,22 @@ public string StartWorkflow(string name, Dictionary body, int? v return localVarResponse.Data; } + /// + /// Asynchronous Start a new workflow. Returns the ID of the workflow instance that can be later used for tracking + /// + /// Thrown when fails to make API call + /// + /// + /// (optional) + /// (optional) + /// (optional, default to 0) + /// string + public async ThreadTask.Task StartWorkflowAsync(string name, Dictionary body, int? version = null, string correlationId = null, int? priority = null) + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(StartWorkflowWithHttpInfo(name, body, version, correlationId, priority)); + return localVarResponse.Data; + } + /// /// Start a new workflow. Returns the ID of the workflow instance that can be later used for tracking /// @@ -2793,14 +2449,14 @@ public ApiResponse StartWorkflowWithHttpInfo(string name, Dictionary StartWorkflowWithHttpInfo(string name, Dictionary StartWorkflowWithHttpInfo(string name, Dictionary(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (string)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(string))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (string)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(string))); } /// @@ -2854,6 +2510,19 @@ public void Terminate(string workflowId, string reason = null, bool? triggerFail TerminateWithHttpInfo(workflowId, reason, triggerFailureWorkflow); } + /// + /// Asynchronous Terminate workflow execution + /// + /// Thrown when fails to make API call + /// + /// (optional) + /// (optional, default to false) + /// + public async void TerminateAsync(string workflowId, string reason = null, bool? triggerFailureWorkflow = null) + { + await ThreadTask.Task.FromResult(TerminateWithHttpInfo(workflowId, reason, triggerFailureWorkflow)); + } + /// /// Terminate workflow execution /// @@ -2878,12 +2547,12 @@ public ApiResponse TerminateWithHttpInfo(string workflowId, string reaso // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - }; + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -2891,16 +2560,16 @@ public ApiResponse TerminateWithHttpInfo(string workflowId, string reaso if (workflowId != null) localVarPathParams.Add("workflowId", this.Configuration.ApiClient.ParameterToString(workflowId)); // path parameter if (reason != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "reason", reason)); // query parameter if (triggerFailureWorkflow != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "triggerFailureWorkflow", triggerFailureWorkflow)); // query parameter - // authentication (api_key) required + // authentication (api_key) required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken; } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -2911,8 +2580,8 @@ public ApiResponse TerminateWithHttpInfo(string workflowId, string reaso } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); } /// @@ -2927,6 +2596,18 @@ public Workflow TestWorkflow(WorkflowTestRequest body) return localVarResponse.Data; } + /// + /// Asynchronous Test workflow execution using mock data + /// + /// Thrown when fails to make API call + /// + /// Workflow + public async ThreadTask.Task TestWorkflowAsync(WorkflowTestRequest body) + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(TestWorkflowWithHttpInfo(body)); + return localVarResponse.Data; + } + /// /// Test workflow execution using mock data /// @@ -2949,14 +2630,14 @@ public ApiResponse TestWorkflowWithHttpInfo(WorkflowTestRequest body) // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; + "application/json" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -2976,9 +2657,9 @@ public ApiResponse TestWorkflowWithHttpInfo(WorkflowTestRequest body) } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -2989,8 +2670,8 @@ public ApiResponse TestWorkflowWithHttpInfo(WorkflowTestRequest body) } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Workflow)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Workflow))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Workflow)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Workflow))); } /// @@ -3004,6 +2685,16 @@ public Object UploadCompletedWorkflows() return localVarResponse.Data; } + /// + /// Asynchronous Force upload all completed workflows to document store + /// + /// + public async ThreadTask.Task UploadCompletedWorkflowsAsync() + { + ApiResponse localVarResponse = await ThreadTask.Task.FromResult(UploadCompletedWorkflowsWithHttpInfo()); + return localVarResponse.Data; + } + /// /// Force upload all completed workflows to document store /// @@ -3022,13 +2713,13 @@ public ApiResponse UploadCompletedWorkflowsWithHttpInfo() // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { - }; + }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { - "*/*" - }; + "*/*" + }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); @@ -3040,9 +2731,9 @@ public ApiResponse UploadCompletedWorkflowsWithHttpInfo() } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -3053,8 +2744,8 @@ public ApiResponse UploadCompletedWorkflowsWithHttpInfo() } return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); } } -} +} \ No newline at end of file diff --git a/Conductor/Client/ApiClient.cs b/Conductor/Client/ApiClient.cs index d8a78589..84a2360b 100644 --- a/Conductor/Client/ApiClient.cs +++ b/Conductor/Client/ApiClient.cs @@ -2,12 +2,9 @@ using System; using System.Collections; using System.Collections.Generic; -using System.Globalization; using System.Text.RegularExpressions; using System.IO; -using System.Web; using System.Linq; -using System.Net; using System.Text; using Newtonsoft.Json; using RestSharp; @@ -28,23 +25,23 @@ public partial class ApiClient /// Allows for extending request processing for generated code. /// /// The RestSharp request object - partial void InterceptRequest(IRestRequest request); + partial void InterceptRequest(RestRequest request); /// /// Allows for extending response processing for generated code. /// /// The RestSharp request object /// The RestSharp response object - partial void InterceptResponse(IRestRequest request, IRestResponse response); + partial void InterceptResponse(RestRequest request, RestResponse response); /// /// Initializes a new instance of the class /// with default configuration. /// - public ApiClient() + public ApiClient(int timeOut) { Configuration = Conductor.Client.Configuration.Default; - RestClient = new RestClient("https://play.orkes.io/api"); + RestClient = new RestClient(options: new RestClientOptions() { BaseUrl = new Uri("https://play.orkes.io/api"), MaxTimeout = timeOut }); } /// @@ -90,6 +87,25 @@ public ApiClient(String basePath = "https://play.orkes.io/api") /// An instance of the RestClient public RestClient RestClient { get; set; } + /// + /// To make stream into bytes + /// + /// + /// + private byte[] GetBytes(Stream input) + { + byte[] buffer = new byte[16 * 1024]; + using (MemoryStream ms = new MemoryStream()) + { + int read; + while ((read = input.Read(buffer, 0, buffer.Length)) > 0) + { + ms.Write(buffer, 0, read); + } + return ms.ToArray(); + } + } + // Creates and sets up a RestRequest prior to a call. private RestRequest PrepareRequest( String path, RestSharp.Method method, List> queryParams, Object postBody, @@ -118,7 +134,7 @@ private RestRequest PrepareRequest( // add file parameter, if any foreach (var param in fileParams) { - request.AddFile(param.Value.Name, param.Value.Writer, param.Value.FileName, param.Value.ContentLength, param.Value.ContentType); + request.AddFile(param.Value.Name, GetBytes(param.Value.GetFile()), param.Value.FileName, param.Value.ContentType, null); } if (postBody != null) // http body (model or byte[]) parameter @@ -153,12 +169,45 @@ public Object CallApi( pathParams, contentType); InterceptRequest(request); - var response = RestClient.Execute(request); + var response = RestClient.Execute(request, method); InterceptResponse(request, response); - + FormatHeaders(response); return (Object)response; } + /// + /// To combine the header of same key with different value into one. + /// + /// RestResponse Object + /// + private RestResponse FormatHeaders(RestResponse response) + { + if (response != null && response.Headers != null) + { + Dictionary headerParams = new Dictionary(); + foreach (var item in response.Headers) + { + if (headerParams.ContainsKey(item.Name)) + { + headerParams[item.Name] += ", " + item.Value.ToString(); + } + else + { + headerParams.Add(item.Name, item.Value); + } + } + + var headers = new List(); + foreach (var item in headerParams) + { + headers.Add(new HeaderParameter(item.Key, item.Value.ToString())); + } + + response.Headers = headers as IReadOnlyCollection; + } + return response; + } + /// /// Escape string (url-encoded). /// @@ -230,9 +279,9 @@ public string ParameterToString(object obj) /// The HTTP response. /// Object type. /// Object representation of the JSON string. - public object Deserialize(IRestResponse response, Type type) + public object Deserialize(RestResponse response, Type type) { - IList headers = response.Headers; + IList headers = (IList)response.Headers; if (type == typeof(byte[])) // return byte array { return response.RawBytes; diff --git a/Conductor/Client/Configuration.cs b/Conductor/Client/Configuration.cs index f1a1edf5..f907b0c2 100644 --- a/Conductor/Client/Configuration.cs +++ b/Conductor/Client/Configuration.cs @@ -4,6 +4,8 @@ using System.Collections.Generic; using System.IO; using System; +using RestSharp; +using System.Net.Http; namespace Conductor.Client { @@ -74,6 +76,7 @@ public static Configuration Default private readonly TokenHandler _tokenHandler = new TokenHandler(); private TokenResourceApi _tokenClient = null; + private int Timeout = 10000; #endregion Private Members @@ -82,18 +85,19 @@ public static Configuration Default /// /// Initializes a new instance of the class /// - public Configuration() + public Configuration(int? timeOut = null) { + Timeout = timeOut ?? Timeout; + ApiClient = new ApiClient(Timeout); BasePath = "https://play.orkes.io/api"; DefaultHeader = new ConcurrentDictionary(); - Timeout = 10000; } #endregion Constructors #region Properties - public readonly ApiClient ApiClient = new ApiClient(); + public readonly ApiClient ApiClient; public OrkesAuthenticationSettings AuthenticationSettings { get; set; } @@ -104,11 +108,11 @@ public string BasePath { get { - return ApiClient.RestClient.BaseUrl.ToString(); + return ApiClient.RestClient.Options.BaseUrl.ToString(); } set { - ApiClient.RestClient.BaseUrl = new Uri(value); + ApiClient.RestClient = new RestClient(new RestClientOptions() { BaseUrl = new Uri(value), MaxTimeout = Timeout }); } } @@ -117,21 +121,6 @@ public string BasePath /// public IDictionary DefaultHeader { get; set; } = null; - /// - /// Gets or sets the HTTP timeout (milliseconds) of ApiClient. Default to 10000 milliseconds. - /// - public int Timeout - { - get - { - return ApiClient.RestClient.Timeout; - } - set - { - ApiClient.RestClient.Timeout = value; - } - } - public string AccessToken { get diff --git a/Conductor/Client/ExceptionFactory.cs b/Conductor/Client/ExceptionFactory.cs index 53ac5027..e11ca247 100644 --- a/Conductor/Client/ExceptionFactory.cs +++ b/Conductor/Client/ExceptionFactory.cs @@ -11,5 +11,5 @@ namespace Conductor.Client /// Method name /// Response /// Exceptions - public delegate Exception ExceptionFactory(string methodName, IRestResponse response); + public delegate Exception ExceptionFactory(string methodName, RestResponse response); } diff --git a/Conductor/Client/Extensions/ApiExtensions.cs b/Conductor/Client/Extensions/ApiExtensions.cs index 91623246..f5f82b6a 100644 --- a/Conductor/Client/Extensions/ApiExtensions.cs +++ b/Conductor/Client/Extensions/ApiExtensions.cs @@ -11,27 +11,27 @@ public class ApiExtensions private const string ENV_ROOT_URI = "CONDUCTOR_SERVER_URL"; private const string ENV_KEY_ID = "KEY"; private const string ENV_SECRET = "SECRET"; + private const int REST_CLIENT_REQUEST_TIME_OUT = 30 * 1000; public static Configuration Configuration { get; set; } static ApiExtensions() { - Configuration = new Configuration + Configuration = new Configuration(REST_CLIENT_REQUEST_TIME_OUT) { - Timeout = 30 * 1000, BasePath = GetEnvironmentVariable(ENV_ROOT_URI), AuthenticationSettings = new OrkesAuthenticationSettings( - GetEnvironmentVariable(ENV_KEY_ID), - GetEnvironmentVariable(ENV_SECRET) - ) + GetEnvironmentVariable(ENV_KEY_ID), + GetEnvironmentVariable(ENV_SECRET) + ) }; } public static WorkflowExecutor GetWorkflowExecutor() { return new WorkflowExecutor( - metadataClient: GetClient(), - workflowClient: GetClient() + metadataClient: GetClient(), + workflowClient: GetClient() ); } diff --git a/Conductor/Client/IReadableConfiguration.cs b/Conductor/Client/IReadableConfiguration.cs index d3fc1d1b..6a4c1913 100644 --- a/Conductor/Client/IReadableConfiguration.cs +++ b/Conductor/Client/IReadableConfiguration.cs @@ -38,11 +38,5 @@ public interface IReadableConfiguration /// /// Temp folder path. string TempFolderPath { get; } - - /// - /// Gets the HTTP connection timeout (in milliseconds) - /// - /// HTTP connection timeout. - int Timeout { get; } } } diff --git a/Conductor/Client/Models/WorkflowRun.cs b/Conductor/Client/Models/WorkflowRun.cs index a9fd2615..63fc0c8d 100644 --- a/Conductor/Client/Models/WorkflowRun.cs +++ b/Conductor/Client/Models/WorkflowRun.cs @@ -209,70 +209,70 @@ public bool Equals(WorkflowRun input) return false; return - ( - this.CorrelationId == input.CorrelationId || - (this.CorrelationId != null && - this.CorrelationId.Equals(input.CorrelationId)) - ) && - ( - this.CreateTime == input.CreateTime || - (this.CreateTime != null && - this.CreateTime.Equals(input.CreateTime)) - ) && - ( - this.CreatedBy == input.CreatedBy || - (this.CreatedBy != null && - this.CreatedBy.Equals(input.CreatedBy)) - ) && - ( - this.Input == input.Input || - this.Input != null && - input.Input != null && - this.Input.SequenceEqual(input.Input) - ) && - ( - this.Output == input.Output || - this.Output != null && - input.Output != null && - this.Output.SequenceEqual(input.Output) - ) && - ( - this.Priority == input.Priority || - (this.Priority != null && - this.Priority.Equals(input.Priority)) - ) && - ( - this.RequestId == input.RequestId || - (this.RequestId != null && - this.RequestId.Equals(input.RequestId)) - ) && - ( - this.Status == input.Status || - (this.Status != null && - this.Status.Equals(input.Status)) - ) && - ( - this.Tasks == input.Tasks || - this.Tasks != null && - input.Tasks != null && - this.Tasks.SequenceEqual(input.Tasks) - ) && - ( - this.UpdateTime == input.UpdateTime || - (this.UpdateTime != null && - this.UpdateTime.Equals(input.UpdateTime)) - ) && - ( - this.Variables == input.Variables || - this.Variables != null && - input.Variables != null && - this.Variables.SequenceEqual(input.Variables) - ) && - ( - this.WorkflowId == input.WorkflowId || - (this.WorkflowId != null && - this.WorkflowId.Equals(input.WorkflowId)) - ); + ( + this.CorrelationId == input.CorrelationId || + (this.CorrelationId != null && + this.CorrelationId.Equals(input.CorrelationId)) + ) && + ( + this.CreateTime == input.CreateTime || + (this.CreateTime != null && + this.CreateTime.Equals(input.CreateTime)) + ) && + ( + this.CreatedBy == input.CreatedBy || + (this.CreatedBy != null && + this.CreatedBy.Equals(input.CreatedBy)) + ) && + ( + this.Input == input.Input || + this.Input != null && + input.Input != null && + this.Input.SequenceEqual(input.Input) + ) && + ( + this.Output == input.Output || + this.Output != null && + input.Output != null && + this.Output.SequenceEqual(input.Output) + ) && + ( + this.Priority == input.Priority || + (this.Priority != null && + this.Priority.Equals(input.Priority)) + ) && + ( + this.RequestId == input.RequestId || + (this.RequestId != null && + this.RequestId.Equals(input.RequestId)) + ) && + ( + this.Status == input.Status || + (this.Status != null && + this.Status.Equals(input.Status)) + ) && + ( + this.Tasks == input.Tasks || + this.Tasks != null && + input.Tasks != null && + this.Tasks.SequenceEqual(input.Tasks) + ) && + ( + this.UpdateTime == input.UpdateTime || + (this.UpdateTime != null && + this.UpdateTime.Equals(input.UpdateTime)) + ) && + ( + this.Variables == input.Variables || + this.Variables != null && + input.Variables != null && + this.Variables.SequenceEqual(input.Variables) + ) && + ( + this.WorkflowId == input.WorkflowId || + (this.WorkflowId != null && + this.WorkflowId.Equals(input.WorkflowId)) + ); } /// diff --git a/Conductor/conductor-csharp.csproj b/Conductor/conductor-csharp.csproj index 7bc9dfa8..b0514fb9 100644 --- a/Conductor/conductor-csharp.csproj +++ b/Conductor/conductor-csharp.csproj @@ -13,10 +13,10 @@ - + - + \ No newline at end of file diff --git a/Tests/Api/WorkflowResourceApiTest.cs b/Tests/Api/WorkflowResourceApiTest.cs index 343c3bc7..d815a324 100644 --- a/Tests/Api/WorkflowResourceApiTest.cs +++ b/Tests/Api/WorkflowResourceApiTest.cs @@ -1,14 +1,11 @@ -using conductor.csharp.Client.Extensions; +using conductor.csharp.Client.Extensions; using Conductor.Api; using Conductor.Client.Extensions; using Conductor.Client.Models; using Conductor.Definition; using Conductor.Definition.TaskType; using Microsoft.Extensions.Logging; -using System; using System.Collections.Generic; -using System.Linq; -using System.Threading; using Tests.Worker; using Xunit; @@ -17,36 +14,103 @@ namespace conductor_csharp.test.Api public class WorkflowResourceApiTest { private const string WORKFLOW_NAME = "TestToCreateVariables"; - private const string TASK_NAME = "TestToCreateVariables_Task"; + private const string TASK_NAME = "TesttoCreateVaribles_task"; private const string WORKFLOW_VARIABLE_1 = "TestVariable1"; private const string WORKFLOW_VARIABLE_2 = "TestVariable2"; private const string WORKFLOW_DESC = "Test Workflow With Variables"; private const int WORKFLOW_VERSION = 1; + private const string OWNER_EMAIL = ""; + //private readonly OrkesApiClient _orkesApiClient; private readonly WorkflowResourceApi _workflowClient; + private readonly MetadataResourceApi _metadataResourceApi; private readonly ILogger _logger; public WorkflowResourceApiTest() { + // Dev local test + //_orkesApiClient = new OrkesApiClient(new Configuration(), new OrkesAuthenticationSettings("", "")); + //_workflowClient = _orkesApiClient.GetClient(); + //_metadataResourceApi = _orkesApiClient.GetClient(); + _workflowClient = ApiExtensions.GetClient(); + _metadataResourceApi = ApiExtensions.GetClient(); _logger = ApplicationLogging.CreateLogger(); } + [Fact] + public async void ResumeWorkflow() + { + var workflowId = RegisterAndStartWorkflow(); + + _workflowClient.PauseWorkflow(workflowId); + _workflowClient.ResumeWorkflow(workflowId); + var res = _workflowClient.GetExecutionStatus(workflowId); + Assert.NotNull(res); + Assert.Equal(Workflow.StatusEnum.RUNNING, res.Status); + DeleteWorkflowExecution(workflowId); + } + + [Fact] + public async void DeleteWorkflow() + { + var workflowId = RegisterAndStartWorkflow(); + + _workflowClient.Delete(workflowId); + var res = _workflowClient.GetRunningWorkflowWithHttpInfo(WORKFLOW_NAME); + Assert.NotNull(res); + Assert.DoesNotContain(workflowId, res.Data); + } + + [Fact] + public async void TerminateWorkflow() + { + var workflowId = RegisterAndStartWorkflow(); + + _workflowClient.Terminate(workflowId); + var res = _workflowClient.GetExecutionStatus(workflowId); + Assert.NotNull(res); + Assert.Equal(Workflow.StatusEnum.TERMINATED, res.Status); + DeleteWorkflowExecution(workflowId); + } + + [Fact] + public async void RetryLastFailedWorkflow() + { + var workflowId = RegisterAndStartWorkflow(); + + _workflowClient.Terminate(workflowId); + _workflowClient.Retry(workflowId); + var res = _workflowClient.GetExecutionStatus(workflowId); + Assert.NotNull(res); + Assert.Equal(Workflow.StatusEnum.RUNNING, res.Status); + DeleteWorkflowExecution(workflowId); + } + + + [Fact] + public async void PauseWorkflowExecution() + { + var workflowId = RegisterAndStartWorkflow(); + + _workflowClient.PauseWorkflow(workflowId); + var res = _workflowClient.GetExecutionStatus(workflowId); + Assert.NotNull(res); + Assert.Equal(Workflow.StatusEnum.PAUSED, res.Status); + DeleteWorkflowExecution(workflowId); + } + [Fact] public async void UpdateWorkflowVariables() { // Prepare workflow - var _workflow = GetConductorWorkflow(); - ApiExtensions.GetWorkflowExecutor().RegisterWorkflow(_workflow, true); - var workflowId = ApiExtensions.GetWorkflowExecutor().StartWorkflow(_workflow); - await ExecuteWorkflowTasks(workflowCompletionTimeout: TimeSpan.FromSeconds(20)); - await ValidateWorkflowCompletion(workflowId); + var workflowId = RegisterAndStartWorkflow(); // Create variables collection with values to be updated var updateDict = new Dictionary { - {WORKFLOW_VARIABLE_1,"Value1" }, - {WORKFLOW_VARIABLE_2,"Value2" }, - }; + {WORKFLOW_VARIABLE_1,"Value1" }, + {WORKFLOW_VARIABLE_2,"Value2" }, + }; var updateVariableData = new Workflow() { WorkflowId = workflowId, Variables = updateDict }; // Update the work flow variables _workflowClient.UpdateWorkflowVariables(updateVariableData); @@ -54,14 +118,17 @@ public async void UpdateWorkflowVariables() var _updatedWorkFlow = _workflowClient.GetWorkflowStatusSummary(workflowId, includeVariables: true); // Verify workflow variables data is equal with input passed Assert.Equal(_updatedWorkFlow.Variables, updateDict); + + DeleteWorkflowExecution(workflowId); } - private async System.Threading.Tasks.Task ExecuteWorkflowTasks(TimeSpan workflowCompletionTimeout) + private string RegisterAndStartWorkflow() { - var host = WorkflowTaskHost.CreateWorkerHost(LogLevel.Information, new ClassWorker()); - await host.StartAsync(); - Thread.Sleep(workflowCompletionTimeout); - await host.StopAsync(); + var _workflow = GetConductorWorkflow(); + _metadataResourceApi.UpdateWorkflowDefinitions(new List(1) { _workflow }, true); + var workflowId = _workflowClient.StartWorkflow(new StartWorkflowRequest(name: WORKFLOW_NAME)); + + return workflowId; } private ConductorWorkflow GetConductorWorkflow() @@ -70,28 +137,33 @@ private ConductorWorkflow GetConductorWorkflow() .WithName(WORKFLOW_NAME) .WithVersion(WORKFLOW_VERSION) .WithDescription(WORKFLOW_DESC) + .WithOwner(OWNER_EMAIL) .WithTask(new SimpleTask(TASK_NAME, TASK_NAME)) .WithVariable(WORKFLOW_VARIABLE_1, $"{WORKFLOW_VARIABLE_1}_Value") .WithVariable(WORKFLOW_VARIABLE_2, $"{WORKFLOW_VARIABLE_2}_Value"); } - private async System.Threading.Tasks.Task ValidateWorkflowCompletion(params string[] workflowIdList) + + private void DeleteWorkflowExecution(string workflowId) { - var workflowStatusList = await WorkflowExtensions.GetWorkflowStatusList( - _workflowClient, - maxAllowedInParallel: 10, - workflowIdList - ); - var incompleteWorkflowCounter = 0; - workflowStatusList.ToList().ForEach(wf => - { - if (wf.Status.Value != WorkflowStatus.StatusEnum.COMPLETED) - { - incompleteWorkflowCounter += 1; - _logger.LogInformation($"Workflow not completed, workflowId: {wf.WorkflowId}"); - } - }); - Assert.Equal(0, incompleteWorkflowCounter); + _workflowClient.Delete(workflowId); + + var res = _workflowClient.GetRunningWorkflowWithHttpInfo(WORKFLOW_NAME); + Assert.NotNull(res); + Assert.DoesNotContain(workflowId, res.Data); } + + //[Fact] + //public void DeleteAllWorkflowExecution() + //{ + + // var res = _workflowClient.GetRunningWorkflowWithHttpInfo(WORKFLOW_NAME); + + // res.Data.ForEach(x => _workflowClient.Delete(x)); + + // res = _workflowClient.GetRunningWorkflowWithHttpInfo(WORKFLOW_NAME); + + // Assert.Equal(0, res.Data.Count); + //} } } diff --git a/csharp-examples/WorkFlowExamples.cs b/csharp-examples/WorkFlowExamples.cs index 5922836e..eceb93a9 100644 --- a/csharp-examples/WorkFlowExamples.cs +++ b/csharp-examples/WorkFlowExamples.cs @@ -4,6 +4,7 @@ using Conductor.Executor; using Conductor.Api; using Conductor.Client.Authentication; +using Conductor.Client.Extensions; namespace csharp_examples { @@ -25,15 +26,14 @@ public class WorkFlowExamples private const string VARIABLE_NEW_VALUE_1 = ""; private const string VARIABLE_NAME_2 = ""; private const string VARIABLE_NEW_VALUE_2 = ""; - + private const int REST_CLIENT_REQUEST_TIME_OUT = 20000; public void RegisterWorkFlow() { - Configuration configuration = new Configuration() + Configuration configuration = new Configuration(REST_CLIENT_REQUEST_TIME_OUT) { AuthenticationSettings = new OrkesAuthenticationSettings(KEY_ID, KEY_SECRET) }; - WorkflowExecutor executor = new WorkflowExecutor(configuration); executor.RegisterWorkflow(GetConductorWorkflow(), true); } @@ -55,7 +55,10 @@ private ConductorWorkflow GetConductorWorkflow() return conductorWorkFlow; } - public void UpdateWorkflowVariablesWithWorkFlowId() + /// + /// To test Update variables with workflowId + /// + public void TestUpdateWorkflowVariablesWithWorkFlowId() { var orkesApiClient = new OrkesApiClient(new Configuration(), new OrkesAuthenticationSettings(KEY_ID, KEY_SECRET)); @@ -73,5 +76,79 @@ public void UpdateWorkflowVariablesWithWorkFlowId() }); } + /// + /// To Terminate Workflow Execution using WorkflowId + /// + /// + public void TestTerminateWorkflowExecution(String WorkflowId) + { + var orkesApiClient = new OrkesApiClient(new Configuration(), + new OrkesAuthenticationSettings(KEY_ID, KEY_SECRET)); + var workflowClient = orkesApiClient.GetClient(); + workflowClient.Terminate(WORKFLOW_ID, null, null); + } + + /// + /// To remove Workflow from the system using workflowId + /// + /// + public void TestRemoveWorkflow(String WorkflowId) + { + var orkesApiClient = new OrkesApiClient(new Configuration(), + new OrkesAuthenticationSettings(KEY_ID, KEY_SECRET)); + var workflowClient = orkesApiClient.GetClient(); + workflowClient.Delete(WorkflowId, null); + } + + /// + /// To Retry the last failed Task using WorkflowId + /// + /// + public void TestRetryLastFailedTask(String WorkflowId) + { + var orkesApiClient = new OrkesApiClient(new Configuration(), + new OrkesAuthenticationSettings(KEY_ID, KEY_SECRET)); + var workflowClient = orkesApiClient.GetClient(); + workflowClient.Retry(WorkflowId, null); + } + + /// + /// To Pause the Running Workflow using WorkflowId + /// + /// + public void TestPauseworkflow(String WorkflowId) + { + var orkesApiClient = new OrkesApiClient(new Configuration(), + new OrkesAuthenticationSettings(KEY_ID, KEY_SECRET)); + var workflowClient = orkesApiClient.GetClient(); + workflowClient.PauseWorkflow(WorkflowId); + } + + /// + /// To Get Execution Status of the Workflow using WorkflowId + /// + /// + public void TestGetWorkflowByWorkflowId(String WorkflowId) + { + var orkesApiClient = new OrkesApiClient(new Configuration(), + new OrkesAuthenticationSettings(KEY_ID, KEY_SECRET)); + var workflowClient = orkesApiClient.GetClient(); + workflowClient.GetExecutionStatus(WorkflowId, null); + } + + /// + /// To Resume the Paused Workflow with WorkflowId with our own custom values for timeout. + /// + /// + public void TestResumeWorkflow(String WorkflowId) + { + Configuration configuration = new Configuration(timeOut: 20000); + configuration.BasePath = "https://play.orkes.io/api"; + + var orkesApiClient = new OrkesApiClient(new Configuration(timeOut: 20000), + new OrkesAuthenticationSettings(KEY_ID, KEY_SECRET)); + var workflowClient = orkesApiClient.GetClient(); + workflowClient.ResumeWorkflow(WorkflowId); + } } }