From 67d56b41ecbd4e55722f04b7af70c7e367a99e86 Mon Sep 17 00:00:00 2001 From: "Jithesh.Poojary" Date: Wed, 10 Jan 2024 13:11:22 +0530 Subject: [PATCH 1/9] Changes to address the below 1. update variables functionality, 2. Inprogress throws exception when default param value after callbackAfterSeconds --- Conductor/Api/WorkflowResourceApi.cs | 6026 +++++++++-------- .../Extensions/ConductorTaskExtensions.cs | 2 +- Conductor/Definition/ConductorWorkflow.cs | 144 +- Tests/Api/WorkflowResourceApiTest.cs | 97 + csharp-examples/WorkFlowExamples.cs | 77 + 5 files changed, 3300 insertions(+), 3046 deletions(-) create mode 100644 Tests/Api/WorkflowResourceApiTest.cs create mode 100644 csharp-examples/WorkFlowExamples.cs diff --git a/Conductor/Api/WorkflowResourceApi.cs b/Conductor/Api/WorkflowResourceApi.cs index f0969e27..ec58d438 100644 --- a/Conductor/Api/WorkflowResourceApi.cs +++ b/Conductor/Api/WorkflowResourceApi.cs @@ -7,2981 +7,3053 @@ 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); - - /// - /// 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 - /// - public partial class WorkflowResourceApi : IWorkflowResourceApi - { - private Conductor.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public WorkflowResourceApi(String basePath) - { - this.Configuration = new Conductor.Client.Configuration { BasePath = basePath }; - - ExceptionFactory = Conductor.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// - /// - public WorkflowResourceApi() - { - this.Configuration = Conductor.Client.Configuration.Default; - - ExceptionFactory = Conductor.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// using Configuration object - /// - /// An instance of Configuration - /// - public WorkflowResourceApi(Conductor.Client.Configuration configuration = null) - { - if (configuration == null) // use the default one in Configuration - this.Configuration = Conductor.Client.Configuration.Default; - else - this.Configuration = configuration; - - ExceptionFactory = Conductor.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Gets the base path of the API client. - /// - /// The base path - public String GetBasePath() - { - return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); - } - - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - public Conductor.Client.Configuration Configuration { get; set; } - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - public Conductor.Client.ExceptionFactory ExceptionFactory - { - get - { - if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) - { - throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); - } - return _exceptionFactory; - } - set { _exceptionFactory = value; } - } - - /// - /// Starts the decision task for a workflow - /// - /// Thrown when fails to make API call - /// - /// - public void Decide(string workflowId) - { - DecideWithHttpInfo(workflowId); - } - - /// - /// Starts the decision task for a workflow - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of Object(void) - public ApiResponse DecideWithHttpInfo(string workflowId) - { - // verify the required parameter 'workflowId' is set - if (workflowId == null) - throw new ApiException(400, "Missing required parameter 'workflowId' when calling WorkflowResourceApi->Decide"); - - var localVarPath = "/workflow/decide/{workflowId}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = 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); - - if (workflowId != null) localVarPathParams.Add("workflowId", this.Configuration.ApiClient.ParameterToString(workflowId)); // path parameter - // 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); - - int localVarStatusCode = (int)localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("Decide", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Removes the workflow from the system - /// - /// Thrown when fails to make API call - /// - /// (optional, default to true) - /// - public void Delete(string workflowId, bool? archiveWorkflow = null) - { - DeleteWithHttpInfo(workflowId, archiveWorkflow); - } - - /// - /// Removes the workflow from the system - /// - /// Thrown when fails to make API call - /// - /// (optional, default to true) - /// ApiResponse of Object(void) - public ApiResponse DeleteWithHttpInfo(string workflowId, bool? archiveWorkflow = null) - { - // verify the required parameter 'workflowId' is set - if (workflowId == null) - throw new ApiException(400, "Missing required parameter 'workflowId' when calling WorkflowResourceApi->Delete"); - - var localVarPath = "/workflow/{workflowId}/remove"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = 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); - - 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 - 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); - - int localVarStatusCode = (int)localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("Delete", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Execute a workflow synchronously - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// (optional) - /// WorkflowRun - public WorkflowRun ExecuteWorkflow(StartWorkflowRequest body, string requestId, string name, int? version, string waitUntilTaskRef = null) - { - ApiResponse localVarResponse = ExecuteWorkflowWithHttpInfo(body, requestId, name, version, waitUntilTaskRef); - return localVarResponse.Data; - } - - /// - /// Execute a workflow synchronously - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// (optional) - /// ApiResponse of WorkflowRun - public ApiResponse ExecuteWorkflowWithHttpInfo(StartWorkflowRequest body, string requestId, string name, int? version, string waitUntilTaskRef = null) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling WorkflowResourceApi->ExecuteWorkflow"); - // verify the required parameter 'requestId' is set - if (requestId == null) - throw new ApiException(400, "Missing required parameter 'requestId' when calling WorkflowResourceApi->ExecuteWorkflow"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling WorkflowResourceApi->ExecuteWorkflow"); - // verify the required parameter 'version' is set - if (version == null) - throw new ApiException(400, "Missing required parameter 'version' when calling WorkflowResourceApi->ExecuteWorkflow"); - - var localVarPath = "/workflow/execute/{name}/{version}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "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 - if (version != null) localVarPathParams.Add("version", this.Configuration.ApiClient.ParameterToString(version)); // path parameter - if (requestId != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "requestId", requestId)); // query parameter - if (waitUntilTaskRef != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "waitUntilTaskRef", waitUntilTaskRef)); // query parameter - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - // 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); - - int localVarStatusCode = (int)localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("ExecuteWorkflow", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (WorkflowRun)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(WorkflowRun))); - } - - /// - /// Gets the workflow by workflow id - /// - /// Thrown when fails to make API call - /// - /// (optional, default to true) - /// (optional, default to false) - /// Workflow - public Workflow GetExecutionStatus(string workflowId, bool? includeTasks = null, bool? summarize = null) - { - ApiResponse localVarResponse = GetExecutionStatusWithHttpInfo(workflowId, includeTasks, summarize); - return localVarResponse.Data; - } - - /// - /// Gets the workflow by workflow id - /// - /// Thrown when fails to make API call - /// - /// (optional, default to true) - /// (optional, default to false) - /// ApiResponse of Workflow - public ApiResponse GetExecutionStatusWithHttpInfo(string workflowId, bool? includeTasks = null, bool? summarize = null) - { - // verify the required parameter 'workflowId' is set - if (workflowId == null) - throw new ApiException(400, "Missing required parameter 'workflowId' when calling WorkflowResourceApi->GetExecutionStatus"); - - var localVarPath = "/workflow/{workflowId}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = 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); - - 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 - 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); - - int localVarStatusCode = (int)localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetExecutionStatus", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Workflow)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Workflow))); - } - - /// - /// 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 TaskListSearchResultSummary GetExecutionStatusTaskList(string workflowId, int? start = null, int? count = null, string status = null) - { - ApiResponse localVarResponse = GetExecutionStatusTaskListWithHttpInfo(workflowId, start, count, status); - return localVarResponse.Data; - } - - /// - /// 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 - public ApiResponse GetExecutionStatusTaskListWithHttpInfo(string workflowId, int? start = null, int? count = null, string status = null) - { - // verify the required parameter 'workflowId' is set - if (workflowId == null) - throw new ApiException(400, "Missing required parameter 'workflowId' when calling WorkflowResourceApi->GetExecutionStatusTaskList"); - - var localVarPath = "/workflow/{workflowId}/tasks"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = 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); - - if (workflowId != null) localVarPathParams.Add("workflowId", this.Configuration.ApiClient.ParameterToString(workflowId)); // path parameter - 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 - 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); - - int localVarStatusCode = (int)localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetExecutionStatusTaskList", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - 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 - /// - /// Thrown when fails to make API call - /// - /// - /// - /// ApiResponse of ExternalStorageLocation - public ApiResponse GetExternalStorageLocationWithHttpInfo(string path, string operation, string payloadType) - { - // verify the required parameter 'path' is set - if (path == null) - throw new ApiException(400, "Missing required parameter 'path' when calling WorkflowResourceApi->GetExternalStorageLocation"); - // verify the required parameter 'operation' is set - if (operation == null) - throw new ApiException(400, "Missing required parameter 'operation' when calling WorkflowResourceApi->GetExternalStorageLocation"); - // verify the required parameter 'payloadType' is set - if (payloadType == null) - throw new ApiException(400, "Missing required parameter 'payloadType' when calling WorkflowResourceApi->GetExternalStorageLocation"); - - var localVarPath = "/workflow/externalstoragelocation"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = 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); - - 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 - 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); - - int localVarStatusCode = (int)localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetExternalStorageLocation", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (ExternalStorageLocation)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ExternalStorageLocation))); - } - - /// - /// Retrieve all the running workflows - /// - /// Thrown when fails to make API call - /// - /// (optional, default to 1) - /// (optional) - /// (optional) - /// List<string> - public List GetRunningWorkflow(string name, int? version = null, long? startTime = null, long? endTime = null) - { - ApiResponse> localVarResponse = GetRunningWorkflowWithHttpInfo(name, version, startTime, endTime); - return localVarResponse.Data; - } - - /// - /// Retrieve all the running workflows - /// - /// Thrown when fails to make API call - /// - /// (optional, default to 1) - /// (optional) - /// (optional) - /// ApiResponse of List<string> - public ApiResponse> GetRunningWorkflowWithHttpInfo(string name, int? version = null, long? startTime = null, long? endTime = null) - { - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling WorkflowResourceApi->GetRunningWorkflow"); - - var localVarPath = "/workflow/running/{name}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = 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); - - if (name != null) localVarPathParams.Add("name", this.Configuration.ApiClient.ParameterToString(name)); // path parameter - 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 - 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); - - int localVarStatusCode = (int)localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetRunningWorkflow", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (List)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); - } - - /// - /// Gets the workflow by workflow id - /// - /// Thrown when fails to make API call - /// - /// (optional, default to false) - /// (optional, default to false) - /// WorkflowStatus - public WorkflowStatus GetWorkflowStatusSummary(string workflowId, bool? includeOutput = null, bool? includeVariables = null) - { - ApiResponse localVarResponse = GetWorkflowStatusSummaryWithHttpInfo(workflowId, includeOutput, includeVariables); - return localVarResponse.Data; - } - - /// - /// Gets the workflow by workflow id - /// - /// Thrown when fails to make API call - /// - /// (optional, default to false) - /// (optional, default to false) - /// ApiResponse of WorkflowStatus - public ApiResponse GetWorkflowStatusSummaryWithHttpInfo(string workflowId, bool? includeOutput = null, bool? includeVariables = null) - { - // verify the required parameter 'workflowId' is set - if (workflowId == null) - throw new ApiException(400, "Missing required parameter 'workflowId' when calling WorkflowResourceApi->GetWorkflowStatusSummary"); - - var localVarPath = "/workflow/{workflowId}/status"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = 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); - - 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 - 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); - - int localVarStatusCode = (int)localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetWorkflowStatusSummary", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (WorkflowStatus)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(WorkflowStatus))); - } - - /// - /// 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 Dictionary> GetWorkflows(List body, string name, bool? includeClosed = null, bool? includeTasks = null) - { - ApiResponse>> localVarResponse = GetWorkflowsWithHttpInfo(body, name, includeClosed, includeTasks); - return localVarResponse.Data; - } - - /// - /// 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>> - public ApiResponse>> GetWorkflowsWithHttpInfo(List body, string name, bool? includeClosed = null, bool? includeTasks = null) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling WorkflowResourceApi->GetWorkflows"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling WorkflowResourceApi->GetWorkflows"); - - var localVarPath = "/workflow/{name}/correlated"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "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); - - if (name != null) localVarPathParams.Add("name", this.Configuration.ApiClient.ParameterToString(name)); // 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 - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - // 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); - - int localVarStatusCode = (int)localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetWorkflows", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse>>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Dictionary>)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Dictionary>))); - } - - /// - /// 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 Dictionary> GetWorkflows(CorrelationIdsSearchRequest body, bool? includeClosed = null, bool? includeTasks = null) - { - ApiResponse>> localVarResponse = GetWorkflowsWithHttpInfo(body, includeClosed, includeTasks); - return localVarResponse.Data; - } - - /// - /// 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>> - public ApiResponse>> GetWorkflowsWithHttpInfo(CorrelationIdsSearchRequest body, bool? includeClosed = null, bool? includeTasks = null) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling WorkflowResourceApi->GetWorkflows"); - - var localVarPath = "/workflow/correlated/batch"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "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); - - 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 - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - // 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); - - int localVarStatusCode = (int)localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetWorkflows", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse>>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Dictionary>)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Dictionary>))); - } - - /// - /// 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 List GetWorkflows(string name, string correlationId, bool? includeClosed = null, bool? includeTasks = null) - { - ApiResponse> localVarResponse = GetWorkflowsWithHttpInfo(name, correlationId, includeClosed, includeTasks); - return localVarResponse.Data; - } - - /// - /// 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> - public ApiResponse> GetWorkflowsWithHttpInfo(string name, string correlationId, bool? includeClosed = null, bool? includeTasks = null) - { - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling WorkflowResourceApi->GetWorkflows"); - // verify the required parameter 'correlationId' is set - if (correlationId == null) - throw new ApiException(400, "Missing required parameter 'correlationId' when calling WorkflowResourceApi->GetWorkflows"); - - var localVarPath = "/workflow/{name}/correlated/{correlationId}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = 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); - - if (name != null) localVarPathParams.Add("name", this.Configuration.ApiClient.ParameterToString(name)); // path parameter - 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 - 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); - - int localVarStatusCode = (int)localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetWorkflows", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (List)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); - } - - /// - /// Pauses the workflow - /// - /// Thrown when fails to make API call - /// - /// - public void PauseWorkflow(string workflowId) - { - PauseWorkflowWithHttpInfo(workflowId); - } - - /// - /// Pauses the workflow - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of Object(void) - public ApiResponse PauseWorkflowWithHttpInfo(string workflowId) - { - // verify the required parameter 'workflowId' is set - if (workflowId == null) - throw new ApiException(400, "Missing required parameter 'workflowId' when calling WorkflowResourceApi->PauseWorkflow"); - - var localVarPath = "/workflow/{workflowId}/pause"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = 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); - - if (workflowId != null) localVarPathParams.Add("workflowId", this.Configuration.ApiClient.ParameterToString(workflowId)); // path parameter - // 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); - - int localVarStatusCode = (int)localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("PauseWorkflow", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - - /// - /// Jump workflow execution to given task Jump workflow execution to given task. - /// - /// Thrown when fails to make API call - /// - /// - /// (optional) - /// - public void JumpToTask(string workflowId, Dictionary input, string taskReferenceName = null) - { - JumpToTaskWithHttpInfo(input, workflowId, taskReferenceName); - } - - - /// - /// Jump workflow execution to given task Jump workflow execution to given task. - /// - /// Thrown when fails to make API call - /// - /// - /// (optional) - /// ApiResponse of Object(void) - public ApiResponse JumpToTaskWithHttpInfo(Dictionary body, string workflowId, string taskReferenceName = null) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'input' when calling WorkflowResourceApi->JumpToTask"); - // verify the required parameter 'workflowId' is set - if (workflowId == null) - throw new ApiException(400, "Missing required parameter 'workflowId' when calling WorkflowResourceApi->JumpToTask"); - - var localVarPath = "/workflow/{workflowId}/jump/{taskReferenceName}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "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); - - if (workflowId != null) localVarPathParams.Add("workflowId", this.Configuration.ApiClient.ParameterToString(workflowId)); // path parameter - if (taskReferenceName != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "taskReferenceName", taskReferenceName)); // query parameter - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - // 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); - - int localVarStatusCode = (int)localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("JumpToTask", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - - /// - /// Reruns the workflow from a specific task - /// - /// Thrown when fails to make API call - /// - /// - /// string - public string Rerun(RerunWorkflowRequest body, string workflowId) - { - ApiResponse localVarResponse = RerunWithHttpInfo(body, workflowId); - return localVarResponse.Data; - } - - /// - /// Reruns the workflow from a specific task - /// - /// Thrown when fails to make API call - /// - /// - /// ApiResponse of string - public ApiResponse RerunWithHttpInfo(RerunWorkflowRequest body, string workflowId) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling WorkflowResourceApi->Rerun"); - // verify the required parameter 'workflowId' is set - if (workflowId == null) - throw new ApiException(400, "Missing required parameter 'workflowId' when calling WorkflowResourceApi->Rerun"); - - var localVarPath = "/workflow/{workflowId}/rerun"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "text/plain" - }; - 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 (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - // 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); - - int localVarStatusCode = (int)localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("Rerun", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (string)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(string))); - } - - /// - /// Resets callback times of all non-terminal SIMPLE tasks to 0 - /// - /// Thrown when fails to make API call - /// - /// - public void ResetWorkflow(string workflowId) - { - ResetWorkflowWithHttpInfo(workflowId); - } - - /// - /// Resets callback times of all non-terminal SIMPLE tasks to 0 - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of Object(void) - public ApiResponse ResetWorkflowWithHttpInfo(string workflowId) - { - // verify the required parameter 'workflowId' is set - if (workflowId == null) - throw new ApiException(400, "Missing required parameter 'workflowId' when calling WorkflowResourceApi->ResetWorkflow"); - - var localVarPath = "/workflow/{workflowId}/resetcallbacks"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = 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); - - if (workflowId != null) localVarPathParams.Add("workflowId", this.Configuration.ApiClient.ParameterToString(workflowId)); // path parameter - // 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); - - int localVarStatusCode = (int)localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("ResetWorkflow", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Restarts a completed workflow - /// - /// Thrown when fails to make API call - /// - /// (optional, default to false) - /// - public void Restart(string workflowId, bool? useLatestDefinitions = null) - { - RestartWithHttpInfo(workflowId, useLatestDefinitions); - } - - /// - /// Restarts a completed workflow - /// - /// Thrown when fails to make API call - /// - /// (optional, default to false) - /// ApiResponse of Object(void) - public ApiResponse RestartWithHttpInfo(string workflowId, bool? useLatestDefinitions = null) - { - // verify the required parameter 'workflowId' is set - if (workflowId == null) - throw new ApiException(400, "Missing required parameter 'workflowId' when calling WorkflowResourceApi->Restart"); - - var localVarPath = "/workflow/{workflowId}/restart"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = 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); - - 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 - 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); - - int localVarStatusCode = (int)localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("Restart", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Resumes the workflow - /// - /// Thrown when fails to make API call - /// - /// - public void ResumeWorkflow(string workflowId) - { - ResumeWorkflowWithHttpInfo(workflowId); - } - - /// - /// Resumes the workflow - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of Object(void) - public ApiResponse ResumeWorkflowWithHttpInfo(string workflowId) - { - // verify the required parameter 'workflowId' is set - if (workflowId == null) - throw new ApiException(400, "Missing required parameter 'workflowId' when calling WorkflowResourceApi->ResumeWorkflow"); - - var localVarPath = "/workflow/{workflowId}/resume"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = 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); - - if (workflowId != null) localVarPathParams.Add("workflowId", this.Configuration.ApiClient.ParameterToString(workflowId)); // path parameter - // 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); - - int localVarStatusCode = (int)localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("ResumeWorkflow", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Retries the last failed task - /// - /// Thrown when fails to make API call - /// - /// (optional, default to false) - /// - public void Retry(string workflowId, bool? resumeSubworkflowTasks = null) - { - RetryWithHttpInfo(workflowId, resumeSubworkflowTasks); - } - - /// - /// Retries the last failed task - /// - /// Thrown when fails to make API call - /// - /// (optional, default to false) - /// ApiResponse of Object(void) - public ApiResponse RetryWithHttpInfo(string workflowId, bool? resumeSubworkflowTasks = null) - { - // verify the required parameter 'workflowId' is set - if (workflowId == null) - throw new ApiException(400, "Missing required parameter 'workflowId' when calling WorkflowResourceApi->Retry"); - - var localVarPath = "/workflow/{workflowId}/retry"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = 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); - - 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 - 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); - - int localVarStatusCode = (int)localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("Retry", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - 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 - public ScrollableSearchResultWorkflowSummary Search(string queryId = null, int? start = null, int? size = null, string sort = null, string freeText = null, string query = null, bool? skipCache = null) - { - ApiResponse localVarResponse = 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. - /// - /// 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 - public ApiResponse SearchWithHttpInfo(string queryId = null, int? start = null, int? size = null, string sort = null, string freeText = null, string query = null, bool? skipCache = null) - { - - var localVarPath = "/workflow/search"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = 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); - - if (queryId != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "queryId", queryId)); // query parameter - if (start != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "start", start)); // query parameter - if (size != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "size", size)); // query parameter - 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 - if (skipCache != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "skipCache", skipCache)); // query parameter - // 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); - - int localVarStatusCode = (int)localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("Search", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (ScrollableSearchResultWorkflowSummary)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ScrollableSearchResultWorkflowSummary))); - } - - /// - /// 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 SearchResultWorkflow SearchV2(int? start = null, int? size = null, string sort = null, string freeText = null, string query = null) - { - ApiResponse localVarResponse = 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. - /// - /// Thrown when fails to make API call - /// (optional, default to 0) - /// (optional, default to 100) - /// (optional) - /// (optional, default to *) - /// (optional) - /// ApiResponse of SearchResultWorkflow - public ApiResponse SearchV2WithHttpInfo(int? start = null, int? size = null, string sort = null, string freeText = null, string query = null) - { - - var localVarPath = "/workflow/search-v2"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = 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); - - if (start != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "start", start)); // query parameter - if (size != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "size", size)); // query parameter - 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 - 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); - - int localVarStatusCode = (int)localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("SearchV2", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (SearchResultWorkflow)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(SearchResultWorkflow))); - } - - /// - /// 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 SearchResultWorkflowSummary SearchWorkflowsByTasks(int? start = null, int? size = null, string sort = null, string freeText = null, string query = null) - { - ApiResponse localVarResponse = 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 - /// - /// Thrown when fails to make API call - /// (optional, default to 0) - /// (optional, default to 100) - /// (optional) - /// (optional, default to *) - /// (optional) - /// ApiResponse of SearchResultWorkflowSummary - public ApiResponse SearchWorkflowsByTasksWithHttpInfo(int? start = null, int? size = null, string sort = null, string freeText = null, string query = null) - { - - var localVarPath = "/workflow/search-by-tasks"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = 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); - - if (start != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "start", start)); // query parameter - if (size != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "size", size)); // query parameter - 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 - 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); - - int localVarStatusCode = (int)localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("SearchWorkflowsByTasks", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (SearchResultWorkflowSummary)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(SearchResultWorkflowSummary))); - } - - /// - /// 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 SearchResultWorkflow SearchWorkflowsByTasksV2(int? start = null, int? size = null, string sort = null, string freeText = null, string query = null) - { - ApiResponse localVarResponse = 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 - /// - /// Thrown when fails to make API call - /// (optional, default to 0) - /// (optional, default to 100) - /// (optional) - /// (optional, default to *) - /// (optional) - /// ApiResponse of SearchResultWorkflow - public ApiResponse SearchWorkflowsByTasksV2WithHttpInfo(int? start = null, int? size = null, string sort = null, string freeText = null, string query = null) - { - - var localVarPath = "/workflow/search-by-tasks-v2"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = 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); - - if (start != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "start", start)); // query parameter - if (size != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "size", size)); // query parameter - 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 - 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); - - int localVarStatusCode = (int)localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("SearchWorkflowsByTasksV2", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (SearchResultWorkflow)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(SearchResultWorkflow))); - } - - /// - /// Skips a given task from a current running workflow - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - public void SkipTaskFromWorkflow(string workflowId, string taskReferenceName, SkipTaskRequest skipTaskRequest) - { - SkipTaskFromWorkflowWithHttpInfo(workflowId, taskReferenceName, skipTaskRequest); - } - - /// - /// Skips a given task from a current running workflow - /// - /// Thrown when fails to make API call - /// - /// - /// - /// ApiResponse of Object(void) - public ApiResponse SkipTaskFromWorkflowWithHttpInfo(string workflowId, string taskReferenceName, SkipTaskRequest skipTaskRequest) - { - // verify the required parameter 'workflowId' is set - if (workflowId == null) - throw new ApiException(400, "Missing required parameter 'workflowId' when calling WorkflowResourceApi->SkipTaskFromWorkflow"); - // verify the required parameter 'taskReferenceName' is set - if (taskReferenceName == null) - throw new ApiException(400, "Missing required parameter 'taskReferenceName' when calling WorkflowResourceApi->SkipTaskFromWorkflow"); - // verify the required parameter 'skipTaskRequest' is set - if (skipTaskRequest == null) - throw new ApiException(400, "Missing required parameter 'skipTaskRequest' when calling WorkflowResourceApi->SkipTaskFromWorkflow"); - - var localVarPath = "/workflow/{workflowId}/skiptask/{taskReferenceName}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = 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); - - 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 - 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); - - int localVarStatusCode = (int)localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("SkipTaskFromWorkflow", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Start a new workflow with StartWorkflowRequest, which allows task to be executed in a domain - /// - /// Thrown when fails to make API call - /// - /// string - public string StartWorkflow(StartWorkflowRequest body) - { - ApiResponse localVarResponse = StartWorkflowWithHttpInfo(body); - return localVarResponse.Data; - } - - /// - /// 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 - public ApiResponse StartWorkflowWithHttpInfo(StartWorkflowRequest body) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling WorkflowResourceApi->StartWorkflow"); - - var localVarPath = "/workflow"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "text/plain" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - // 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); - - int localVarStatusCode = (int)localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("StartWorkflow", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (string)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(string))); - } - - /// - /// 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 string StartWorkflow(string name, Dictionary body, int? version = null, string correlationId = null, int? priority = null) - { - ApiResponse localVarResponse = 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 - /// - /// Thrown when fails to make API call - /// - /// - /// (optional) - /// (optional) - /// (optional, default to 0) - /// ApiResponse of string - public ApiResponse StartWorkflowWithHttpInfo(string name, Dictionary body, int? version = null, string correlationId = null, int? priority = null) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling WorkflowResourceApi->StartWorkflow"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling WorkflowResourceApi->StartWorkflow"); - - var localVarPath = "/workflow/{name}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "text/plain" - }; - 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 - if (version != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "version", version)); // query parameter - if (correlationId != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "correlationId", correlationId)); // query parameter - if (priority != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "priority", priority)); // query parameter - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - // 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); - - int localVarStatusCode = (int)localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("StartWorkflow", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (string)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(string))); - } - - /// - /// Terminate workflow execution - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// (optional, default to false) - /// - public void Terminate(string workflowId, string reason = null, bool? triggerFailureWorkflow = null) - { - TerminateWithHttpInfo(workflowId, reason, triggerFailureWorkflow); - } - - /// - /// Terminate workflow execution - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// (optional, default to false) - /// ApiResponse of Object(void) - public ApiResponse TerminateWithHttpInfo(string workflowId, string reason = null, bool? triggerFailureWorkflow = null) - { - // verify the required parameter 'workflowId' is set - if (workflowId == null) - throw new ApiException(400, "Missing required parameter 'workflowId' when calling WorkflowResourceApi->Terminate"); - - var localVarPath = "/workflow/{workflowId}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = 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); - - 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 - 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); - - int localVarStatusCode = (int)localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("Terminate", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Test workflow execution using mock data - /// - /// Thrown when fails to make API call - /// - /// Workflow - public Workflow TestWorkflow(WorkflowTestRequest body) - { - ApiResponse localVarResponse = TestWorkflowWithHttpInfo(body); - return localVarResponse.Data; - } - - /// - /// Test workflow execution using mock data - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of Workflow - public ApiResponse TestWorkflowWithHttpInfo(WorkflowTestRequest body) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling WorkflowResourceApi->TestWorkflow"); - - var localVarPath = "/workflow/test"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - // 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); - - int localVarStatusCode = (int)localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestWorkflow", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Workflow)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Workflow))); - } - - /// - /// Force upload all completed workflows to document store - /// - /// Thrown when fails to make API call - /// Object - public Object UploadCompletedWorkflows() - { - ApiResponse localVarResponse = UploadCompletedWorkflowsWithHttpInfo(); - return localVarResponse.Data; - } - - /// - /// Force upload all completed workflows to document store - /// - /// Thrown when fails to make API call - /// ApiResponse of Object - public ApiResponse UploadCompletedWorkflowsWithHttpInfo() - { - - var localVarPath = "/workflow/document-store/upload"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = 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); - - // 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); - - int localVarStatusCode = (int)localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UploadCompletedWorkflows", localVarResponse); - 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))); - } - } + /// + /// 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 + /// + public partial class WorkflowResourceApi : IWorkflowResourceApi + { + private Conductor.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public WorkflowResourceApi(String basePath) + { + this.Configuration = new Conductor.Client.Configuration { BasePath = basePath }; + + ExceptionFactory = Conductor.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// + /// + public WorkflowResourceApi() + { + this.Configuration = Conductor.Client.Configuration.Default; + + ExceptionFactory = Conductor.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public WorkflowResourceApi(Conductor.Client.Configuration configuration = null) + { + if (configuration == null) // use the default one in Configuration + this.Configuration = Conductor.Client.Configuration.Default; + else + this.Configuration = configuration; + + ExceptionFactory = Conductor.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public String GetBasePath() + { + return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public Conductor.Client.Configuration Configuration { get; set; } + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public Conductor.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// Starts the decision task for a workflow + /// + /// Thrown when fails to make API call + /// + /// + public void Decide(string workflowId) + { + DecideWithHttpInfo(workflowId); + } + + /// + /// Starts the decision task for a workflow + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of Object(void) + public ApiResponse DecideWithHttpInfo(string workflowId) + { + // verify the required parameter 'workflowId' is set + if (workflowId == null) + throw new ApiException(400, "Missing required parameter 'workflowId' when calling WorkflowResourceApi->Decide"); + + var localVarPath = "/workflow/decide/{workflowId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = 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); + + if (workflowId != null) localVarPathParams.Add("workflowId", this.Configuration.ApiClient.ParameterToString(workflowId)); // path parameter + // 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); + + int localVarStatusCode = (int)localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("Decide", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// Removes the workflow from the system + /// + /// Thrown when fails to make API call + /// + /// (optional, default to true) + /// + public void Delete(string workflowId, bool? archiveWorkflow = null) + { + DeleteWithHttpInfo(workflowId, archiveWorkflow); + } + + /// + /// Removes the workflow from the system + /// + /// Thrown when fails to make API call + /// + /// (optional, default to true) + /// ApiResponse of Object(void) + public ApiResponse DeleteWithHttpInfo(string workflowId, bool? archiveWorkflow = null) + { + // verify the required parameter 'workflowId' is set + if (workflowId == null) + throw new ApiException(400, "Missing required parameter 'workflowId' when calling WorkflowResourceApi->Delete"); + + var localVarPath = "/workflow/{workflowId}/remove"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = 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); + + 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 + 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); + + int localVarStatusCode = (int)localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("Delete", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// Execute a workflow synchronously + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// (optional) + /// WorkflowRun + public WorkflowRun ExecuteWorkflow(StartWorkflowRequest body, string requestId, string name, int? version, string waitUntilTaskRef = null) + { + ApiResponse localVarResponse = ExecuteWorkflowWithHttpInfo(body, requestId, name, version, waitUntilTaskRef); + return localVarResponse.Data; + } + + /// + /// Execute a workflow synchronously + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// (optional) + /// ApiResponse of WorkflowRun + public ApiResponse ExecuteWorkflowWithHttpInfo(StartWorkflowRequest body, string requestId, string name, int? version, string waitUntilTaskRef = null) + { + // verify the required parameter 'body' is set + if (body == null) + throw new ApiException(400, "Missing required parameter 'body' when calling WorkflowResourceApi->ExecuteWorkflow"); + // verify the required parameter 'requestId' is set + if (requestId == null) + throw new ApiException(400, "Missing required parameter 'requestId' when calling WorkflowResourceApi->ExecuteWorkflow"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling WorkflowResourceApi->ExecuteWorkflow"); + // verify the required parameter 'version' is set + if (version == null) + throw new ApiException(400, "Missing required parameter 'version' when calling WorkflowResourceApi->ExecuteWorkflow"); + + var localVarPath = "/workflow/execute/{name}/{version}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "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 + if (version != null) localVarPathParams.Add("version", this.Configuration.ApiClient.ParameterToString(version)); // path parameter + if (requestId != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "requestId", requestId)); // query parameter + if (waitUntilTaskRef != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "waitUntilTaskRef", waitUntilTaskRef)); // query parameter + if (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + // 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); + + int localVarStatusCode = (int)localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("ExecuteWorkflow", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (WorkflowRun)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(WorkflowRun))); + } + + public Object UpdateWorkflowVariables(Workflow workflow) + { + ApiResponse localVarResponse = UpdateWorkflowVariablesWithHttpInfo(workflow); + return localVarResponse.Data; + } + + public ApiResponse UpdateWorkflowVariablesWithHttpInfo(Workflow workflow) + { + // verify the required parameter 'body' is set + if (workflow == null) + throw new ApiException(400, "Missing required parameter 'body' when calling WorkflowResourceApi->Update"); + + if (string.IsNullOrEmpty(workflow.WorkflowId)) + throw new ApiException(400, "Missing required parameter 'WorkflowId' when calling WorkflowResourceApi->Update"); + + if (workflow.Variables == null) + throw new ApiException(400, "Missing required parameter 'Variables' when calling WorkflowResourceApi->Update"); + + var localVarPath = $"/workflow/{workflow.WorkflowId}/variables"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "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); + + if (workflow != null && workflow.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(workflow.Variables); + } + + // authentication (api_key) required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken; + } + + IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + int localVarStatusCode = (int)localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("Update", localVarResponse); + 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))); + } + + /// + /// Gets the workflow by workflow id + /// + /// Thrown when fails to make API call + /// + /// (optional, default to true) + /// (optional, default to false) + /// Workflow + public Workflow GetExecutionStatus(string workflowId, bool? includeTasks = null, bool? summarize = null) + { + ApiResponse localVarResponse = GetExecutionStatusWithHttpInfo(workflowId, includeTasks, summarize); + return localVarResponse.Data; + } + + /// + /// Gets the workflow by workflow id + /// + /// Thrown when fails to make API call + /// + /// (optional, default to true) + /// (optional, default to false) + /// ApiResponse of Workflow + public ApiResponse GetExecutionStatusWithHttpInfo(string workflowId, bool? includeTasks = null, bool? summarize = null) + { + // verify the required parameter 'workflowId' is set + if (workflowId == null) + throw new ApiException(400, "Missing required parameter 'workflowId' when calling WorkflowResourceApi->GetExecutionStatus"); + + var localVarPath = "/workflow/{workflowId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = 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); + + 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 + 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); + + int localVarStatusCode = (int)localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetExecutionStatus", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Workflow)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Workflow))); + } + + /// + /// 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 TaskListSearchResultSummary GetExecutionStatusTaskList(string workflowId, int? start = null, int? count = null, string status = null) + { + ApiResponse localVarResponse = GetExecutionStatusTaskListWithHttpInfo(workflowId, start, count, status); + return localVarResponse.Data; + } + + /// + /// 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 + public ApiResponse GetExecutionStatusTaskListWithHttpInfo(string workflowId, int? start = null, int? count = null, string status = null) + { + // verify the required parameter 'workflowId' is set + if (workflowId == null) + throw new ApiException(400, "Missing required parameter 'workflowId' when calling WorkflowResourceApi->GetExecutionStatusTaskList"); + + var localVarPath = "/workflow/{workflowId}/tasks"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = 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); + + if (workflowId != null) localVarPathParams.Add("workflowId", this.Configuration.ApiClient.ParameterToString(workflowId)); // path parameter + 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 + 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); + + int localVarStatusCode = (int)localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetExecutionStatusTaskList", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + 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 + /// + /// Thrown when fails to make API call + /// + /// + /// + /// ApiResponse of ExternalStorageLocation + public ApiResponse GetExternalStorageLocationWithHttpInfo(string path, string operation, string payloadType) + { + // verify the required parameter 'path' is set + if (path == null) + throw new ApiException(400, "Missing required parameter 'path' when calling WorkflowResourceApi->GetExternalStorageLocation"); + // verify the required parameter 'operation' is set + if (operation == null) + throw new ApiException(400, "Missing required parameter 'operation' when calling WorkflowResourceApi->GetExternalStorageLocation"); + // verify the required parameter 'payloadType' is set + if (payloadType == null) + throw new ApiException(400, "Missing required parameter 'payloadType' when calling WorkflowResourceApi->GetExternalStorageLocation"); + + var localVarPath = "/workflow/externalstoragelocation"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = 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); + + 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 + 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); + + int localVarStatusCode = (int)localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetExternalStorageLocation", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (ExternalStorageLocation)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ExternalStorageLocation))); + } + + /// + /// Retrieve all the running workflows + /// + /// Thrown when fails to make API call + /// + /// (optional, default to 1) + /// (optional) + /// (optional) + /// List<string> + public List GetRunningWorkflow(string name, int? version = null, long? startTime = null, long? endTime = null) + { + ApiResponse> localVarResponse = GetRunningWorkflowWithHttpInfo(name, version, startTime, endTime); + return localVarResponse.Data; + } + + /// + /// Retrieve all the running workflows + /// + /// Thrown when fails to make API call + /// + /// (optional, default to 1) + /// (optional) + /// (optional) + /// ApiResponse of List<string> + public ApiResponse> GetRunningWorkflowWithHttpInfo(string name, int? version = null, long? startTime = null, long? endTime = null) + { + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling WorkflowResourceApi->GetRunningWorkflow"); + + var localVarPath = "/workflow/running/{name}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = 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); + + if (name != null) localVarPathParams.Add("name", this.Configuration.ApiClient.ParameterToString(name)); // path parameter + 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 + 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); + + int localVarStatusCode = (int)localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetRunningWorkflow", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse>(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (List)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); + } + + /// + /// Gets the workflow by workflow id + /// + /// Thrown when fails to make API call + /// + /// (optional, default to false) + /// (optional, default to false) + /// WorkflowStatus + public WorkflowStatus GetWorkflowStatusSummary(string workflowId, bool? includeOutput = null, bool? includeVariables = null) + { + ApiResponse localVarResponse = GetWorkflowStatusSummaryWithHttpInfo(workflowId, includeOutput, includeVariables); + return localVarResponse.Data; + } + + /// + /// Gets the workflow by workflow id + /// + /// Thrown when fails to make API call + /// + /// (optional, default to false) + /// (optional, default to false) + /// ApiResponse of WorkflowStatus + public ApiResponse GetWorkflowStatusSummaryWithHttpInfo(string workflowId, bool? includeOutput = null, bool? includeVariables = null) + { + // verify the required parameter 'workflowId' is set + if (workflowId == null) + throw new ApiException(400, "Missing required parameter 'workflowId' when calling WorkflowResourceApi->GetWorkflowStatusSummary"); + + var localVarPath = "/workflow/{workflowId}/status"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = 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); + + 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 + 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); + + int localVarStatusCode = (int)localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetWorkflowStatusSummary", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (WorkflowStatus)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(WorkflowStatus))); + } + + /// + /// 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 Dictionary> GetWorkflows(List body, string name, bool? includeClosed = null, bool? includeTasks = null) + { + ApiResponse>> localVarResponse = GetWorkflowsWithHttpInfo(body, name, includeClosed, includeTasks); + return localVarResponse.Data; + } + + /// + /// 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>> + public ApiResponse>> GetWorkflowsWithHttpInfo(List body, string name, bool? includeClosed = null, bool? includeTasks = null) + { + // verify the required parameter 'body' is set + if (body == null) + throw new ApiException(400, "Missing required parameter 'body' when calling WorkflowResourceApi->GetWorkflows"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling WorkflowResourceApi->GetWorkflows"); + + var localVarPath = "/workflow/{name}/correlated"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "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); + + if (name != null) localVarPathParams.Add("name", this.Configuration.ApiClient.ParameterToString(name)); // 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 + if (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + // 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); + + int localVarStatusCode = (int)localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetWorkflows", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse>>(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Dictionary>)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Dictionary>))); + } + + /// + /// 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 Dictionary> GetWorkflows(CorrelationIdsSearchRequest body, bool? includeClosed = null, bool? includeTasks = null) + { + ApiResponse>> localVarResponse = GetWorkflowsWithHttpInfo(body, includeClosed, includeTasks); + return localVarResponse.Data; + } + + /// + /// 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>> + public ApiResponse>> GetWorkflowsWithHttpInfo(CorrelationIdsSearchRequest body, bool? includeClosed = null, bool? includeTasks = null) + { + // verify the required parameter 'body' is set + if (body == null) + throw new ApiException(400, "Missing required parameter 'body' when calling WorkflowResourceApi->GetWorkflows"); + + var localVarPath = "/workflow/correlated/batch"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "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); + + 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 + if (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + // 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); + + int localVarStatusCode = (int)localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetWorkflows", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse>>(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Dictionary>)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Dictionary>))); + } + + /// + /// 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 List GetWorkflows(string name, string correlationId, bool? includeClosed = null, bool? includeTasks = null) + { + ApiResponse> localVarResponse = GetWorkflowsWithHttpInfo(name, correlationId, includeClosed, includeTasks); + return localVarResponse.Data; + } + + /// + /// 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> + public ApiResponse> GetWorkflowsWithHttpInfo(string name, string correlationId, bool? includeClosed = null, bool? includeTasks = null) + { + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling WorkflowResourceApi->GetWorkflows"); + // verify the required parameter 'correlationId' is set + if (correlationId == null) + throw new ApiException(400, "Missing required parameter 'correlationId' when calling WorkflowResourceApi->GetWorkflows"); + + var localVarPath = "/workflow/{name}/correlated/{correlationId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = 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); + + if (name != null) localVarPathParams.Add("name", this.Configuration.ApiClient.ParameterToString(name)); // path parameter + 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 + 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); + + int localVarStatusCode = (int)localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetWorkflows", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse>(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (List)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); + } + + /// + /// Pauses the workflow + /// + /// Thrown when fails to make API call + /// + /// + public void PauseWorkflow(string workflowId) + { + PauseWorkflowWithHttpInfo(workflowId); + } + + /// + /// Pauses the workflow + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of Object(void) + public ApiResponse PauseWorkflowWithHttpInfo(string workflowId) + { + // verify the required parameter 'workflowId' is set + if (workflowId == null) + throw new ApiException(400, "Missing required parameter 'workflowId' when calling WorkflowResourceApi->PauseWorkflow"); + + var localVarPath = "/workflow/{workflowId}/pause"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = 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); + + if (workflowId != null) localVarPathParams.Add("workflowId", this.Configuration.ApiClient.ParameterToString(workflowId)); // path parameter + // 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); + + int localVarStatusCode = (int)localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("PauseWorkflow", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + + /// + /// Jump workflow execution to given task Jump workflow execution to given task. + /// + /// Thrown when fails to make API call + /// + /// + /// (optional) + /// + public void JumpToTask(string workflowId, Dictionary input, string taskReferenceName = null) + { + JumpToTaskWithHttpInfo(input, workflowId, taskReferenceName); + } + + + /// + /// Jump workflow execution to given task Jump workflow execution to given task. + /// + /// Thrown when fails to make API call + /// + /// + /// (optional) + /// ApiResponse of Object(void) + public ApiResponse JumpToTaskWithHttpInfo(Dictionary body, string workflowId, string taskReferenceName = null) + { + // verify the required parameter 'body' is set + if (body == null) + throw new ApiException(400, "Missing required parameter 'input' when calling WorkflowResourceApi->JumpToTask"); + // verify the required parameter 'workflowId' is set + if (workflowId == null) + throw new ApiException(400, "Missing required parameter 'workflowId' when calling WorkflowResourceApi->JumpToTask"); + + var localVarPath = "/workflow/{workflowId}/jump/{taskReferenceName}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "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); + + if (workflowId != null) localVarPathParams.Add("workflowId", this.Configuration.ApiClient.ParameterToString(workflowId)); // path parameter + if (taskReferenceName != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "taskReferenceName", taskReferenceName)); // query parameter + if (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + // 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); + + int localVarStatusCode = (int)localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("JumpToTask", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + + /// + /// Reruns the workflow from a specific task + /// + /// Thrown when fails to make API call + /// + /// + /// string + public string Rerun(RerunWorkflowRequest body, string workflowId) + { + ApiResponse localVarResponse = RerunWithHttpInfo(body, workflowId); + return localVarResponse.Data; + } + + /// + /// Reruns the workflow from a specific task + /// + /// Thrown when fails to make API call + /// + /// + /// ApiResponse of string + public ApiResponse RerunWithHttpInfo(RerunWorkflowRequest body, string workflowId) + { + // verify the required parameter 'body' is set + if (body == null) + throw new ApiException(400, "Missing required parameter 'body' when calling WorkflowResourceApi->Rerun"); + // verify the required parameter 'workflowId' is set + if (workflowId == null) + throw new ApiException(400, "Missing required parameter 'workflowId' when calling WorkflowResourceApi->Rerun"); + + var localVarPath = "/workflow/{workflowId}/rerun"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "text/plain" + }; + 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 (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + // 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); + + int localVarStatusCode = (int)localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("Rerun", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (string)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(string))); + } + + /// + /// Resets callback times of all non-terminal SIMPLE tasks to 0 + /// + /// Thrown when fails to make API call + /// + /// + public void ResetWorkflow(string workflowId) + { + ResetWorkflowWithHttpInfo(workflowId); + } + + /// + /// Resets callback times of all non-terminal SIMPLE tasks to 0 + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of Object(void) + public ApiResponse ResetWorkflowWithHttpInfo(string workflowId) + { + // verify the required parameter 'workflowId' is set + if (workflowId == null) + throw new ApiException(400, "Missing required parameter 'workflowId' when calling WorkflowResourceApi->ResetWorkflow"); + + var localVarPath = "/workflow/{workflowId}/resetcallbacks"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = 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); + + if (workflowId != null) localVarPathParams.Add("workflowId", this.Configuration.ApiClient.ParameterToString(workflowId)); // path parameter + // 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); + + int localVarStatusCode = (int)localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("ResetWorkflow", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// Restarts a completed workflow + /// + /// Thrown when fails to make API call + /// + /// (optional, default to false) + /// + public void Restart(string workflowId, bool? useLatestDefinitions = null) + { + RestartWithHttpInfo(workflowId, useLatestDefinitions); + } + + /// + /// Restarts a completed workflow + /// + /// Thrown when fails to make API call + /// + /// (optional, default to false) + /// ApiResponse of Object(void) + public ApiResponse RestartWithHttpInfo(string workflowId, bool? useLatestDefinitions = null) + { + // verify the required parameter 'workflowId' is set + if (workflowId == null) + throw new ApiException(400, "Missing required parameter 'workflowId' when calling WorkflowResourceApi->Restart"); + + var localVarPath = "/workflow/{workflowId}/restart"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = 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); + + 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 + 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); + + int localVarStatusCode = (int)localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("Restart", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// Resumes the workflow + /// + /// Thrown when fails to make API call + /// + /// + public void ResumeWorkflow(string workflowId) + { + ResumeWorkflowWithHttpInfo(workflowId); + } + + /// + /// Resumes the workflow + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of Object(void) + public ApiResponse ResumeWorkflowWithHttpInfo(string workflowId) + { + // verify the required parameter 'workflowId' is set + if (workflowId == null) + throw new ApiException(400, "Missing required parameter 'workflowId' when calling WorkflowResourceApi->ResumeWorkflow"); + + var localVarPath = "/workflow/{workflowId}/resume"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = 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); + + if (workflowId != null) localVarPathParams.Add("workflowId", this.Configuration.ApiClient.ParameterToString(workflowId)); // path parameter + // 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); + + int localVarStatusCode = (int)localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("ResumeWorkflow", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// Retries the last failed task + /// + /// Thrown when fails to make API call + /// + /// (optional, default to false) + /// + public void Retry(string workflowId, bool? resumeSubworkflowTasks = null) + { + RetryWithHttpInfo(workflowId, resumeSubworkflowTasks); + } + + /// + /// Retries the last failed task + /// + /// Thrown when fails to make API call + /// + /// (optional, default to false) + /// ApiResponse of Object(void) + public ApiResponse RetryWithHttpInfo(string workflowId, bool? resumeSubworkflowTasks = null) + { + // verify the required parameter 'workflowId' is set + if (workflowId == null) + throw new ApiException(400, "Missing required parameter 'workflowId' when calling WorkflowResourceApi->Retry"); + + var localVarPath = "/workflow/{workflowId}/retry"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = 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); + + 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 + 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); + + int localVarStatusCode = (int)localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("Retry", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + 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 + public ScrollableSearchResultWorkflowSummary Search(string queryId = null, int? start = null, int? size = null, string sort = null, string freeText = null, string query = null, bool? skipCache = null) + { + ApiResponse localVarResponse = 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. + /// + /// 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 + public ApiResponse SearchWithHttpInfo(string queryId = null, int? start = null, int? size = null, string sort = null, string freeText = null, string query = null, bool? skipCache = null) + { + + var localVarPath = "/workflow/search"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = 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); + + if (queryId != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "queryId", queryId)); // query parameter + if (start != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "start", start)); // query parameter + if (size != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "size", size)); // query parameter + 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 + if (skipCache != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "skipCache", skipCache)); // query parameter + // 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); + + int localVarStatusCode = (int)localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("Search", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (ScrollableSearchResultWorkflowSummary)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ScrollableSearchResultWorkflowSummary))); + } + + /// + /// 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 SearchResultWorkflow SearchV2(int? start = null, int? size = null, string sort = null, string freeText = null, string query = null) + { + ApiResponse localVarResponse = 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. + /// + /// Thrown when fails to make API call + /// (optional, default to 0) + /// (optional, default to 100) + /// (optional) + /// (optional, default to *) + /// (optional) + /// ApiResponse of SearchResultWorkflow + public ApiResponse SearchV2WithHttpInfo(int? start = null, int? size = null, string sort = null, string freeText = null, string query = null) + { + + var localVarPath = "/workflow/search-v2"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = 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); + + if (start != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "start", start)); // query parameter + if (size != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "size", size)); // query parameter + 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 + 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); + + int localVarStatusCode = (int)localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("SearchV2", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (SearchResultWorkflow)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(SearchResultWorkflow))); + } + + /// + /// 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 SearchResultWorkflowSummary SearchWorkflowsByTasks(int? start = null, int? size = null, string sort = null, string freeText = null, string query = null) + { + ApiResponse localVarResponse = 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 + /// + /// Thrown when fails to make API call + /// (optional, default to 0) + /// (optional, default to 100) + /// (optional) + /// (optional, default to *) + /// (optional) + /// ApiResponse of SearchResultWorkflowSummary + public ApiResponse SearchWorkflowsByTasksWithHttpInfo(int? start = null, int? size = null, string sort = null, string freeText = null, string query = null) + { + + var localVarPath = "/workflow/search-by-tasks"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = 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); + + if (start != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "start", start)); // query parameter + if (size != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "size", size)); // query parameter + 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 + 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); + + int localVarStatusCode = (int)localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("SearchWorkflowsByTasks", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (SearchResultWorkflowSummary)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(SearchResultWorkflowSummary))); + } + + /// + /// 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 SearchResultWorkflow SearchWorkflowsByTasksV2(int? start = null, int? size = null, string sort = null, string freeText = null, string query = null) + { + ApiResponse localVarResponse = 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 + /// + /// Thrown when fails to make API call + /// (optional, default to 0) + /// (optional, default to 100) + /// (optional) + /// (optional, default to *) + /// (optional) + /// ApiResponse of SearchResultWorkflow + public ApiResponse SearchWorkflowsByTasksV2WithHttpInfo(int? start = null, int? size = null, string sort = null, string freeText = null, string query = null) + { + + var localVarPath = "/workflow/search-by-tasks-v2"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = 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); + + if (start != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "start", start)); // query parameter + if (size != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "size", size)); // query parameter + 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 + 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); + + int localVarStatusCode = (int)localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("SearchWorkflowsByTasksV2", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (SearchResultWorkflow)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(SearchResultWorkflow))); + } + + /// + /// Skips a given task from a current running workflow + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + public void SkipTaskFromWorkflow(string workflowId, string taskReferenceName, SkipTaskRequest skipTaskRequest) + { + SkipTaskFromWorkflowWithHttpInfo(workflowId, taskReferenceName, skipTaskRequest); + } + + /// + /// Skips a given task from a current running workflow + /// + /// Thrown when fails to make API call + /// + /// + /// + /// ApiResponse of Object(void) + public ApiResponse SkipTaskFromWorkflowWithHttpInfo(string workflowId, string taskReferenceName, SkipTaskRequest skipTaskRequest) + { + // verify the required parameter 'workflowId' is set + if (workflowId == null) + throw new ApiException(400, "Missing required parameter 'workflowId' when calling WorkflowResourceApi->SkipTaskFromWorkflow"); + // verify the required parameter 'taskReferenceName' is set + if (taskReferenceName == null) + throw new ApiException(400, "Missing required parameter 'taskReferenceName' when calling WorkflowResourceApi->SkipTaskFromWorkflow"); + // verify the required parameter 'skipTaskRequest' is set + if (skipTaskRequest == null) + throw new ApiException(400, "Missing required parameter 'skipTaskRequest' when calling WorkflowResourceApi->SkipTaskFromWorkflow"); + + var localVarPath = "/workflow/{workflowId}/skiptask/{taskReferenceName}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = 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); + + 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 + 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); + + int localVarStatusCode = (int)localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("SkipTaskFromWorkflow", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// Start a new workflow with StartWorkflowRequest, which allows task to be executed in a domain + /// + /// Thrown when fails to make API call + /// + /// string + public string StartWorkflow(StartWorkflowRequest body) + { + ApiResponse localVarResponse = StartWorkflowWithHttpInfo(body); + return localVarResponse.Data; + } + + /// + /// 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 + public ApiResponse StartWorkflowWithHttpInfo(StartWorkflowRequest body) + { + // verify the required parameter 'body' is set + if (body == null) + throw new ApiException(400, "Missing required parameter 'body' when calling WorkflowResourceApi->StartWorkflow"); + + var localVarPath = "/workflow"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "text/plain" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + // 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); + + int localVarStatusCode = (int)localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("StartWorkflow", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (string)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(string))); + } + + /// + /// 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 string StartWorkflow(string name, Dictionary body, int? version = null, string correlationId = null, int? priority = null) + { + ApiResponse localVarResponse = 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 + /// + /// Thrown when fails to make API call + /// + /// + /// (optional) + /// (optional) + /// (optional, default to 0) + /// ApiResponse of string + public ApiResponse StartWorkflowWithHttpInfo(string name, Dictionary body, int? version = null, string correlationId = null, int? priority = null) + { + // verify the required parameter 'body' is set + if (body == null) + throw new ApiException(400, "Missing required parameter 'body' when calling WorkflowResourceApi->StartWorkflow"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling WorkflowResourceApi->StartWorkflow"); + + var localVarPath = "/workflow/{name}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "text/plain" + }; + 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 + if (version != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "version", version)); // query parameter + if (correlationId != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "correlationId", correlationId)); // query parameter + if (priority != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "priority", priority)); // query parameter + if (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + // 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); + + int localVarStatusCode = (int)localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("StartWorkflow", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (string)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(string))); + } + + /// + /// Terminate workflow execution + /// + /// Thrown when fails to make API call + /// + /// (optional) + /// (optional, default to false) + /// + public void Terminate(string workflowId, string reason = null, bool? triggerFailureWorkflow = null) + { + TerminateWithHttpInfo(workflowId, reason, triggerFailureWorkflow); + } + + /// + /// Terminate workflow execution + /// + /// Thrown when fails to make API call + /// + /// (optional) + /// (optional, default to false) + /// ApiResponse of Object(void) + public ApiResponse TerminateWithHttpInfo(string workflowId, string reason = null, bool? triggerFailureWorkflow = null) + { + // verify the required parameter 'workflowId' is set + if (workflowId == null) + throw new ApiException(400, "Missing required parameter 'workflowId' when calling WorkflowResourceApi->Terminate"); + + var localVarPath = "/workflow/{workflowId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = 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); + + 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 + 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); + + int localVarStatusCode = (int)localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("Terminate", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// Test workflow execution using mock data + /// + /// Thrown when fails to make API call + /// + /// Workflow + public Workflow TestWorkflow(WorkflowTestRequest body) + { + ApiResponse localVarResponse = TestWorkflowWithHttpInfo(body); + return localVarResponse.Data; + } + + /// + /// Test workflow execution using mock data + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of Workflow + public ApiResponse TestWorkflowWithHttpInfo(WorkflowTestRequest body) + { + // verify the required parameter 'body' is set + if (body == null) + throw new ApiException(400, "Missing required parameter 'body' when calling WorkflowResourceApi->TestWorkflow"); + + var localVarPath = "/workflow/test"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + // 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); + + int localVarStatusCode = (int)localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("TestWorkflow", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Workflow)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Workflow))); + } + + /// + /// Force upload all completed workflows to document store + /// + /// Thrown when fails to make API call + /// Object + public Object UploadCompletedWorkflows() + { + ApiResponse localVarResponse = UploadCompletedWorkflowsWithHttpInfo(); + return localVarResponse.Data; + } + + /// + /// Force upload all completed workflows to document store + /// + /// Thrown when fails to make API call + /// ApiResponse of Object + public ApiResponse UploadCompletedWorkflowsWithHttpInfo() + { + + var localVarPath = "/workflow/document-store/upload"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = 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); + + // 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); + + int localVarStatusCode = (int)localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("UploadCompletedWorkflows", localVarResponse); + 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))); + } + } } diff --git a/Conductor/Client/Extensions/ConductorTaskExtensions.cs b/Conductor/Client/Extensions/ConductorTaskExtensions.cs index b56968e9..b7303ec6 100644 --- a/Conductor/Client/Extensions/ConductorTaskExtensions.cs +++ b/Conductor/Client/Extensions/ConductorTaskExtensions.cs @@ -18,7 +18,7 @@ public static TaskResult InProgress(this Task task, string log = null, long? cal { new TaskExecLog { TaskId = task.TaskId, Log = log, CreatedTime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds() } }, - callbackAfterSeconds: callbackAfterSeconds.Value + callbackAfterSeconds: callbackAfterSeconds ); } diff --git a/Conductor/Definition/ConductorWorkflow.cs b/Conductor/Definition/ConductorWorkflow.cs index f7d44657..0a6d5948 100644 --- a/Conductor/Definition/ConductorWorkflow.cs +++ b/Conductor/Definition/ConductorWorkflow.cs @@ -3,83 +3,91 @@ namespace Conductor.Definition { - public class ConductorWorkflow : WorkflowDef - { - public ConductorWorkflow() : base(name: "", tasks: new List(), timeoutSeconds: 0) - { - InputParameters = new List(); - } + public class ConductorWorkflow : WorkflowDef + { + public ConductorWorkflow() : base(name: "", tasks: new List(), timeoutSeconds: 0) + { + InputParameters = new List(); + } - public ConductorWorkflow WithName(string name) - { - Name = name; - return this; - } + public ConductorWorkflow WithName(string name) + { + Name = name; + return this; + } - public ConductorWorkflow WithVersion(int version) - { - Version = version; - return this; - } + public ConductorWorkflow WithVersion(int version) + { + Version = version; + return this; + } - public ConductorWorkflow WithDescription(string description) - { - Description = description; - return this; - } + public ConductorWorkflow WithDescription(string description) + { + Description = description; + return this; + } - public ConductorWorkflow WithTimeoutPolicy(WorkflowDef.TimeoutPolicyEnum timeoutPolicy, int timeoutSeconds) - { - TimeoutPolicy = timeoutPolicy; - TimeoutSeconds = timeoutSeconds; - return this; - } + public ConductorWorkflow WithTimeoutPolicy(WorkflowDef.TimeoutPolicyEnum timeoutPolicy, int timeoutSeconds) + { + TimeoutPolicy = timeoutPolicy; + TimeoutSeconds = timeoutSeconds; + return this; + } - public ConductorWorkflow WithTask(params WorkflowTask[] tasks) - { - foreach (WorkflowTask task in tasks) - { - Tasks.Add(task); - } - return this; - } + public ConductorWorkflow WithTask(params WorkflowTask[] tasks) + { + foreach (WorkflowTask task in tasks) + { + Tasks.Add(task); + } + return this; + } - public ConductorWorkflow WithFailureWorkflow(string failureWorkflow) - { - FailureWorkflow = failureWorkflow; - return this; - } + public ConductorWorkflow WithFailureWorkflow(string failureWorkflow) + { + FailureWorkflow = failureWorkflow; + return this; + } - public ConductorWorkflow WithRestartable(bool restartable) - { - Restartable = restartable; - return this; - } + public ConductorWorkflow WithRestartable(bool restartable) + { + Restartable = restartable; + return this; + } - public ConductorWorkflow WithOutputParameter(string key, object value) - { - OutputParameters.Add(key, value); - return this; - } + public ConductorWorkflow WithOutputParameter(string key, object value) + { + OutputParameters.Add(key, value); + return this; + } - public ConductorWorkflow WithOwner(string ownerEmail) - { - OwnerEmail = ownerEmail; - return this; - } + public ConductorWorkflow WithVariable(string key, object value) + { + if (Variables == null) // if workflow does not have any variables, initialize with empty collection + Variables = new Dictionary(); + Variables.Add(key, value); + return this; + } - public ConductorWorkflow WithInputParameter(string key) - { - InputParameters.Add(key); - return this; - } + public ConductorWorkflow WithOwner(string ownerEmail) + { + OwnerEmail = ownerEmail; + return this; + } - public StartWorkflowRequest GetStartWorkflowRequest() - { - return new StartWorkflowRequest( - name: Name, - version: Version - ); - } - } + public ConductorWorkflow WithInputParameter(string key) + { + InputParameters.Add(key); + return this; + } + + public StartWorkflowRequest GetStartWorkflowRequest() + { + return new StartWorkflowRequest( + name: Name, + version: Version + ); + } + } } diff --git a/Tests/Api/WorkflowResourceApiTest.cs b/Tests/Api/WorkflowResourceApiTest.cs new file mode 100644 index 00000000..527ea411 --- /dev/null +++ b/Tests/Api/WorkflowResourceApiTest.cs @@ -0,0 +1,97 @@ +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; + +namespace conductor_csharp.test.Api +{ + public class WorkflowResourceApiTest + { + private const string WORKFLOW_NAME = "TestToCreateVariables"; + private const string TASK_NAME = "TestToCreateVariables_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 readonly WorkflowResourceApi _workflowClient; + private readonly ILogger _logger; + + public WorkflowResourceApiTest() + { + _workflowClient = ApiExtensions.GetClient(); + _logger = ApplicationLogging.CreateLogger(); + } + + [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); + + // Create variables collection with values to be updated + var updateDict = new Dictionary { + {WORKFLOW_VARIABLE_1,"Value1" }, + {WORKFLOW_VARIABLE_2,"Value2" }, + }; + var updateVariableData = new Workflow() { WorkflowId = workflowId, Variables = updateDict }; + // Update the work flow variables + _workflowClient.UpdateWorkflowVariables(updateVariableData); + // Fetch latest workflow data to validate the change in variables + var _updatedWorkFlow = _workflowClient.GetWorkflowStatusSummary(workflowId, includeVariables: true); + // Verify workflow variables data is equal with input passed + Assert.Equal(_updatedWorkFlow.Variables, updateDict); + } + + private async System.Threading.Tasks.Task ExecuteWorkflowTasks(TimeSpan workflowCompletionTimeout) + { + var host = WorkflowTaskHost.CreateWorkerHost(LogLevel.Information, new ClassWorker()); + await host.StartAsync(); + Thread.Sleep(workflowCompletionTimeout); + await host.StopAsync(); + } + + private ConductorWorkflow GetConductorWorkflow() + { + return new ConductorWorkflow() + .WithName(WORKFLOW_NAME) + .WithVersion(WORKFLOW_VERSION) + .WithDescription(WORKFLOW_DESC) + .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) + { + 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); + } + } +} diff --git a/csharp-examples/WorkFlowExamples.cs b/csharp-examples/WorkFlowExamples.cs new file mode 100644 index 00000000..41c952f7 --- /dev/null +++ b/csharp-examples/WorkFlowExamples.cs @@ -0,0 +1,77 @@ +using Conductor.Client; +using Conductor.Definition.TaskType; +using Conductor.Definition; +using Conductor.Executor; +using Conductor.Api; +using Conductor.Client.Authentication; + +namespace csharp_examples +{ + public class WorkFlowExamples + { + + private const string KEY_ID = ""; + private const string KEY_SECRET = ""; + private const string OWNER_EMAIL = ""; + + private const string WORKFLOW_ID = ""; + private const string WORKFLOW_NAME = ""; + private const string WORKFLOW_DESCRIPTION = ""; + private const string TASK_NAME = ""; + private const string TASK_REFERENCE = ""; + + private const string VARIABLE_OLD_VALUE = "SOME_OLD_VALUE"; + private const string VARIABLE_NAME_1 = ""; + private const string VARIABLE_VALUE_1 = ""; + private const string VARIABLE_NAME_2 = ""; + private const string VARIABLE_VALUE_2 = ""; + + + public void RegisterWorkFlow() + { + Configuration configuration = new Configuration() + { + AuthenticationSettings = new OrkesAuthenticationSettings(KEY_ID, KEY_SECRET) + }; + + WorkflowExecutor executor = new WorkflowExecutor(configuration); + executor.RegisterWorkflow(GetConductorWorkflow(), true); + } + + private ConductorWorkflow GetConductorWorkflow() + { + var conductorWorkFlow = new ConductorWorkflow() + .WithName(WORKFLOW_NAME).WithDescription(WORKFLOW_DESCRIPTION) + .WithTask(new SimpleTask(TASK_NAME, TASK_REFERENCE)) + .WithOwner(OWNER_EMAIL); + + var workflowVariableTobeAdded = new Dictionary + { + { VARIABLE_NAME_1, VARIABLE_VALUE_1 }, + { VARIABLE_NAME_2, VARIABLE_VALUE_2 } + }; + + conductorWorkFlow.Variables = workflowVariableTobeAdded; + return conductorWorkFlow; + } + + public void UpdateWorkflowVariablesWithWorkFlowId() + { + var orkesApiClient = new OrkesApiClient(new Configuration(), + new OrkesAuthenticationSettings(KEY_ID, KEY_SECRET)); + var workflowClient = orkesApiClient.GetClient(); + var workFlowVariables = new Dictionary + { + { VARIABLE_NAME_1, VARIABLE_OLD_VALUE }, + { VARIABLE_NAME_2, VARIABLE_OLD_VALUE } + }; + + workflowClient.UpdateWorkflowVariables(new Conductor.Client.Models.Workflow() + { + WorkflowId = WORKFLOW_ID, + Variables = workFlowVariables + }); + } + + } +} From a09fdb2f538a186c441d1037e882f098dbc77c10 Mon Sep 17 00:00:00 2001 From: "Jithesh.Poojary" Date: Wed, 10 Jan 2024 13:18:05 +0530 Subject: [PATCH 2/9] Revert "Changes to address the below" This reverts commit 67d56b41ecbd4e55722f04b7af70c7e367a99e86. --- Conductor/Api/WorkflowResourceApi.cs | 6026 ++++++++--------- .../Extensions/ConductorTaskExtensions.cs | 2 +- Conductor/Definition/ConductorWorkflow.cs | 144 +- Tests/Api/WorkflowResourceApiTest.cs | 97 - csharp-examples/WorkFlowExamples.cs | 77 - 5 files changed, 3046 insertions(+), 3300 deletions(-) delete mode 100644 Tests/Api/WorkflowResourceApiTest.cs delete mode 100644 csharp-examples/WorkFlowExamples.cs diff --git a/Conductor/Api/WorkflowResourceApi.cs b/Conductor/Api/WorkflowResourceApi.cs index ec58d438..f0969e27 100644 --- a/Conductor/Api/WorkflowResourceApi.cs +++ b/Conductor/Api/WorkflowResourceApi.cs @@ -7,3053 +7,2981 @@ 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 - /// - public partial class WorkflowResourceApi : IWorkflowResourceApi - { - private Conductor.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public WorkflowResourceApi(String basePath) - { - this.Configuration = new Conductor.Client.Configuration { BasePath = basePath }; - - ExceptionFactory = Conductor.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// - /// - public WorkflowResourceApi() - { - this.Configuration = Conductor.Client.Configuration.Default; - - ExceptionFactory = Conductor.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// using Configuration object - /// - /// An instance of Configuration - /// - public WorkflowResourceApi(Conductor.Client.Configuration configuration = null) - { - if (configuration == null) // use the default one in Configuration - this.Configuration = Conductor.Client.Configuration.Default; - else - this.Configuration = configuration; - - ExceptionFactory = Conductor.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Gets the base path of the API client. - /// - /// The base path - public String GetBasePath() - { - return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); - } - - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - public Conductor.Client.Configuration Configuration { get; set; } - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - public Conductor.Client.ExceptionFactory ExceptionFactory - { - get - { - if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) - { - throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); - } - return _exceptionFactory; - } - set { _exceptionFactory = value; } - } - - /// - /// Starts the decision task for a workflow - /// - /// Thrown when fails to make API call - /// - /// - public void Decide(string workflowId) - { - DecideWithHttpInfo(workflowId); - } - - /// - /// Starts the decision task for a workflow - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of Object(void) - public ApiResponse DecideWithHttpInfo(string workflowId) - { - // verify the required parameter 'workflowId' is set - if (workflowId == null) - throw new ApiException(400, "Missing required parameter 'workflowId' when calling WorkflowResourceApi->Decide"); - - var localVarPath = "/workflow/decide/{workflowId}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = 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); - - if (workflowId != null) localVarPathParams.Add("workflowId", this.Configuration.ApiClient.ParameterToString(workflowId)); // path parameter - // 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); - - int localVarStatusCode = (int)localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("Decide", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Removes the workflow from the system - /// - /// Thrown when fails to make API call - /// - /// (optional, default to true) - /// - public void Delete(string workflowId, bool? archiveWorkflow = null) - { - DeleteWithHttpInfo(workflowId, archiveWorkflow); - } - - /// - /// Removes the workflow from the system - /// - /// Thrown when fails to make API call - /// - /// (optional, default to true) - /// ApiResponse of Object(void) - public ApiResponse DeleteWithHttpInfo(string workflowId, bool? archiveWorkflow = null) - { - // verify the required parameter 'workflowId' is set - if (workflowId == null) - throw new ApiException(400, "Missing required parameter 'workflowId' when calling WorkflowResourceApi->Delete"); - - var localVarPath = "/workflow/{workflowId}/remove"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = 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); - - 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 - 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); - - int localVarStatusCode = (int)localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("Delete", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Execute a workflow synchronously - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// (optional) - /// WorkflowRun - public WorkflowRun ExecuteWorkflow(StartWorkflowRequest body, string requestId, string name, int? version, string waitUntilTaskRef = null) - { - ApiResponse localVarResponse = ExecuteWorkflowWithHttpInfo(body, requestId, name, version, waitUntilTaskRef); - return localVarResponse.Data; - } - - /// - /// Execute a workflow synchronously - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// (optional) - /// ApiResponse of WorkflowRun - public ApiResponse ExecuteWorkflowWithHttpInfo(StartWorkflowRequest body, string requestId, string name, int? version, string waitUntilTaskRef = null) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling WorkflowResourceApi->ExecuteWorkflow"); - // verify the required parameter 'requestId' is set - if (requestId == null) - throw new ApiException(400, "Missing required parameter 'requestId' when calling WorkflowResourceApi->ExecuteWorkflow"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling WorkflowResourceApi->ExecuteWorkflow"); - // verify the required parameter 'version' is set - if (version == null) - throw new ApiException(400, "Missing required parameter 'version' when calling WorkflowResourceApi->ExecuteWorkflow"); - - var localVarPath = "/workflow/execute/{name}/{version}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "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 - if (version != null) localVarPathParams.Add("version", this.Configuration.ApiClient.ParameterToString(version)); // path parameter - if (requestId != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "requestId", requestId)); // query parameter - if (waitUntilTaskRef != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "waitUntilTaskRef", waitUntilTaskRef)); // query parameter - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - // 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); - - int localVarStatusCode = (int)localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("ExecuteWorkflow", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (WorkflowRun)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(WorkflowRun))); - } - - public Object UpdateWorkflowVariables(Workflow workflow) - { - ApiResponse localVarResponse = UpdateWorkflowVariablesWithHttpInfo(workflow); - return localVarResponse.Data; - } - - public ApiResponse UpdateWorkflowVariablesWithHttpInfo(Workflow workflow) - { - // verify the required parameter 'body' is set - if (workflow == null) - throw new ApiException(400, "Missing required parameter 'body' when calling WorkflowResourceApi->Update"); - - if (string.IsNullOrEmpty(workflow.WorkflowId)) - throw new ApiException(400, "Missing required parameter 'WorkflowId' when calling WorkflowResourceApi->Update"); - - if (workflow.Variables == null) - throw new ApiException(400, "Missing required parameter 'Variables' when calling WorkflowResourceApi->Update"); - - var localVarPath = $"/workflow/{workflow.WorkflowId}/variables"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "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); - - if (workflow != null && workflow.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(workflow.Variables); - } - - // authentication (api_key) required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken; - } - - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - int localVarStatusCode = (int)localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("Update", localVarResponse); - 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))); - } - - /// - /// Gets the workflow by workflow id - /// - /// Thrown when fails to make API call - /// - /// (optional, default to true) - /// (optional, default to false) - /// Workflow - public Workflow GetExecutionStatus(string workflowId, bool? includeTasks = null, bool? summarize = null) - { - ApiResponse localVarResponse = GetExecutionStatusWithHttpInfo(workflowId, includeTasks, summarize); - return localVarResponse.Data; - } - - /// - /// Gets the workflow by workflow id - /// - /// Thrown when fails to make API call - /// - /// (optional, default to true) - /// (optional, default to false) - /// ApiResponse of Workflow - public ApiResponse GetExecutionStatusWithHttpInfo(string workflowId, bool? includeTasks = null, bool? summarize = null) - { - // verify the required parameter 'workflowId' is set - if (workflowId == null) - throw new ApiException(400, "Missing required parameter 'workflowId' when calling WorkflowResourceApi->GetExecutionStatus"); - - var localVarPath = "/workflow/{workflowId}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = 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); - - 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 - 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); - - int localVarStatusCode = (int)localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetExecutionStatus", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Workflow)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Workflow))); - } - - /// - /// 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 TaskListSearchResultSummary GetExecutionStatusTaskList(string workflowId, int? start = null, int? count = null, string status = null) - { - ApiResponse localVarResponse = GetExecutionStatusTaskListWithHttpInfo(workflowId, start, count, status); - return localVarResponse.Data; - } - - /// - /// 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 - public ApiResponse GetExecutionStatusTaskListWithHttpInfo(string workflowId, int? start = null, int? count = null, string status = null) - { - // verify the required parameter 'workflowId' is set - if (workflowId == null) - throw new ApiException(400, "Missing required parameter 'workflowId' when calling WorkflowResourceApi->GetExecutionStatusTaskList"); - - var localVarPath = "/workflow/{workflowId}/tasks"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = 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); - - if (workflowId != null) localVarPathParams.Add("workflowId", this.Configuration.ApiClient.ParameterToString(workflowId)); // path parameter - 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 - 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); - - int localVarStatusCode = (int)localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetExecutionStatusTaskList", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - 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 - /// - /// Thrown when fails to make API call - /// - /// - /// - /// ApiResponse of ExternalStorageLocation - public ApiResponse GetExternalStorageLocationWithHttpInfo(string path, string operation, string payloadType) - { - // verify the required parameter 'path' is set - if (path == null) - throw new ApiException(400, "Missing required parameter 'path' when calling WorkflowResourceApi->GetExternalStorageLocation"); - // verify the required parameter 'operation' is set - if (operation == null) - throw new ApiException(400, "Missing required parameter 'operation' when calling WorkflowResourceApi->GetExternalStorageLocation"); - // verify the required parameter 'payloadType' is set - if (payloadType == null) - throw new ApiException(400, "Missing required parameter 'payloadType' when calling WorkflowResourceApi->GetExternalStorageLocation"); - - var localVarPath = "/workflow/externalstoragelocation"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = 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); - - 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 - 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); - - int localVarStatusCode = (int)localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetExternalStorageLocation", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (ExternalStorageLocation)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ExternalStorageLocation))); - } - - /// - /// Retrieve all the running workflows - /// - /// Thrown when fails to make API call - /// - /// (optional, default to 1) - /// (optional) - /// (optional) - /// List<string> - public List GetRunningWorkflow(string name, int? version = null, long? startTime = null, long? endTime = null) - { - ApiResponse> localVarResponse = GetRunningWorkflowWithHttpInfo(name, version, startTime, endTime); - return localVarResponse.Data; - } - - /// - /// Retrieve all the running workflows - /// - /// Thrown when fails to make API call - /// - /// (optional, default to 1) - /// (optional) - /// (optional) - /// ApiResponse of List<string> - public ApiResponse> GetRunningWorkflowWithHttpInfo(string name, int? version = null, long? startTime = null, long? endTime = null) - { - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling WorkflowResourceApi->GetRunningWorkflow"); - - var localVarPath = "/workflow/running/{name}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = 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); - - if (name != null) localVarPathParams.Add("name", this.Configuration.ApiClient.ParameterToString(name)); // path parameter - 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 - 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); - - int localVarStatusCode = (int)localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetRunningWorkflow", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (List)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); - } - - /// - /// Gets the workflow by workflow id - /// - /// Thrown when fails to make API call - /// - /// (optional, default to false) - /// (optional, default to false) - /// WorkflowStatus - public WorkflowStatus GetWorkflowStatusSummary(string workflowId, bool? includeOutput = null, bool? includeVariables = null) - { - ApiResponse localVarResponse = GetWorkflowStatusSummaryWithHttpInfo(workflowId, includeOutput, includeVariables); - return localVarResponse.Data; - } - - /// - /// Gets the workflow by workflow id - /// - /// Thrown when fails to make API call - /// - /// (optional, default to false) - /// (optional, default to false) - /// ApiResponse of WorkflowStatus - public ApiResponse GetWorkflowStatusSummaryWithHttpInfo(string workflowId, bool? includeOutput = null, bool? includeVariables = null) - { - // verify the required parameter 'workflowId' is set - if (workflowId == null) - throw new ApiException(400, "Missing required parameter 'workflowId' when calling WorkflowResourceApi->GetWorkflowStatusSummary"); - - var localVarPath = "/workflow/{workflowId}/status"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = 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); - - 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 - 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); - - int localVarStatusCode = (int)localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetWorkflowStatusSummary", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (WorkflowStatus)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(WorkflowStatus))); - } - - /// - /// 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 Dictionary> GetWorkflows(List body, string name, bool? includeClosed = null, bool? includeTasks = null) - { - ApiResponse>> localVarResponse = GetWorkflowsWithHttpInfo(body, name, includeClosed, includeTasks); - return localVarResponse.Data; - } - - /// - /// 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>> - public ApiResponse>> GetWorkflowsWithHttpInfo(List body, string name, bool? includeClosed = null, bool? includeTasks = null) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling WorkflowResourceApi->GetWorkflows"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling WorkflowResourceApi->GetWorkflows"); - - var localVarPath = "/workflow/{name}/correlated"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "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); - - if (name != null) localVarPathParams.Add("name", this.Configuration.ApiClient.ParameterToString(name)); // 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 - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - // 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); - - int localVarStatusCode = (int)localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetWorkflows", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse>>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Dictionary>)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Dictionary>))); - } - - /// - /// 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 Dictionary> GetWorkflows(CorrelationIdsSearchRequest body, bool? includeClosed = null, bool? includeTasks = null) - { - ApiResponse>> localVarResponse = GetWorkflowsWithHttpInfo(body, includeClosed, includeTasks); - return localVarResponse.Data; - } - - /// - /// 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>> - public ApiResponse>> GetWorkflowsWithHttpInfo(CorrelationIdsSearchRequest body, bool? includeClosed = null, bool? includeTasks = null) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling WorkflowResourceApi->GetWorkflows"); - - var localVarPath = "/workflow/correlated/batch"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "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); - - 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 - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - // 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); - - int localVarStatusCode = (int)localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetWorkflows", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse>>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Dictionary>)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Dictionary>))); - } - - /// - /// 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 List GetWorkflows(string name, string correlationId, bool? includeClosed = null, bool? includeTasks = null) - { - ApiResponse> localVarResponse = GetWorkflowsWithHttpInfo(name, correlationId, includeClosed, includeTasks); - return localVarResponse.Data; - } - - /// - /// 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> - public ApiResponse> GetWorkflowsWithHttpInfo(string name, string correlationId, bool? includeClosed = null, bool? includeTasks = null) - { - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling WorkflowResourceApi->GetWorkflows"); - // verify the required parameter 'correlationId' is set - if (correlationId == null) - throw new ApiException(400, "Missing required parameter 'correlationId' when calling WorkflowResourceApi->GetWorkflows"); - - var localVarPath = "/workflow/{name}/correlated/{correlationId}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = 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); - - if (name != null) localVarPathParams.Add("name", this.Configuration.ApiClient.ParameterToString(name)); // path parameter - 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 - 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); - - int localVarStatusCode = (int)localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetWorkflows", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (List)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); - } - - /// - /// Pauses the workflow - /// - /// Thrown when fails to make API call - /// - /// - public void PauseWorkflow(string workflowId) - { - PauseWorkflowWithHttpInfo(workflowId); - } - - /// - /// Pauses the workflow - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of Object(void) - public ApiResponse PauseWorkflowWithHttpInfo(string workflowId) - { - // verify the required parameter 'workflowId' is set - if (workflowId == null) - throw new ApiException(400, "Missing required parameter 'workflowId' when calling WorkflowResourceApi->PauseWorkflow"); - - var localVarPath = "/workflow/{workflowId}/pause"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = 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); - - if (workflowId != null) localVarPathParams.Add("workflowId", this.Configuration.ApiClient.ParameterToString(workflowId)); // path parameter - // 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); - - int localVarStatusCode = (int)localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("PauseWorkflow", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - - /// - /// Jump workflow execution to given task Jump workflow execution to given task. - /// - /// Thrown when fails to make API call - /// - /// - /// (optional) - /// - public void JumpToTask(string workflowId, Dictionary input, string taskReferenceName = null) - { - JumpToTaskWithHttpInfo(input, workflowId, taskReferenceName); - } - - - /// - /// Jump workflow execution to given task Jump workflow execution to given task. - /// - /// Thrown when fails to make API call - /// - /// - /// (optional) - /// ApiResponse of Object(void) - public ApiResponse JumpToTaskWithHttpInfo(Dictionary body, string workflowId, string taskReferenceName = null) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'input' when calling WorkflowResourceApi->JumpToTask"); - // verify the required parameter 'workflowId' is set - if (workflowId == null) - throw new ApiException(400, "Missing required parameter 'workflowId' when calling WorkflowResourceApi->JumpToTask"); - - var localVarPath = "/workflow/{workflowId}/jump/{taskReferenceName}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "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); - - if (workflowId != null) localVarPathParams.Add("workflowId", this.Configuration.ApiClient.ParameterToString(workflowId)); // path parameter - if (taskReferenceName != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "taskReferenceName", taskReferenceName)); // query parameter - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - // 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); - - int localVarStatusCode = (int)localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("JumpToTask", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - - /// - /// Reruns the workflow from a specific task - /// - /// Thrown when fails to make API call - /// - /// - /// string - public string Rerun(RerunWorkflowRequest body, string workflowId) - { - ApiResponse localVarResponse = RerunWithHttpInfo(body, workflowId); - return localVarResponse.Data; - } - - /// - /// Reruns the workflow from a specific task - /// - /// Thrown when fails to make API call - /// - /// - /// ApiResponse of string - public ApiResponse RerunWithHttpInfo(RerunWorkflowRequest body, string workflowId) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling WorkflowResourceApi->Rerun"); - // verify the required parameter 'workflowId' is set - if (workflowId == null) - throw new ApiException(400, "Missing required parameter 'workflowId' when calling WorkflowResourceApi->Rerun"); - - var localVarPath = "/workflow/{workflowId}/rerun"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "text/plain" - }; - 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 (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - // 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); - - int localVarStatusCode = (int)localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("Rerun", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (string)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(string))); - } - - /// - /// Resets callback times of all non-terminal SIMPLE tasks to 0 - /// - /// Thrown when fails to make API call - /// - /// - public void ResetWorkflow(string workflowId) - { - ResetWorkflowWithHttpInfo(workflowId); - } - - /// - /// Resets callback times of all non-terminal SIMPLE tasks to 0 - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of Object(void) - public ApiResponse ResetWorkflowWithHttpInfo(string workflowId) - { - // verify the required parameter 'workflowId' is set - if (workflowId == null) - throw new ApiException(400, "Missing required parameter 'workflowId' when calling WorkflowResourceApi->ResetWorkflow"); - - var localVarPath = "/workflow/{workflowId}/resetcallbacks"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = 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); - - if (workflowId != null) localVarPathParams.Add("workflowId", this.Configuration.ApiClient.ParameterToString(workflowId)); // path parameter - // 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); - - int localVarStatusCode = (int)localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("ResetWorkflow", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Restarts a completed workflow - /// - /// Thrown when fails to make API call - /// - /// (optional, default to false) - /// - public void Restart(string workflowId, bool? useLatestDefinitions = null) - { - RestartWithHttpInfo(workflowId, useLatestDefinitions); - } - - /// - /// Restarts a completed workflow - /// - /// Thrown when fails to make API call - /// - /// (optional, default to false) - /// ApiResponse of Object(void) - public ApiResponse RestartWithHttpInfo(string workflowId, bool? useLatestDefinitions = null) - { - // verify the required parameter 'workflowId' is set - if (workflowId == null) - throw new ApiException(400, "Missing required parameter 'workflowId' when calling WorkflowResourceApi->Restart"); - - var localVarPath = "/workflow/{workflowId}/restart"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = 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); - - 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 - 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); - - int localVarStatusCode = (int)localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("Restart", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Resumes the workflow - /// - /// Thrown when fails to make API call - /// - /// - public void ResumeWorkflow(string workflowId) - { - ResumeWorkflowWithHttpInfo(workflowId); - } - - /// - /// Resumes the workflow - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of Object(void) - public ApiResponse ResumeWorkflowWithHttpInfo(string workflowId) - { - // verify the required parameter 'workflowId' is set - if (workflowId == null) - throw new ApiException(400, "Missing required parameter 'workflowId' when calling WorkflowResourceApi->ResumeWorkflow"); - - var localVarPath = "/workflow/{workflowId}/resume"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = 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); - - if (workflowId != null) localVarPathParams.Add("workflowId", this.Configuration.ApiClient.ParameterToString(workflowId)); // path parameter - // 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); - - int localVarStatusCode = (int)localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("ResumeWorkflow", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Retries the last failed task - /// - /// Thrown when fails to make API call - /// - /// (optional, default to false) - /// - public void Retry(string workflowId, bool? resumeSubworkflowTasks = null) - { - RetryWithHttpInfo(workflowId, resumeSubworkflowTasks); - } - - /// - /// Retries the last failed task - /// - /// Thrown when fails to make API call - /// - /// (optional, default to false) - /// ApiResponse of Object(void) - public ApiResponse RetryWithHttpInfo(string workflowId, bool? resumeSubworkflowTasks = null) - { - // verify the required parameter 'workflowId' is set - if (workflowId == null) - throw new ApiException(400, "Missing required parameter 'workflowId' when calling WorkflowResourceApi->Retry"); - - var localVarPath = "/workflow/{workflowId}/retry"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = 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); - - 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 - 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); - - int localVarStatusCode = (int)localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("Retry", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - 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 - public ScrollableSearchResultWorkflowSummary Search(string queryId = null, int? start = null, int? size = null, string sort = null, string freeText = null, string query = null, bool? skipCache = null) - { - ApiResponse localVarResponse = 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. - /// - /// 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 - public ApiResponse SearchWithHttpInfo(string queryId = null, int? start = null, int? size = null, string sort = null, string freeText = null, string query = null, bool? skipCache = null) - { - - var localVarPath = "/workflow/search"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = 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); - - if (queryId != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "queryId", queryId)); // query parameter - if (start != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "start", start)); // query parameter - if (size != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "size", size)); // query parameter - 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 - if (skipCache != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "skipCache", skipCache)); // query parameter - // 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); - - int localVarStatusCode = (int)localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("Search", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (ScrollableSearchResultWorkflowSummary)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ScrollableSearchResultWorkflowSummary))); - } - - /// - /// 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 SearchResultWorkflow SearchV2(int? start = null, int? size = null, string sort = null, string freeText = null, string query = null) - { - ApiResponse localVarResponse = 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. - /// - /// Thrown when fails to make API call - /// (optional, default to 0) - /// (optional, default to 100) - /// (optional) - /// (optional, default to *) - /// (optional) - /// ApiResponse of SearchResultWorkflow - public ApiResponse SearchV2WithHttpInfo(int? start = null, int? size = null, string sort = null, string freeText = null, string query = null) - { - - var localVarPath = "/workflow/search-v2"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = 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); - - if (start != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "start", start)); // query parameter - if (size != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "size", size)); // query parameter - 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 - 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); - - int localVarStatusCode = (int)localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("SearchV2", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (SearchResultWorkflow)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(SearchResultWorkflow))); - } - - /// - /// 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 SearchResultWorkflowSummary SearchWorkflowsByTasks(int? start = null, int? size = null, string sort = null, string freeText = null, string query = null) - { - ApiResponse localVarResponse = 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 - /// - /// Thrown when fails to make API call - /// (optional, default to 0) - /// (optional, default to 100) - /// (optional) - /// (optional, default to *) - /// (optional) - /// ApiResponse of SearchResultWorkflowSummary - public ApiResponse SearchWorkflowsByTasksWithHttpInfo(int? start = null, int? size = null, string sort = null, string freeText = null, string query = null) - { - - var localVarPath = "/workflow/search-by-tasks"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = 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); - - if (start != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "start", start)); // query parameter - if (size != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "size", size)); // query parameter - 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 - 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); - - int localVarStatusCode = (int)localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("SearchWorkflowsByTasks", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (SearchResultWorkflowSummary)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(SearchResultWorkflowSummary))); - } - - /// - /// 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 SearchResultWorkflow SearchWorkflowsByTasksV2(int? start = null, int? size = null, string sort = null, string freeText = null, string query = null) - { - ApiResponse localVarResponse = 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 - /// - /// Thrown when fails to make API call - /// (optional, default to 0) - /// (optional, default to 100) - /// (optional) - /// (optional, default to *) - /// (optional) - /// ApiResponse of SearchResultWorkflow - public ApiResponse SearchWorkflowsByTasksV2WithHttpInfo(int? start = null, int? size = null, string sort = null, string freeText = null, string query = null) - { - - var localVarPath = "/workflow/search-by-tasks-v2"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = 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); - - if (start != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "start", start)); // query parameter - if (size != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "size", size)); // query parameter - 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 - 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); - - int localVarStatusCode = (int)localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("SearchWorkflowsByTasksV2", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (SearchResultWorkflow)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(SearchResultWorkflow))); - } - - /// - /// Skips a given task from a current running workflow - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - public void SkipTaskFromWorkflow(string workflowId, string taskReferenceName, SkipTaskRequest skipTaskRequest) - { - SkipTaskFromWorkflowWithHttpInfo(workflowId, taskReferenceName, skipTaskRequest); - } - - /// - /// Skips a given task from a current running workflow - /// - /// Thrown when fails to make API call - /// - /// - /// - /// ApiResponse of Object(void) - public ApiResponse SkipTaskFromWorkflowWithHttpInfo(string workflowId, string taskReferenceName, SkipTaskRequest skipTaskRequest) - { - // verify the required parameter 'workflowId' is set - if (workflowId == null) - throw new ApiException(400, "Missing required parameter 'workflowId' when calling WorkflowResourceApi->SkipTaskFromWorkflow"); - // verify the required parameter 'taskReferenceName' is set - if (taskReferenceName == null) - throw new ApiException(400, "Missing required parameter 'taskReferenceName' when calling WorkflowResourceApi->SkipTaskFromWorkflow"); - // verify the required parameter 'skipTaskRequest' is set - if (skipTaskRequest == null) - throw new ApiException(400, "Missing required parameter 'skipTaskRequest' when calling WorkflowResourceApi->SkipTaskFromWorkflow"); - - var localVarPath = "/workflow/{workflowId}/skiptask/{taskReferenceName}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = 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); - - 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 - 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); - - int localVarStatusCode = (int)localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("SkipTaskFromWorkflow", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Start a new workflow with StartWorkflowRequest, which allows task to be executed in a domain - /// - /// Thrown when fails to make API call - /// - /// string - public string StartWorkflow(StartWorkflowRequest body) - { - ApiResponse localVarResponse = StartWorkflowWithHttpInfo(body); - return localVarResponse.Data; - } - - /// - /// 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 - public ApiResponse StartWorkflowWithHttpInfo(StartWorkflowRequest body) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling WorkflowResourceApi->StartWorkflow"); - - var localVarPath = "/workflow"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "text/plain" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - // 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); - - int localVarStatusCode = (int)localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("StartWorkflow", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (string)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(string))); - } - - /// - /// 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 string StartWorkflow(string name, Dictionary body, int? version = null, string correlationId = null, int? priority = null) - { - ApiResponse localVarResponse = 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 - /// - /// Thrown when fails to make API call - /// - /// - /// (optional) - /// (optional) - /// (optional, default to 0) - /// ApiResponse of string - public ApiResponse StartWorkflowWithHttpInfo(string name, Dictionary body, int? version = null, string correlationId = null, int? priority = null) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling WorkflowResourceApi->StartWorkflow"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling WorkflowResourceApi->StartWorkflow"); - - var localVarPath = "/workflow/{name}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "text/plain" - }; - 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 - if (version != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "version", version)); // query parameter - if (correlationId != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "correlationId", correlationId)); // query parameter - if (priority != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "priority", priority)); // query parameter - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - // 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); - - int localVarStatusCode = (int)localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("StartWorkflow", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (string)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(string))); - } - - /// - /// Terminate workflow execution - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// (optional, default to false) - /// - public void Terminate(string workflowId, string reason = null, bool? triggerFailureWorkflow = null) - { - TerminateWithHttpInfo(workflowId, reason, triggerFailureWorkflow); - } - - /// - /// Terminate workflow execution - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// (optional, default to false) - /// ApiResponse of Object(void) - public ApiResponse TerminateWithHttpInfo(string workflowId, string reason = null, bool? triggerFailureWorkflow = null) - { - // verify the required parameter 'workflowId' is set - if (workflowId == null) - throw new ApiException(400, "Missing required parameter 'workflowId' when calling WorkflowResourceApi->Terminate"); - - var localVarPath = "/workflow/{workflowId}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = 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); - - 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 - 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); - - int localVarStatusCode = (int)localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("Terminate", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Test workflow execution using mock data - /// - /// Thrown when fails to make API call - /// - /// Workflow - public Workflow TestWorkflow(WorkflowTestRequest body) - { - ApiResponse localVarResponse = TestWorkflowWithHttpInfo(body); - return localVarResponse.Data; - } - - /// - /// Test workflow execution using mock data - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of Workflow - public ApiResponse TestWorkflowWithHttpInfo(WorkflowTestRequest body) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling WorkflowResourceApi->TestWorkflow"); - - var localVarPath = "/workflow/test"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - // 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); - - int localVarStatusCode = (int)localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestWorkflow", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Workflow)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Workflow))); - } - - /// - /// Force upload all completed workflows to document store - /// - /// Thrown when fails to make API call - /// Object - public Object UploadCompletedWorkflows() - { - ApiResponse localVarResponse = UploadCompletedWorkflowsWithHttpInfo(); - return localVarResponse.Data; - } - - /// - /// Force upload all completed workflows to document store - /// - /// Thrown when fails to make API call - /// ApiResponse of Object - public ApiResponse UploadCompletedWorkflowsWithHttpInfo() - { - - var localVarPath = "/workflow/document-store/upload"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = 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); - - // 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); - - int localVarStatusCode = (int)localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UploadCompletedWorkflows", localVarResponse); - 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))); - } - } + /// + /// 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); + + /// + /// 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 + /// + public partial class WorkflowResourceApi : IWorkflowResourceApi + { + private Conductor.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public WorkflowResourceApi(String basePath) + { + this.Configuration = new Conductor.Client.Configuration { BasePath = basePath }; + + ExceptionFactory = Conductor.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// + /// + public WorkflowResourceApi() + { + this.Configuration = Conductor.Client.Configuration.Default; + + ExceptionFactory = Conductor.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public WorkflowResourceApi(Conductor.Client.Configuration configuration = null) + { + if (configuration == null) // use the default one in Configuration + this.Configuration = Conductor.Client.Configuration.Default; + else + this.Configuration = configuration; + + ExceptionFactory = Conductor.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public String GetBasePath() + { + return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public Conductor.Client.Configuration Configuration { get; set; } + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public Conductor.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// Starts the decision task for a workflow + /// + /// Thrown when fails to make API call + /// + /// + public void Decide(string workflowId) + { + DecideWithHttpInfo(workflowId); + } + + /// + /// Starts the decision task for a workflow + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of Object(void) + public ApiResponse DecideWithHttpInfo(string workflowId) + { + // verify the required parameter 'workflowId' is set + if (workflowId == null) + throw new ApiException(400, "Missing required parameter 'workflowId' when calling WorkflowResourceApi->Decide"); + + var localVarPath = "/workflow/decide/{workflowId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = 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); + + if (workflowId != null) localVarPathParams.Add("workflowId", this.Configuration.ApiClient.ParameterToString(workflowId)); // path parameter + // 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); + + int localVarStatusCode = (int)localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("Decide", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// Removes the workflow from the system + /// + /// Thrown when fails to make API call + /// + /// (optional, default to true) + /// + public void Delete(string workflowId, bool? archiveWorkflow = null) + { + DeleteWithHttpInfo(workflowId, archiveWorkflow); + } + + /// + /// Removes the workflow from the system + /// + /// Thrown when fails to make API call + /// + /// (optional, default to true) + /// ApiResponse of Object(void) + public ApiResponse DeleteWithHttpInfo(string workflowId, bool? archiveWorkflow = null) + { + // verify the required parameter 'workflowId' is set + if (workflowId == null) + throw new ApiException(400, "Missing required parameter 'workflowId' when calling WorkflowResourceApi->Delete"); + + var localVarPath = "/workflow/{workflowId}/remove"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = 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); + + 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 + 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); + + int localVarStatusCode = (int)localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("Delete", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// Execute a workflow synchronously + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// (optional) + /// WorkflowRun + public WorkflowRun ExecuteWorkflow(StartWorkflowRequest body, string requestId, string name, int? version, string waitUntilTaskRef = null) + { + ApiResponse localVarResponse = ExecuteWorkflowWithHttpInfo(body, requestId, name, version, waitUntilTaskRef); + return localVarResponse.Data; + } + + /// + /// Execute a workflow synchronously + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// (optional) + /// ApiResponse of WorkflowRun + public ApiResponse ExecuteWorkflowWithHttpInfo(StartWorkflowRequest body, string requestId, string name, int? version, string waitUntilTaskRef = null) + { + // verify the required parameter 'body' is set + if (body == null) + throw new ApiException(400, "Missing required parameter 'body' when calling WorkflowResourceApi->ExecuteWorkflow"); + // verify the required parameter 'requestId' is set + if (requestId == null) + throw new ApiException(400, "Missing required parameter 'requestId' when calling WorkflowResourceApi->ExecuteWorkflow"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling WorkflowResourceApi->ExecuteWorkflow"); + // verify the required parameter 'version' is set + if (version == null) + throw new ApiException(400, "Missing required parameter 'version' when calling WorkflowResourceApi->ExecuteWorkflow"); + + var localVarPath = "/workflow/execute/{name}/{version}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "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 + if (version != null) localVarPathParams.Add("version", this.Configuration.ApiClient.ParameterToString(version)); // path parameter + if (requestId != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "requestId", requestId)); // query parameter + if (waitUntilTaskRef != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "waitUntilTaskRef", waitUntilTaskRef)); // query parameter + if (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + // 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); + + int localVarStatusCode = (int)localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("ExecuteWorkflow", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (WorkflowRun)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(WorkflowRun))); + } + + /// + /// Gets the workflow by workflow id + /// + /// Thrown when fails to make API call + /// + /// (optional, default to true) + /// (optional, default to false) + /// Workflow + public Workflow GetExecutionStatus(string workflowId, bool? includeTasks = null, bool? summarize = null) + { + ApiResponse localVarResponse = GetExecutionStatusWithHttpInfo(workflowId, includeTasks, summarize); + return localVarResponse.Data; + } + + /// + /// Gets the workflow by workflow id + /// + /// Thrown when fails to make API call + /// + /// (optional, default to true) + /// (optional, default to false) + /// ApiResponse of Workflow + public ApiResponse GetExecutionStatusWithHttpInfo(string workflowId, bool? includeTasks = null, bool? summarize = null) + { + // verify the required parameter 'workflowId' is set + if (workflowId == null) + throw new ApiException(400, "Missing required parameter 'workflowId' when calling WorkflowResourceApi->GetExecutionStatus"); + + var localVarPath = "/workflow/{workflowId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = 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); + + 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 + 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); + + int localVarStatusCode = (int)localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetExecutionStatus", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Workflow)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Workflow))); + } + + /// + /// 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 TaskListSearchResultSummary GetExecutionStatusTaskList(string workflowId, int? start = null, int? count = null, string status = null) + { + ApiResponse localVarResponse = GetExecutionStatusTaskListWithHttpInfo(workflowId, start, count, status); + return localVarResponse.Data; + } + + /// + /// 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 + public ApiResponse GetExecutionStatusTaskListWithHttpInfo(string workflowId, int? start = null, int? count = null, string status = null) + { + // verify the required parameter 'workflowId' is set + if (workflowId == null) + throw new ApiException(400, "Missing required parameter 'workflowId' when calling WorkflowResourceApi->GetExecutionStatusTaskList"); + + var localVarPath = "/workflow/{workflowId}/tasks"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = 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); + + if (workflowId != null) localVarPathParams.Add("workflowId", this.Configuration.ApiClient.ParameterToString(workflowId)); // path parameter + 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 + 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); + + int localVarStatusCode = (int)localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetExecutionStatusTaskList", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + 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 + /// + /// Thrown when fails to make API call + /// + /// + /// + /// ApiResponse of ExternalStorageLocation + public ApiResponse GetExternalStorageLocationWithHttpInfo(string path, string operation, string payloadType) + { + // verify the required parameter 'path' is set + if (path == null) + throw new ApiException(400, "Missing required parameter 'path' when calling WorkflowResourceApi->GetExternalStorageLocation"); + // verify the required parameter 'operation' is set + if (operation == null) + throw new ApiException(400, "Missing required parameter 'operation' when calling WorkflowResourceApi->GetExternalStorageLocation"); + // verify the required parameter 'payloadType' is set + if (payloadType == null) + throw new ApiException(400, "Missing required parameter 'payloadType' when calling WorkflowResourceApi->GetExternalStorageLocation"); + + var localVarPath = "/workflow/externalstoragelocation"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = 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); + + 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 + 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); + + int localVarStatusCode = (int)localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetExternalStorageLocation", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (ExternalStorageLocation)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ExternalStorageLocation))); + } + + /// + /// Retrieve all the running workflows + /// + /// Thrown when fails to make API call + /// + /// (optional, default to 1) + /// (optional) + /// (optional) + /// List<string> + public List GetRunningWorkflow(string name, int? version = null, long? startTime = null, long? endTime = null) + { + ApiResponse> localVarResponse = GetRunningWorkflowWithHttpInfo(name, version, startTime, endTime); + return localVarResponse.Data; + } + + /// + /// Retrieve all the running workflows + /// + /// Thrown when fails to make API call + /// + /// (optional, default to 1) + /// (optional) + /// (optional) + /// ApiResponse of List<string> + public ApiResponse> GetRunningWorkflowWithHttpInfo(string name, int? version = null, long? startTime = null, long? endTime = null) + { + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling WorkflowResourceApi->GetRunningWorkflow"); + + var localVarPath = "/workflow/running/{name}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = 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); + + if (name != null) localVarPathParams.Add("name", this.Configuration.ApiClient.ParameterToString(name)); // path parameter + 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 + 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); + + int localVarStatusCode = (int)localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetRunningWorkflow", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse>(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (List)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); + } + + /// + /// Gets the workflow by workflow id + /// + /// Thrown when fails to make API call + /// + /// (optional, default to false) + /// (optional, default to false) + /// WorkflowStatus + public WorkflowStatus GetWorkflowStatusSummary(string workflowId, bool? includeOutput = null, bool? includeVariables = null) + { + ApiResponse localVarResponse = GetWorkflowStatusSummaryWithHttpInfo(workflowId, includeOutput, includeVariables); + return localVarResponse.Data; + } + + /// + /// Gets the workflow by workflow id + /// + /// Thrown when fails to make API call + /// + /// (optional, default to false) + /// (optional, default to false) + /// ApiResponse of WorkflowStatus + public ApiResponse GetWorkflowStatusSummaryWithHttpInfo(string workflowId, bool? includeOutput = null, bool? includeVariables = null) + { + // verify the required parameter 'workflowId' is set + if (workflowId == null) + throw new ApiException(400, "Missing required parameter 'workflowId' when calling WorkflowResourceApi->GetWorkflowStatusSummary"); + + var localVarPath = "/workflow/{workflowId}/status"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = 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); + + 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 + 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); + + int localVarStatusCode = (int)localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetWorkflowStatusSummary", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (WorkflowStatus)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(WorkflowStatus))); + } + + /// + /// 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 Dictionary> GetWorkflows(List body, string name, bool? includeClosed = null, bool? includeTasks = null) + { + ApiResponse>> localVarResponse = GetWorkflowsWithHttpInfo(body, name, includeClosed, includeTasks); + return localVarResponse.Data; + } + + /// + /// 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>> + public ApiResponse>> GetWorkflowsWithHttpInfo(List body, string name, bool? includeClosed = null, bool? includeTasks = null) + { + // verify the required parameter 'body' is set + if (body == null) + throw new ApiException(400, "Missing required parameter 'body' when calling WorkflowResourceApi->GetWorkflows"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling WorkflowResourceApi->GetWorkflows"); + + var localVarPath = "/workflow/{name}/correlated"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "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); + + if (name != null) localVarPathParams.Add("name", this.Configuration.ApiClient.ParameterToString(name)); // 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 + if (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + // 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); + + int localVarStatusCode = (int)localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetWorkflows", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse>>(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Dictionary>)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Dictionary>))); + } + + /// + /// 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 Dictionary> GetWorkflows(CorrelationIdsSearchRequest body, bool? includeClosed = null, bool? includeTasks = null) + { + ApiResponse>> localVarResponse = GetWorkflowsWithHttpInfo(body, includeClosed, includeTasks); + return localVarResponse.Data; + } + + /// + /// 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>> + public ApiResponse>> GetWorkflowsWithHttpInfo(CorrelationIdsSearchRequest body, bool? includeClosed = null, bool? includeTasks = null) + { + // verify the required parameter 'body' is set + if (body == null) + throw new ApiException(400, "Missing required parameter 'body' when calling WorkflowResourceApi->GetWorkflows"); + + var localVarPath = "/workflow/correlated/batch"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "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); + + 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 + if (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + // 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); + + int localVarStatusCode = (int)localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetWorkflows", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse>>(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Dictionary>)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Dictionary>))); + } + + /// + /// 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 List GetWorkflows(string name, string correlationId, bool? includeClosed = null, bool? includeTasks = null) + { + ApiResponse> localVarResponse = GetWorkflowsWithHttpInfo(name, correlationId, includeClosed, includeTasks); + return localVarResponse.Data; + } + + /// + /// 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> + public ApiResponse> GetWorkflowsWithHttpInfo(string name, string correlationId, bool? includeClosed = null, bool? includeTasks = null) + { + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling WorkflowResourceApi->GetWorkflows"); + // verify the required parameter 'correlationId' is set + if (correlationId == null) + throw new ApiException(400, "Missing required parameter 'correlationId' when calling WorkflowResourceApi->GetWorkflows"); + + var localVarPath = "/workflow/{name}/correlated/{correlationId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = 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); + + if (name != null) localVarPathParams.Add("name", this.Configuration.ApiClient.ParameterToString(name)); // path parameter + 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 + 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); + + int localVarStatusCode = (int)localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetWorkflows", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse>(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (List)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); + } + + /// + /// Pauses the workflow + /// + /// Thrown when fails to make API call + /// + /// + public void PauseWorkflow(string workflowId) + { + PauseWorkflowWithHttpInfo(workflowId); + } + + /// + /// Pauses the workflow + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of Object(void) + public ApiResponse PauseWorkflowWithHttpInfo(string workflowId) + { + // verify the required parameter 'workflowId' is set + if (workflowId == null) + throw new ApiException(400, "Missing required parameter 'workflowId' when calling WorkflowResourceApi->PauseWorkflow"); + + var localVarPath = "/workflow/{workflowId}/pause"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = 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); + + if (workflowId != null) localVarPathParams.Add("workflowId", this.Configuration.ApiClient.ParameterToString(workflowId)); // path parameter + // 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); + + int localVarStatusCode = (int)localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("PauseWorkflow", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + + /// + /// Jump workflow execution to given task Jump workflow execution to given task. + /// + /// Thrown when fails to make API call + /// + /// + /// (optional) + /// + public void JumpToTask(string workflowId, Dictionary input, string taskReferenceName = null) + { + JumpToTaskWithHttpInfo(input, workflowId, taskReferenceName); + } + + + /// + /// Jump workflow execution to given task Jump workflow execution to given task. + /// + /// Thrown when fails to make API call + /// + /// + /// (optional) + /// ApiResponse of Object(void) + public ApiResponse JumpToTaskWithHttpInfo(Dictionary body, string workflowId, string taskReferenceName = null) + { + // verify the required parameter 'body' is set + if (body == null) + throw new ApiException(400, "Missing required parameter 'input' when calling WorkflowResourceApi->JumpToTask"); + // verify the required parameter 'workflowId' is set + if (workflowId == null) + throw new ApiException(400, "Missing required parameter 'workflowId' when calling WorkflowResourceApi->JumpToTask"); + + var localVarPath = "/workflow/{workflowId}/jump/{taskReferenceName}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "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); + + if (workflowId != null) localVarPathParams.Add("workflowId", this.Configuration.ApiClient.ParameterToString(workflowId)); // path parameter + if (taskReferenceName != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "taskReferenceName", taskReferenceName)); // query parameter + if (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + // 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); + + int localVarStatusCode = (int)localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("JumpToTask", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + + /// + /// Reruns the workflow from a specific task + /// + /// Thrown when fails to make API call + /// + /// + /// string + public string Rerun(RerunWorkflowRequest body, string workflowId) + { + ApiResponse localVarResponse = RerunWithHttpInfo(body, workflowId); + return localVarResponse.Data; + } + + /// + /// Reruns the workflow from a specific task + /// + /// Thrown when fails to make API call + /// + /// + /// ApiResponse of string + public ApiResponse RerunWithHttpInfo(RerunWorkflowRequest body, string workflowId) + { + // verify the required parameter 'body' is set + if (body == null) + throw new ApiException(400, "Missing required parameter 'body' when calling WorkflowResourceApi->Rerun"); + // verify the required parameter 'workflowId' is set + if (workflowId == null) + throw new ApiException(400, "Missing required parameter 'workflowId' when calling WorkflowResourceApi->Rerun"); + + var localVarPath = "/workflow/{workflowId}/rerun"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "text/plain" + }; + 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 (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + // 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); + + int localVarStatusCode = (int)localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("Rerun", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (string)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(string))); + } + + /// + /// Resets callback times of all non-terminal SIMPLE tasks to 0 + /// + /// Thrown when fails to make API call + /// + /// + public void ResetWorkflow(string workflowId) + { + ResetWorkflowWithHttpInfo(workflowId); + } + + /// + /// Resets callback times of all non-terminal SIMPLE tasks to 0 + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of Object(void) + public ApiResponse ResetWorkflowWithHttpInfo(string workflowId) + { + // verify the required parameter 'workflowId' is set + if (workflowId == null) + throw new ApiException(400, "Missing required parameter 'workflowId' when calling WorkflowResourceApi->ResetWorkflow"); + + var localVarPath = "/workflow/{workflowId}/resetcallbacks"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = 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); + + if (workflowId != null) localVarPathParams.Add("workflowId", this.Configuration.ApiClient.ParameterToString(workflowId)); // path parameter + // 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); + + int localVarStatusCode = (int)localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("ResetWorkflow", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// Restarts a completed workflow + /// + /// Thrown when fails to make API call + /// + /// (optional, default to false) + /// + public void Restart(string workflowId, bool? useLatestDefinitions = null) + { + RestartWithHttpInfo(workflowId, useLatestDefinitions); + } + + /// + /// Restarts a completed workflow + /// + /// Thrown when fails to make API call + /// + /// (optional, default to false) + /// ApiResponse of Object(void) + public ApiResponse RestartWithHttpInfo(string workflowId, bool? useLatestDefinitions = null) + { + // verify the required parameter 'workflowId' is set + if (workflowId == null) + throw new ApiException(400, "Missing required parameter 'workflowId' when calling WorkflowResourceApi->Restart"); + + var localVarPath = "/workflow/{workflowId}/restart"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = 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); + + 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 + 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); + + int localVarStatusCode = (int)localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("Restart", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// Resumes the workflow + /// + /// Thrown when fails to make API call + /// + /// + public void ResumeWorkflow(string workflowId) + { + ResumeWorkflowWithHttpInfo(workflowId); + } + + /// + /// Resumes the workflow + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of Object(void) + public ApiResponse ResumeWorkflowWithHttpInfo(string workflowId) + { + // verify the required parameter 'workflowId' is set + if (workflowId == null) + throw new ApiException(400, "Missing required parameter 'workflowId' when calling WorkflowResourceApi->ResumeWorkflow"); + + var localVarPath = "/workflow/{workflowId}/resume"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = 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); + + if (workflowId != null) localVarPathParams.Add("workflowId", this.Configuration.ApiClient.ParameterToString(workflowId)); // path parameter + // 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); + + int localVarStatusCode = (int)localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("ResumeWorkflow", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// Retries the last failed task + /// + /// Thrown when fails to make API call + /// + /// (optional, default to false) + /// + public void Retry(string workflowId, bool? resumeSubworkflowTasks = null) + { + RetryWithHttpInfo(workflowId, resumeSubworkflowTasks); + } + + /// + /// Retries the last failed task + /// + /// Thrown when fails to make API call + /// + /// (optional, default to false) + /// ApiResponse of Object(void) + public ApiResponse RetryWithHttpInfo(string workflowId, bool? resumeSubworkflowTasks = null) + { + // verify the required parameter 'workflowId' is set + if (workflowId == null) + throw new ApiException(400, "Missing required parameter 'workflowId' when calling WorkflowResourceApi->Retry"); + + var localVarPath = "/workflow/{workflowId}/retry"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = 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); + + 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 + 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); + + int localVarStatusCode = (int)localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("Retry", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + 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 + public ScrollableSearchResultWorkflowSummary Search(string queryId = null, int? start = null, int? size = null, string sort = null, string freeText = null, string query = null, bool? skipCache = null) + { + ApiResponse localVarResponse = 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. + /// + /// 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 + public ApiResponse SearchWithHttpInfo(string queryId = null, int? start = null, int? size = null, string sort = null, string freeText = null, string query = null, bool? skipCache = null) + { + + var localVarPath = "/workflow/search"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = 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); + + if (queryId != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "queryId", queryId)); // query parameter + if (start != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "start", start)); // query parameter + if (size != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "size", size)); // query parameter + 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 + if (skipCache != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "skipCache", skipCache)); // query parameter + // 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); + + int localVarStatusCode = (int)localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("Search", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (ScrollableSearchResultWorkflowSummary)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ScrollableSearchResultWorkflowSummary))); + } + + /// + /// 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 SearchResultWorkflow SearchV2(int? start = null, int? size = null, string sort = null, string freeText = null, string query = null) + { + ApiResponse localVarResponse = 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. + /// + /// Thrown when fails to make API call + /// (optional, default to 0) + /// (optional, default to 100) + /// (optional) + /// (optional, default to *) + /// (optional) + /// ApiResponse of SearchResultWorkflow + public ApiResponse SearchV2WithHttpInfo(int? start = null, int? size = null, string sort = null, string freeText = null, string query = null) + { + + var localVarPath = "/workflow/search-v2"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = 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); + + if (start != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "start", start)); // query parameter + if (size != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "size", size)); // query parameter + 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 + 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); + + int localVarStatusCode = (int)localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("SearchV2", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (SearchResultWorkflow)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(SearchResultWorkflow))); + } + + /// + /// 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 SearchResultWorkflowSummary SearchWorkflowsByTasks(int? start = null, int? size = null, string sort = null, string freeText = null, string query = null) + { + ApiResponse localVarResponse = 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 + /// + /// Thrown when fails to make API call + /// (optional, default to 0) + /// (optional, default to 100) + /// (optional) + /// (optional, default to *) + /// (optional) + /// ApiResponse of SearchResultWorkflowSummary + public ApiResponse SearchWorkflowsByTasksWithHttpInfo(int? start = null, int? size = null, string sort = null, string freeText = null, string query = null) + { + + var localVarPath = "/workflow/search-by-tasks"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = 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); + + if (start != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "start", start)); // query parameter + if (size != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "size", size)); // query parameter + 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 + 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); + + int localVarStatusCode = (int)localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("SearchWorkflowsByTasks", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (SearchResultWorkflowSummary)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(SearchResultWorkflowSummary))); + } + + /// + /// 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 SearchResultWorkflow SearchWorkflowsByTasksV2(int? start = null, int? size = null, string sort = null, string freeText = null, string query = null) + { + ApiResponse localVarResponse = 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 + /// + /// Thrown when fails to make API call + /// (optional, default to 0) + /// (optional, default to 100) + /// (optional) + /// (optional, default to *) + /// (optional) + /// ApiResponse of SearchResultWorkflow + public ApiResponse SearchWorkflowsByTasksV2WithHttpInfo(int? start = null, int? size = null, string sort = null, string freeText = null, string query = null) + { + + var localVarPath = "/workflow/search-by-tasks-v2"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = 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); + + if (start != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "start", start)); // query parameter + if (size != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "size", size)); // query parameter + 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 + 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); + + int localVarStatusCode = (int)localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("SearchWorkflowsByTasksV2", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (SearchResultWorkflow)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(SearchResultWorkflow))); + } + + /// + /// Skips a given task from a current running workflow + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + public void SkipTaskFromWorkflow(string workflowId, string taskReferenceName, SkipTaskRequest skipTaskRequest) + { + SkipTaskFromWorkflowWithHttpInfo(workflowId, taskReferenceName, skipTaskRequest); + } + + /// + /// Skips a given task from a current running workflow + /// + /// Thrown when fails to make API call + /// + /// + /// + /// ApiResponse of Object(void) + public ApiResponse SkipTaskFromWorkflowWithHttpInfo(string workflowId, string taskReferenceName, SkipTaskRequest skipTaskRequest) + { + // verify the required parameter 'workflowId' is set + if (workflowId == null) + throw new ApiException(400, "Missing required parameter 'workflowId' when calling WorkflowResourceApi->SkipTaskFromWorkflow"); + // verify the required parameter 'taskReferenceName' is set + if (taskReferenceName == null) + throw new ApiException(400, "Missing required parameter 'taskReferenceName' when calling WorkflowResourceApi->SkipTaskFromWorkflow"); + // verify the required parameter 'skipTaskRequest' is set + if (skipTaskRequest == null) + throw new ApiException(400, "Missing required parameter 'skipTaskRequest' when calling WorkflowResourceApi->SkipTaskFromWorkflow"); + + var localVarPath = "/workflow/{workflowId}/skiptask/{taskReferenceName}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = 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); + + 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 + 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); + + int localVarStatusCode = (int)localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("SkipTaskFromWorkflow", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// Start a new workflow with StartWorkflowRequest, which allows task to be executed in a domain + /// + /// Thrown when fails to make API call + /// + /// string + public string StartWorkflow(StartWorkflowRequest body) + { + ApiResponse localVarResponse = StartWorkflowWithHttpInfo(body); + return localVarResponse.Data; + } + + /// + /// 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 + public ApiResponse StartWorkflowWithHttpInfo(StartWorkflowRequest body) + { + // verify the required parameter 'body' is set + if (body == null) + throw new ApiException(400, "Missing required parameter 'body' when calling WorkflowResourceApi->StartWorkflow"); + + var localVarPath = "/workflow"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "text/plain" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + // 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); + + int localVarStatusCode = (int)localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("StartWorkflow", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (string)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(string))); + } + + /// + /// 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 string StartWorkflow(string name, Dictionary body, int? version = null, string correlationId = null, int? priority = null) + { + ApiResponse localVarResponse = 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 + /// + /// Thrown when fails to make API call + /// + /// + /// (optional) + /// (optional) + /// (optional, default to 0) + /// ApiResponse of string + public ApiResponse StartWorkflowWithHttpInfo(string name, Dictionary body, int? version = null, string correlationId = null, int? priority = null) + { + // verify the required parameter 'body' is set + if (body == null) + throw new ApiException(400, "Missing required parameter 'body' when calling WorkflowResourceApi->StartWorkflow"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling WorkflowResourceApi->StartWorkflow"); + + var localVarPath = "/workflow/{name}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "text/plain" + }; + 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 + if (version != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "version", version)); // query parameter + if (correlationId != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "correlationId", correlationId)); // query parameter + if (priority != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "priority", priority)); // query parameter + if (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + // 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); + + int localVarStatusCode = (int)localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("StartWorkflow", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (string)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(string))); + } + + /// + /// Terminate workflow execution + /// + /// Thrown when fails to make API call + /// + /// (optional) + /// (optional, default to false) + /// + public void Terminate(string workflowId, string reason = null, bool? triggerFailureWorkflow = null) + { + TerminateWithHttpInfo(workflowId, reason, triggerFailureWorkflow); + } + + /// + /// Terminate workflow execution + /// + /// Thrown when fails to make API call + /// + /// (optional) + /// (optional, default to false) + /// ApiResponse of Object(void) + public ApiResponse TerminateWithHttpInfo(string workflowId, string reason = null, bool? triggerFailureWorkflow = null) + { + // verify the required parameter 'workflowId' is set + if (workflowId == null) + throw new ApiException(400, "Missing required parameter 'workflowId' when calling WorkflowResourceApi->Terminate"); + + var localVarPath = "/workflow/{workflowId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = 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); + + 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 + 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); + + int localVarStatusCode = (int)localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("Terminate", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// Test workflow execution using mock data + /// + /// Thrown when fails to make API call + /// + /// Workflow + public Workflow TestWorkflow(WorkflowTestRequest body) + { + ApiResponse localVarResponse = TestWorkflowWithHttpInfo(body); + return localVarResponse.Data; + } + + /// + /// Test workflow execution using mock data + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of Workflow + public ApiResponse TestWorkflowWithHttpInfo(WorkflowTestRequest body) + { + // verify the required parameter 'body' is set + if (body == null) + throw new ApiException(400, "Missing required parameter 'body' when calling WorkflowResourceApi->TestWorkflow"); + + var localVarPath = "/workflow/test"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + // 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); + + int localVarStatusCode = (int)localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("TestWorkflow", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Workflow)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Workflow))); + } + + /// + /// Force upload all completed workflows to document store + /// + /// Thrown when fails to make API call + /// Object + public Object UploadCompletedWorkflows() + { + ApiResponse localVarResponse = UploadCompletedWorkflowsWithHttpInfo(); + return localVarResponse.Data; + } + + /// + /// Force upload all completed workflows to document store + /// + /// Thrown when fails to make API call + /// ApiResponse of Object + public ApiResponse UploadCompletedWorkflowsWithHttpInfo() + { + + var localVarPath = "/workflow/document-store/upload"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = 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); + + // 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); + + int localVarStatusCode = (int)localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("UploadCompletedWorkflows", localVarResponse); + 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))); + } + } } diff --git a/Conductor/Client/Extensions/ConductorTaskExtensions.cs b/Conductor/Client/Extensions/ConductorTaskExtensions.cs index b7303ec6..b56968e9 100644 --- a/Conductor/Client/Extensions/ConductorTaskExtensions.cs +++ b/Conductor/Client/Extensions/ConductorTaskExtensions.cs @@ -18,7 +18,7 @@ public static TaskResult InProgress(this Task task, string log = null, long? cal { new TaskExecLog { TaskId = task.TaskId, Log = log, CreatedTime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds() } }, - callbackAfterSeconds: callbackAfterSeconds + callbackAfterSeconds: callbackAfterSeconds.Value ); } diff --git a/Conductor/Definition/ConductorWorkflow.cs b/Conductor/Definition/ConductorWorkflow.cs index 0a6d5948..f7d44657 100644 --- a/Conductor/Definition/ConductorWorkflow.cs +++ b/Conductor/Definition/ConductorWorkflow.cs @@ -3,91 +3,83 @@ namespace Conductor.Definition { - public class ConductorWorkflow : WorkflowDef - { - public ConductorWorkflow() : base(name: "", tasks: new List(), timeoutSeconds: 0) - { - InputParameters = new List(); - } + public class ConductorWorkflow : WorkflowDef + { + public ConductorWorkflow() : base(name: "", tasks: new List(), timeoutSeconds: 0) + { + InputParameters = new List(); + } - public ConductorWorkflow WithName(string name) - { - Name = name; - return this; - } + public ConductorWorkflow WithName(string name) + { + Name = name; + return this; + } - public ConductorWorkflow WithVersion(int version) - { - Version = version; - return this; - } + public ConductorWorkflow WithVersion(int version) + { + Version = version; + return this; + } - public ConductorWorkflow WithDescription(string description) - { - Description = description; - return this; - } + public ConductorWorkflow WithDescription(string description) + { + Description = description; + return this; + } - public ConductorWorkflow WithTimeoutPolicy(WorkflowDef.TimeoutPolicyEnum timeoutPolicy, int timeoutSeconds) - { - TimeoutPolicy = timeoutPolicy; - TimeoutSeconds = timeoutSeconds; - return this; - } + public ConductorWorkflow WithTimeoutPolicy(WorkflowDef.TimeoutPolicyEnum timeoutPolicy, int timeoutSeconds) + { + TimeoutPolicy = timeoutPolicy; + TimeoutSeconds = timeoutSeconds; + return this; + } - public ConductorWorkflow WithTask(params WorkflowTask[] tasks) - { - foreach (WorkflowTask task in tasks) - { - Tasks.Add(task); - } - return this; - } + public ConductorWorkflow WithTask(params WorkflowTask[] tasks) + { + foreach (WorkflowTask task in tasks) + { + Tasks.Add(task); + } + return this; + } - public ConductorWorkflow WithFailureWorkflow(string failureWorkflow) - { - FailureWorkflow = failureWorkflow; - return this; - } + public ConductorWorkflow WithFailureWorkflow(string failureWorkflow) + { + FailureWorkflow = failureWorkflow; + return this; + } - public ConductorWorkflow WithRestartable(bool restartable) - { - Restartable = restartable; - return this; - } + public ConductorWorkflow WithRestartable(bool restartable) + { + Restartable = restartable; + return this; + } - public ConductorWorkflow WithOutputParameter(string key, object value) - { - OutputParameters.Add(key, value); - return this; - } + public ConductorWorkflow WithOutputParameter(string key, object value) + { + OutputParameters.Add(key, value); + return this; + } - public ConductorWorkflow WithVariable(string key, object value) - { - if (Variables == null) // if workflow does not have any variables, initialize with empty collection - Variables = new Dictionary(); - Variables.Add(key, value); - return this; - } + public ConductorWorkflow WithOwner(string ownerEmail) + { + OwnerEmail = ownerEmail; + return this; + } - public ConductorWorkflow WithOwner(string ownerEmail) - { - OwnerEmail = ownerEmail; - return this; - } + public ConductorWorkflow WithInputParameter(string key) + { + InputParameters.Add(key); + return this; + } - public ConductorWorkflow WithInputParameter(string key) - { - InputParameters.Add(key); - return this; - } - - public StartWorkflowRequest GetStartWorkflowRequest() - { - return new StartWorkflowRequest( - name: Name, - version: Version - ); - } - } + public StartWorkflowRequest GetStartWorkflowRequest() + { + return new StartWorkflowRequest( + name: Name, + version: Version + ); + } + } } diff --git a/Tests/Api/WorkflowResourceApiTest.cs b/Tests/Api/WorkflowResourceApiTest.cs deleted file mode 100644 index 527ea411..00000000 --- a/Tests/Api/WorkflowResourceApiTest.cs +++ /dev/null @@ -1,97 +0,0 @@ -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; - -namespace conductor_csharp.test.Api -{ - public class WorkflowResourceApiTest - { - private const string WORKFLOW_NAME = "TestToCreateVariables"; - private const string TASK_NAME = "TestToCreateVariables_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 readonly WorkflowResourceApi _workflowClient; - private readonly ILogger _logger; - - public WorkflowResourceApiTest() - { - _workflowClient = ApiExtensions.GetClient(); - _logger = ApplicationLogging.CreateLogger(); - } - - [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); - - // Create variables collection with values to be updated - var updateDict = new Dictionary { - {WORKFLOW_VARIABLE_1,"Value1" }, - {WORKFLOW_VARIABLE_2,"Value2" }, - }; - var updateVariableData = new Workflow() { WorkflowId = workflowId, Variables = updateDict }; - // Update the work flow variables - _workflowClient.UpdateWorkflowVariables(updateVariableData); - // Fetch latest workflow data to validate the change in variables - var _updatedWorkFlow = _workflowClient.GetWorkflowStatusSummary(workflowId, includeVariables: true); - // Verify workflow variables data is equal with input passed - Assert.Equal(_updatedWorkFlow.Variables, updateDict); - } - - private async System.Threading.Tasks.Task ExecuteWorkflowTasks(TimeSpan workflowCompletionTimeout) - { - var host = WorkflowTaskHost.CreateWorkerHost(LogLevel.Information, new ClassWorker()); - await host.StartAsync(); - Thread.Sleep(workflowCompletionTimeout); - await host.StopAsync(); - } - - private ConductorWorkflow GetConductorWorkflow() - { - return new ConductorWorkflow() - .WithName(WORKFLOW_NAME) - .WithVersion(WORKFLOW_VERSION) - .WithDescription(WORKFLOW_DESC) - .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) - { - 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); - } - } -} diff --git a/csharp-examples/WorkFlowExamples.cs b/csharp-examples/WorkFlowExamples.cs deleted file mode 100644 index 41c952f7..00000000 --- a/csharp-examples/WorkFlowExamples.cs +++ /dev/null @@ -1,77 +0,0 @@ -using Conductor.Client; -using Conductor.Definition.TaskType; -using Conductor.Definition; -using Conductor.Executor; -using Conductor.Api; -using Conductor.Client.Authentication; - -namespace csharp_examples -{ - public class WorkFlowExamples - { - - private const string KEY_ID = ""; - private const string KEY_SECRET = ""; - private const string OWNER_EMAIL = ""; - - private const string WORKFLOW_ID = ""; - private const string WORKFLOW_NAME = ""; - private const string WORKFLOW_DESCRIPTION = ""; - private const string TASK_NAME = ""; - private const string TASK_REFERENCE = ""; - - private const string VARIABLE_OLD_VALUE = "SOME_OLD_VALUE"; - private const string VARIABLE_NAME_1 = ""; - private const string VARIABLE_VALUE_1 = ""; - private const string VARIABLE_NAME_2 = ""; - private const string VARIABLE_VALUE_2 = ""; - - - public void RegisterWorkFlow() - { - Configuration configuration = new Configuration() - { - AuthenticationSettings = new OrkesAuthenticationSettings(KEY_ID, KEY_SECRET) - }; - - WorkflowExecutor executor = new WorkflowExecutor(configuration); - executor.RegisterWorkflow(GetConductorWorkflow(), true); - } - - private ConductorWorkflow GetConductorWorkflow() - { - var conductorWorkFlow = new ConductorWorkflow() - .WithName(WORKFLOW_NAME).WithDescription(WORKFLOW_DESCRIPTION) - .WithTask(new SimpleTask(TASK_NAME, TASK_REFERENCE)) - .WithOwner(OWNER_EMAIL); - - var workflowVariableTobeAdded = new Dictionary - { - { VARIABLE_NAME_1, VARIABLE_VALUE_1 }, - { VARIABLE_NAME_2, VARIABLE_VALUE_2 } - }; - - conductorWorkFlow.Variables = workflowVariableTobeAdded; - return conductorWorkFlow; - } - - public void UpdateWorkflowVariablesWithWorkFlowId() - { - var orkesApiClient = new OrkesApiClient(new Configuration(), - new OrkesAuthenticationSettings(KEY_ID, KEY_SECRET)); - var workflowClient = orkesApiClient.GetClient(); - var workFlowVariables = new Dictionary - { - { VARIABLE_NAME_1, VARIABLE_OLD_VALUE }, - { VARIABLE_NAME_2, VARIABLE_OLD_VALUE } - }; - - workflowClient.UpdateWorkflowVariables(new Conductor.Client.Models.Workflow() - { - WorkflowId = WORKFLOW_ID, - Variables = workFlowVariables - }); - } - - } -} From 2ae6a33dbdd043d288ea84866e5cbc5c06b88a9a Mon Sep 17 00:00:00 2001 From: "Jithesh.Poojary" Date: Wed, 10 Jan 2024 15:10:29 +0530 Subject: [PATCH 3/9] Changes to address the below 1. update variables functionality, 2. Inprogress throws exception when default param value after callbackAfterSeconds --- Conductor/Api/WorkflowResourceApi.cs | 119 ++++++++++++++---- .../Extensions/ConductorTaskExtensions.cs | 2 +- Conductor/Definition/ConductorWorkflow.cs | 9 +- Tests/Api/WorkflowResourceApiTest.cs | 97 ++++++++++++++ csharp-examples/WorkFlowExamples.cs | 77 ++++++++++++ 5 files changed, 279 insertions(+), 25 deletions(-) create mode 100644 Tests/Api/WorkflowResourceApiTest.cs create mode 100644 csharp-examples/WorkFlowExamples.cs diff --git a/Conductor/Api/WorkflowResourceApi.cs b/Conductor/Api/WorkflowResourceApi.cs index f0969e27..4cd83b41 100644 --- a/Conductor/Api/WorkflowResourceApi.cs +++ b/Conductor/Api/WorkflowResourceApi.cs @@ -72,20 +72,26 @@ public interface IWorkflowResourceApi : IApiAccessor /// WorkflowRun WorkflowRun ExecuteWorkflow(StartWorkflowRequest body, string requestId, string name, int? version, string waitUntilTaskRef = null); - /// - /// 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); + /// + /// 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 /// @@ -1029,15 +1035,82 @@ public ApiResponse ExecuteWorkflowWithHttpInfo(StartWorkflowRequest (WorkflowRun)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(WorkflowRun))); } - /// - /// Gets the workflow by workflow id - /// - /// Thrown when fails to make API call - /// - /// (optional, default to true) - /// (optional, default to false) - /// Workflow - public Workflow GetExecutionStatus(string workflowId, bool? includeTasks = null, bool? summarize = null) + public Object UpdateWorkflowVariables(Workflow workflow) + { + ApiResponse localVarResponse = UpdateWorkflowVariablesWithHttpInfo(workflow); + return localVarResponse.Data; + } + + public ApiResponse UpdateWorkflowVariablesWithHttpInfo(Workflow workflow) + { + // verify the required parameter 'body' is set + if (workflow == null) + throw new ApiException(400, "Missing required parameter 'body' when calling WorkflowResourceApi->Update"); + + if (string.IsNullOrEmpty(workflow.WorkflowId)) + throw new ApiException(400, "Missing required parameter 'WorkflowId' when calling WorkflowResourceApi->Update"); + + if (workflow.Variables == null) + throw new ApiException(400, "Missing required parameter 'Variables' when calling WorkflowResourceApi->Update"); + + var localVarPath = $"/workflow/{workflow.WorkflowId}/variables"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "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); + + if (workflow != null && workflow.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(workflow.Variables); + } + + // authentication (api_key) required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken; + } + + IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + int localVarStatusCode = (int)localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("Update", localVarResponse); + 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))); + } + + /// + /// Gets the workflow by workflow id + /// + /// Thrown when fails to make API call + /// + /// (optional, default to true) + /// (optional, default to false) + /// Workflow + public Workflow GetExecutionStatus(string workflowId, bool? includeTasks = null, bool? summarize = null) { ApiResponse localVarResponse = GetExecutionStatusWithHttpInfo(workflowId, includeTasks, summarize); return localVarResponse.Data; diff --git a/Conductor/Client/Extensions/ConductorTaskExtensions.cs b/Conductor/Client/Extensions/ConductorTaskExtensions.cs index b56968e9..b7303ec6 100644 --- a/Conductor/Client/Extensions/ConductorTaskExtensions.cs +++ b/Conductor/Client/Extensions/ConductorTaskExtensions.cs @@ -18,7 +18,7 @@ public static TaskResult InProgress(this Task task, string log = null, long? cal { new TaskExecLog { TaskId = task.TaskId, Log = log, CreatedTime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds() } }, - callbackAfterSeconds: callbackAfterSeconds.Value + callbackAfterSeconds: callbackAfterSeconds ); } diff --git a/Conductor/Definition/ConductorWorkflow.cs b/Conductor/Definition/ConductorWorkflow.cs index f7d44657..31629573 100644 --- a/Conductor/Definition/ConductorWorkflow.cs +++ b/Conductor/Definition/ConductorWorkflow.cs @@ -62,7 +62,14 @@ public ConductorWorkflow WithOutputParameter(string key, object value) return this; } - public ConductorWorkflow WithOwner(string ownerEmail) + public ConductorWorkflow WithVariable(string key, object value) + { + if (Variables == null) // if workflow does not have any variables, initialize with empty collection + Variables = new Dictionary(); + Variables.Add(key, value); + return this; + } + public ConductorWorkflow WithOwner(string ownerEmail) { OwnerEmail = ownerEmail; return this; diff --git a/Tests/Api/WorkflowResourceApiTest.cs b/Tests/Api/WorkflowResourceApiTest.cs new file mode 100644 index 00000000..527ea411 --- /dev/null +++ b/Tests/Api/WorkflowResourceApiTest.cs @@ -0,0 +1,97 @@ +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; + +namespace conductor_csharp.test.Api +{ + public class WorkflowResourceApiTest + { + private const string WORKFLOW_NAME = "TestToCreateVariables"; + private const string TASK_NAME = "TestToCreateVariables_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 readonly WorkflowResourceApi _workflowClient; + private readonly ILogger _logger; + + public WorkflowResourceApiTest() + { + _workflowClient = ApiExtensions.GetClient(); + _logger = ApplicationLogging.CreateLogger(); + } + + [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); + + // Create variables collection with values to be updated + var updateDict = new Dictionary { + {WORKFLOW_VARIABLE_1,"Value1" }, + {WORKFLOW_VARIABLE_2,"Value2" }, + }; + var updateVariableData = new Workflow() { WorkflowId = workflowId, Variables = updateDict }; + // Update the work flow variables + _workflowClient.UpdateWorkflowVariables(updateVariableData); + // Fetch latest workflow data to validate the change in variables + var _updatedWorkFlow = _workflowClient.GetWorkflowStatusSummary(workflowId, includeVariables: true); + // Verify workflow variables data is equal with input passed + Assert.Equal(_updatedWorkFlow.Variables, updateDict); + } + + private async System.Threading.Tasks.Task ExecuteWorkflowTasks(TimeSpan workflowCompletionTimeout) + { + var host = WorkflowTaskHost.CreateWorkerHost(LogLevel.Information, new ClassWorker()); + await host.StartAsync(); + Thread.Sleep(workflowCompletionTimeout); + await host.StopAsync(); + } + + private ConductorWorkflow GetConductorWorkflow() + { + return new ConductorWorkflow() + .WithName(WORKFLOW_NAME) + .WithVersion(WORKFLOW_VERSION) + .WithDescription(WORKFLOW_DESC) + .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) + { + 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); + } + } +} diff --git a/csharp-examples/WorkFlowExamples.cs b/csharp-examples/WorkFlowExamples.cs new file mode 100644 index 00000000..777519f2 --- /dev/null +++ b/csharp-examples/WorkFlowExamples.cs @@ -0,0 +1,77 @@ +using Conductor.Client; +using Conductor.Definition.TaskType; +using Conductor.Definition; +using Conductor.Executor; +using Conductor.Api; +using Conductor.Client.Authentication; + +namespace csharp_examples +{ + public class WorkFlowExamples + { + + private const string KEY_ID = ""; + private const string KEY_SECRET = ""; + private const string OWNER_EMAIL = ""; + + private const string WORKFLOW_ID = ""; + private const string WORKFLOW_NAME = ""; + private const string WORKFLOW_DESCRIPTION = ""; + private const string TASK_NAME = ""; + private const string TASK_REFERENCE = ""; + + private const string VARIABLE_OLD_VALUE = "SOME_OLD_VALUE"; + private const string VARIABLE_NAME_1 = ""; + private const string VARIABLE_NEW_VALUE_1 = ""; + private const string VARIABLE_NAME_2 = ""; + private const string VARIABLE_NEW_VALUE_2 = ""; + + + public void RegisterWorkFlow() + { + Configuration configuration = new Configuration() + { + AuthenticationSettings = new OrkesAuthenticationSettings(KEY_ID, KEY_SECRET) + }; + + WorkflowExecutor executor = new WorkflowExecutor(configuration); + executor.RegisterWorkflow(GetConductorWorkflow(), true); + } + + private ConductorWorkflow GetConductorWorkflow() + { + var conductorWorkFlow = new ConductorWorkflow() + .WithName(WORKFLOW_NAME).WithDescription(WORKFLOW_DESCRIPTION) + .WithTask(new SimpleTask(TASK_NAME, TASK_REFERENCE)) + .WithOwner(OWNER_EMAIL); + + var workflowVariableTobeAdded = new Dictionary + { + { VARIABLE_NAME_1, VARIABLE_OLD_VALUE}, + { VARIABLE_NAME_2, VARIABLE_OLD_VALUE } + }; + + conductorWorkFlow.Variables = workflowVariableTobeAdded; + return conductorWorkFlow; + } + + public void UpdateWorkflowVariablesWithWorkFlowId() + { + var orkesApiClient = new OrkesApiClient(new Configuration(), + new OrkesAuthenticationSettings(KEY_ID, KEY_SECRET)); + var workflowClient = orkesApiClient.GetClient(); + var workFlowVariables = new Dictionary + { + { VARIABLE_NAME_1, VARIABLE_NEW_VALUE_1 }, + { VARIABLE_NAME_2, VARIABLE_NEW_VALUE_2 } + }; + + workflowClient.UpdateWorkflowVariables(new Conductor.Client.Models.Workflow() + { + WorkflowId = WORKFLOW_ID, + Variables = workFlowVariables + }); + } + + } +} From cf4449e0d634f02063478e799a6cc38b2e5107dd Mon Sep 17 00:00:00 2001 From: "Jithesh.Poojary" Date: Wed, 10 Jan 2024 16:09:29 +0530 Subject: [PATCH 4/9] Resolved lint whitespace errors --- Conductor/Api/WorkflowResourceApi.cs | 192 +++++++++++----------- Conductor/Definition/ConductorWorkflow.cs | 16 +- 2 files changed, 104 insertions(+), 104 deletions(-) diff --git a/Conductor/Api/WorkflowResourceApi.cs b/Conductor/Api/WorkflowResourceApi.cs index 4cd83b41..6331f259 100644 --- a/Conductor/Api/WorkflowResourceApi.cs +++ b/Conductor/Api/WorkflowResourceApi.cs @@ -72,26 +72,26 @@ public interface IWorkflowResourceApi : IApiAccessor /// 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); + /// + /// 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 /// @@ -1035,82 +1035,82 @@ public ApiResponse ExecuteWorkflowWithHttpInfo(StartWorkflowRequest (WorkflowRun)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(WorkflowRun))); } - public Object UpdateWorkflowVariables(Workflow workflow) - { - ApiResponse localVarResponse = UpdateWorkflowVariablesWithHttpInfo(workflow); - return localVarResponse.Data; - } - - public ApiResponse UpdateWorkflowVariablesWithHttpInfo(Workflow workflow) - { - // verify the required parameter 'body' is set - if (workflow == null) - throw new ApiException(400, "Missing required parameter 'body' when calling WorkflowResourceApi->Update"); - - if (string.IsNullOrEmpty(workflow.WorkflowId)) - throw new ApiException(400, "Missing required parameter 'WorkflowId' when calling WorkflowResourceApi->Update"); - - if (workflow.Variables == null) - throw new ApiException(400, "Missing required parameter 'Variables' when calling WorkflowResourceApi->Update"); - - var localVarPath = $"/workflow/{workflow.WorkflowId}/variables"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "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); - - if (workflow != null && workflow.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(workflow.Variables); - } - - // authentication (api_key) required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken; - } - - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - int localVarStatusCode = (int)localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("Update", localVarResponse); - 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))); - } - - /// - /// Gets the workflow by workflow id - /// - /// Thrown when fails to make API call - /// - /// (optional, default to true) - /// (optional, default to false) - /// Workflow - public Workflow GetExecutionStatus(string workflowId, bool? includeTasks = null, bool? summarize = null) + public Object UpdateWorkflowVariables(Workflow workflow) + { + ApiResponse localVarResponse = UpdateWorkflowVariablesWithHttpInfo(workflow); + return localVarResponse.Data; + } + + public ApiResponse UpdateWorkflowVariablesWithHttpInfo(Workflow workflow) + { + // verify the required parameter 'body' is set + if (workflow == null) + throw new ApiException(400, "Missing required parameter 'body' when calling WorkflowResourceApi->Update"); + + if (string.IsNullOrEmpty(workflow.WorkflowId)) + throw new ApiException(400, "Missing required parameter 'WorkflowId' when calling WorkflowResourceApi->Update"); + + if (workflow.Variables == null) + throw new ApiException(400, "Missing required parameter 'Variables' when calling WorkflowResourceApi->Update"); + + var localVarPath = $"/workflow/{workflow.WorkflowId}/variables"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "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); + + if (workflow != null && workflow.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(workflow.Variables); + } + + // authentication (api_key) required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken; + } + + IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + int localVarStatusCode = (int)localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("Update", localVarResponse); + 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))); + } + + /// + /// Gets the workflow by workflow id + /// + /// Thrown when fails to make API call + /// + /// (optional, default to true) + /// (optional, default to false) + /// Workflow + public Workflow GetExecutionStatus(string workflowId, bool? includeTasks = null, bool? summarize = null) { ApiResponse localVarResponse = GetExecutionStatusWithHttpInfo(workflowId, includeTasks, summarize); return localVarResponse.Data; diff --git a/Conductor/Definition/ConductorWorkflow.cs b/Conductor/Definition/ConductorWorkflow.cs index 31629573..3a50bbbb 100644 --- a/Conductor/Definition/ConductorWorkflow.cs +++ b/Conductor/Definition/ConductorWorkflow.cs @@ -62,14 +62,14 @@ public ConductorWorkflow WithOutputParameter(string key, object value) return this; } - public ConductorWorkflow WithVariable(string key, object value) - { - if (Variables == null) // if workflow does not have any variables, initialize with empty collection - Variables = new Dictionary(); - Variables.Add(key, value); - return this; - } - public ConductorWorkflow WithOwner(string ownerEmail) + public ConductorWorkflow WithVariable(string key, object value) + { + if (Variables == null) // if workflow does not have any variables, initialize with empty collection + Variables = new Dictionary(); + Variables.Add(key, value); + return this; + } + public ConductorWorkflow WithOwner(string ownerEmail) { OwnerEmail = ownerEmail; return this; From 293ef61c8da9707f769070fdf043b4cc5912d4f4 Mon Sep 17 00:00:00 2001 From: "Jithesh.Poojary" Date: Wed, 10 Jan 2024 16:26:48 +0530 Subject: [PATCH 5/9] Fixing the space issues --- Conductor/Api/WorkflowResourceApi.cs | 70 +++++------ Conductor/Definition/ConductorWorkflow.cs | 6 +- Tests/Api/WorkflowResourceApiTest.cs | 146 +++++++++++----------- csharp-examples/Runner.cs | 4 +- csharp-examples/WorkFlowExamples.cs | 110 ++++++++-------- 5 files changed, 168 insertions(+), 168 deletions(-) diff --git a/Conductor/Api/WorkflowResourceApi.cs b/Conductor/Api/WorkflowResourceApi.cs index 6331f259..409632af 100644 --- a/Conductor/Api/WorkflowResourceApi.cs +++ b/Conductor/Api/WorkflowResourceApi.cs @@ -1037,67 +1037,67 @@ public ApiResponse ExecuteWorkflowWithHttpInfo(StartWorkflowRequest public Object UpdateWorkflowVariables(Workflow workflow) { - ApiResponse localVarResponse = UpdateWorkflowVariablesWithHttpInfo(workflow); - return localVarResponse.Data; + ApiResponse localVarResponse = UpdateWorkflowVariablesWithHttpInfo(workflow); + return localVarResponse.Data; } public ApiResponse UpdateWorkflowVariablesWithHttpInfo(Workflow workflow) { - // verify the required parameter 'body' is set - if (workflow == null) + // verify the required parameter 'body' is set + if (workflow == null) throw new ApiException(400, "Missing required parameter 'body' when calling WorkflowResourceApi->Update"); - if (string.IsNullOrEmpty(workflow.WorkflowId)) + if (string.IsNullOrEmpty(workflow.WorkflowId)) throw new ApiException(400, "Missing required parameter 'WorkflowId' when calling WorkflowResourceApi->Update"); - if (workflow.Variables == null) + if (workflow.Variables == null) throw new ApiException(400, "Missing required parameter 'Variables' when calling WorkflowResourceApi->Update"); - var localVarPath = $"/workflow/{workflow.WorkflowId}/variables"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; + var localVarPath = $"/workflow/{workflow.WorkflowId}/variables"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { "*/*" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - if (workflow != null && workflow.GetType() != typeof(byte[])) - { + if (workflow != null && workflow.GetType() != typeof(byte[])) + { localVarPostBody = this.Configuration.ApiClient.Serialize(workflow.Variables); - } + } - // authentication (api_key) required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { + // authentication (api_key) required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken; - } + } - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); - int localVarStatusCode = (int)localVarResponse.StatusCode; + int localVarStatusCode = (int)localVarResponse.StatusCode; - if (ExceptionFactory != null) - { + if (ExceptionFactory != null) + { Exception exception = ExceptionFactory("Update", localVarResponse); if (exception != null) throw exception; - } + } - return new ApiResponse(localVarStatusCode, + 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/Definition/ConductorWorkflow.cs b/Conductor/Definition/ConductorWorkflow.cs index 3a50bbbb..e22a01a9 100644 --- a/Conductor/Definition/ConductorWorkflow.cs +++ b/Conductor/Definition/ConductorWorkflow.cs @@ -64,10 +64,10 @@ public ConductorWorkflow WithOutputParameter(string key, object value) public ConductorWorkflow WithVariable(string key, object value) { - if (Variables == null) // if workflow does not have any variables, initialize with empty collection + if (Variables == null) // if workflow does not have any variables, initialize with empty collection Variables = new Dictionary(); - Variables.Add(key, value); - return this; + Variables.Add(key, value); + return this; } public ConductorWorkflow WithOwner(string ownerEmail) { diff --git a/Tests/Api/WorkflowResourceApiTest.cs b/Tests/Api/WorkflowResourceApiTest.cs index 527ea411..343c3bc7 100644 --- a/Tests/Api/WorkflowResourceApiTest.cs +++ b/Tests/Api/WorkflowResourceApiTest.cs @@ -14,84 +14,84 @@ namespace conductor_csharp.test.Api { - public class WorkflowResourceApiTest - { - private const string WORKFLOW_NAME = "TestToCreateVariables"; - private const string TASK_NAME = "TestToCreateVariables_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; + public class WorkflowResourceApiTest + { + private const string WORKFLOW_NAME = "TestToCreateVariables"; + private const string TASK_NAME = "TestToCreateVariables_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 readonly WorkflowResourceApi _workflowClient; - private readonly ILogger _logger; + private readonly WorkflowResourceApi _workflowClient; + private readonly ILogger _logger; - public WorkflowResourceApiTest() - { - _workflowClient = ApiExtensions.GetClient(); - _logger = ApplicationLogging.CreateLogger(); - } + public WorkflowResourceApiTest() + { + _workflowClient = ApiExtensions.GetClient(); + _logger = ApplicationLogging.CreateLogger(); + } - [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); + [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); - // Create variables collection with values to be updated - var updateDict = new Dictionary { - {WORKFLOW_VARIABLE_1,"Value1" }, - {WORKFLOW_VARIABLE_2,"Value2" }, - }; - var updateVariableData = new Workflow() { WorkflowId = workflowId, Variables = updateDict }; - // Update the work flow variables - _workflowClient.UpdateWorkflowVariables(updateVariableData); - // Fetch latest workflow data to validate the change in variables - var _updatedWorkFlow = _workflowClient.GetWorkflowStatusSummary(workflowId, includeVariables: true); - // Verify workflow variables data is equal with input passed - Assert.Equal(_updatedWorkFlow.Variables, updateDict); - } + // Create variables collection with values to be updated + var updateDict = new Dictionary { + {WORKFLOW_VARIABLE_1,"Value1" }, + {WORKFLOW_VARIABLE_2,"Value2" }, + }; + var updateVariableData = new Workflow() { WorkflowId = workflowId, Variables = updateDict }; + // Update the work flow variables + _workflowClient.UpdateWorkflowVariables(updateVariableData); + // Fetch latest workflow data to validate the change in variables + var _updatedWorkFlow = _workflowClient.GetWorkflowStatusSummary(workflowId, includeVariables: true); + // Verify workflow variables data is equal with input passed + Assert.Equal(_updatedWorkFlow.Variables, updateDict); + } - private async System.Threading.Tasks.Task ExecuteWorkflowTasks(TimeSpan workflowCompletionTimeout) - { - var host = WorkflowTaskHost.CreateWorkerHost(LogLevel.Information, new ClassWorker()); - await host.StartAsync(); - Thread.Sleep(workflowCompletionTimeout); - await host.StopAsync(); - } + private async System.Threading.Tasks.Task ExecuteWorkflowTasks(TimeSpan workflowCompletionTimeout) + { + var host = WorkflowTaskHost.CreateWorkerHost(LogLevel.Information, new ClassWorker()); + await host.StartAsync(); + Thread.Sleep(workflowCompletionTimeout); + await host.StopAsync(); + } - private ConductorWorkflow GetConductorWorkflow() - { - return new ConductorWorkflow() - .WithName(WORKFLOW_NAME) - .WithVersion(WORKFLOW_VERSION) - .WithDescription(WORKFLOW_DESC) - .WithTask(new SimpleTask(TASK_NAME, TASK_NAME)) - .WithVariable(WORKFLOW_VARIABLE_1, $"{WORKFLOW_VARIABLE_1}_Value") - .WithVariable(WORKFLOW_VARIABLE_2, $"{WORKFLOW_VARIABLE_2}_Value"); - } + private ConductorWorkflow GetConductorWorkflow() + { + return new ConductorWorkflow() + .WithName(WORKFLOW_NAME) + .WithVersion(WORKFLOW_VERSION) + .WithDescription(WORKFLOW_DESC) + .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) - { - 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); - } - } + private async System.Threading.Tasks.Task ValidateWorkflowCompletion(params string[] workflowIdList) + { + 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); + } + } } diff --git a/csharp-examples/Runner.cs b/csharp-examples/Runner.cs index 02134d01..24123c5c 100644 --- a/csharp-examples/Runner.cs +++ b/csharp-examples/Runner.cs @@ -50,8 +50,8 @@ public async void StartTasks() } } - while (true) - Thread.Sleep(TimeSpan.FromDays(1)); // after 1 year will stop the service + while (true) + Thread.Sleep(TimeSpan.FromDays(1));// after 1 year will stop the service } catch (Exception e) diff --git a/csharp-examples/WorkFlowExamples.cs b/csharp-examples/WorkFlowExamples.cs index 777519f2..5922836e 100644 --- a/csharp-examples/WorkFlowExamples.cs +++ b/csharp-examples/WorkFlowExamples.cs @@ -7,71 +7,71 @@ namespace csharp_examples { - public class WorkFlowExamples - { + public class WorkFlowExamples + { - private const string KEY_ID = ""; - private const string KEY_SECRET = ""; - private const string OWNER_EMAIL = ""; + private const string KEY_ID = ""; + private const string KEY_SECRET = ""; + private const string OWNER_EMAIL = ""; - private const string WORKFLOW_ID = ""; - private const string WORKFLOW_NAME = ""; - private const string WORKFLOW_DESCRIPTION = ""; - private const string TASK_NAME = ""; - private const string TASK_REFERENCE = ""; + private const string WORKFLOW_ID = ""; + private const string WORKFLOW_NAME = ""; + private const string WORKFLOW_DESCRIPTION = ""; + private const string TASK_NAME = ""; + private const string TASK_REFERENCE = ""; - private const string VARIABLE_OLD_VALUE = "SOME_OLD_VALUE"; - private const string VARIABLE_NAME_1 = ""; - private const string VARIABLE_NEW_VALUE_1 = ""; - private const string VARIABLE_NAME_2 = ""; - private const string VARIABLE_NEW_VALUE_2 = ""; + private const string VARIABLE_OLD_VALUE = "SOME_OLD_VALUE"; + private const string VARIABLE_NAME_1 = ""; + private const string VARIABLE_NEW_VALUE_1 = ""; + private const string VARIABLE_NAME_2 = ""; + private const string VARIABLE_NEW_VALUE_2 = ""; - public void RegisterWorkFlow() - { - Configuration configuration = new Configuration() - { - AuthenticationSettings = new OrkesAuthenticationSettings(KEY_ID, KEY_SECRET) - }; + public void RegisterWorkFlow() + { + Configuration configuration = new Configuration() + { + AuthenticationSettings = new OrkesAuthenticationSettings(KEY_ID, KEY_SECRET) + }; - WorkflowExecutor executor = new WorkflowExecutor(configuration); - executor.RegisterWorkflow(GetConductorWorkflow(), true); - } + WorkflowExecutor executor = new WorkflowExecutor(configuration); + executor.RegisterWorkflow(GetConductorWorkflow(), true); + } - private ConductorWorkflow GetConductorWorkflow() - { - var conductorWorkFlow = new ConductorWorkflow() - .WithName(WORKFLOW_NAME).WithDescription(WORKFLOW_DESCRIPTION) - .WithTask(new SimpleTask(TASK_NAME, TASK_REFERENCE)) - .WithOwner(OWNER_EMAIL); + private ConductorWorkflow GetConductorWorkflow() + { + var conductorWorkFlow = new ConductorWorkflow() + .WithName(WORKFLOW_NAME).WithDescription(WORKFLOW_DESCRIPTION) + .WithTask(new SimpleTask(TASK_NAME, TASK_REFERENCE)) + .WithOwner(OWNER_EMAIL); - var workflowVariableTobeAdded = new Dictionary - { - { VARIABLE_NAME_1, VARIABLE_OLD_VALUE}, - { VARIABLE_NAME_2, VARIABLE_OLD_VALUE } - }; + var workflowVariableTobeAdded = new Dictionary + { + { VARIABLE_NAME_1, VARIABLE_OLD_VALUE}, + { VARIABLE_NAME_2, VARIABLE_OLD_VALUE } + }; - conductorWorkFlow.Variables = workflowVariableTobeAdded; - return conductorWorkFlow; - } + conductorWorkFlow.Variables = workflowVariableTobeAdded; + return conductorWorkFlow; + } - public void UpdateWorkflowVariablesWithWorkFlowId() - { - var orkesApiClient = new OrkesApiClient(new Configuration(), - new OrkesAuthenticationSettings(KEY_ID, KEY_SECRET)); - var workflowClient = orkesApiClient.GetClient(); - var workFlowVariables = new Dictionary - { - { VARIABLE_NAME_1, VARIABLE_NEW_VALUE_1 }, - { VARIABLE_NAME_2, VARIABLE_NEW_VALUE_2 } - }; + public void UpdateWorkflowVariablesWithWorkFlowId() + { + var orkesApiClient = new OrkesApiClient(new Configuration(), + new OrkesAuthenticationSettings(KEY_ID, KEY_SECRET)); + var workflowClient = orkesApiClient.GetClient(); + var workFlowVariables = new Dictionary + { + { VARIABLE_NAME_1, VARIABLE_NEW_VALUE_1 }, + { VARIABLE_NAME_2, VARIABLE_NEW_VALUE_2 } + }; - workflowClient.UpdateWorkflowVariables(new Conductor.Client.Models.Workflow() - { - WorkflowId = WORKFLOW_ID, - Variables = workFlowVariables - }); - } + workflowClient.UpdateWorkflowVariables(new Conductor.Client.Models.Workflow() + { + WorkflowId = WORKFLOW_ID, + Variables = workFlowVariables + }); + } - } + } } From 1a9203f943ff64ce18cdc71b182362d29994bc3c Mon Sep 17 00:00:00 2001 From: "Jithesh.Poojary" Date: Wed, 31 Jan 2024 13:16:00 +0530 Subject: [PATCH 6/9] Changes to address RestClient Issue in SDK. --- Conductor/Api/ApplicationResourceApi.cs | 62 ++++----- Conductor/Api/AuthorizationResourceApi.cs | 14 +- Conductor/Api/EventResourceApi.cs | 38 ++--- Conductor/Api/GroupResourceApi.cs | 42 +++--- Conductor/Api/MetadataResourceApi.cs | 52 +++---- Conductor/Api/SchedulerResourceApi.cs | 62 ++++----- Conductor/Api/SecretResourceApi.cs | 42 +++--- Conductor/Api/TagsApi.cs | 38 ++--- Conductor/Api/TaskResourceApi.cs | 66 ++++----- Conductor/Api/TokenResourceApi.cs | 10 +- Conductor/Api/UserResourceApi.cs | 26 ++-- Conductor/Api/WorkflowBulkResourceApi.cs | 22 +-- Conductor/Api/WorkflowResourceApi.cs | 118 ++++++++-------- Conductor/Client/ApiClient.cs | 73 ++++++++-- Conductor/Client/Configuration.cs | 29 ++-- Conductor/Client/ExceptionFactory.cs | 2 +- Conductor/Client/Extensions/ApiExtensions.cs | 13 +- Conductor/Client/IReadableConfiguration.cs | 6 - Conductor/conductor-csharp.csproj | 4 +- Tests/Api/WorkflowResourceApiTest.cs | 138 ++++++++++++++----- csharp-examples/WorkFlowExamples.cs | 102 +++++++++++++- 21 files changed, 580 insertions(+), 379 deletions(-) diff --git a/Conductor/Api/ApplicationResourceApi.cs b/Conductor/Api/ApplicationResourceApi.cs index 6cb93351..9f6a8013 100644 --- a/Conductor/Api/ApplicationResourceApi.cs +++ b/Conductor/Api/ApplicationResourceApi.cs @@ -394,7 +394,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(); } /// @@ -478,8 +478,8 @@ public ApiResponse AddRoleToApplicationUserWithHttpInfo(string applicati } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -548,8 +548,8 @@ public ApiResponse CreateAccessKeyWithHttpInfo(string id) } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -626,8 +626,8 @@ public ApiResponse CreateApplicationWithHttpInfo(CreateOrUpdateApplicati } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -702,8 +702,8 @@ public ApiResponse DeleteAccessKeyWithHttpInfo(string applicationId, str } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -772,8 +772,8 @@ public ApiResponse DeleteApplicationWithHttpInfo(string id) } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -854,8 +854,8 @@ public ApiResponse DeleteTagForApplicationWithHttpInfo(List b } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -924,8 +924,8 @@ public ApiResponse GetAccessKeysWithHttpInfo(string id) } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -994,8 +994,8 @@ public ApiResponse GetAppByAccessKeyIdWithHttpInfo(string accessKeyId) } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1064,8 +1064,8 @@ public ApiResponse GetApplicationWithHttpInfo(string id) } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1134,8 +1134,8 @@ public ApiResponse> GetTagsForApplicationWithHttpInfo(string id) } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1198,8 +1198,8 @@ public ApiResponse> ListApplicationsWithHttpI } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1280,8 +1280,8 @@ public ApiResponse PutTagForApplicationWithHttpInfo(List body } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1356,8 +1356,8 @@ public ApiResponse RemoveRoleFromApplicationUserWithHttpInfo(string appl } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1432,8 +1432,8 @@ public ApiResponse ToggleAccessKeyStatusWithHttpInfo(string applicationI } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1516,8 +1516,8 @@ public ApiResponse UpdateApplicationWithHttpInfo(CreateOrUpdateApplicati } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; diff --git a/Conductor/Api/AuthorizationResourceApi.cs b/Conductor/Api/AuthorizationResourceApi.cs index 6ac7e8ab..3ae11de0 100644 --- a/Conductor/Api/AuthorizationResourceApi.cs +++ b/Conductor/Api/AuthorizationResourceApi.cs @@ -133,7 +133,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(); } /// @@ -217,8 +217,8 @@ public ApiResponse GetPermissionsWithHttpInfo(string type, string id) } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -295,8 +295,8 @@ public ApiResponse GrantPermissionsWithHttpInfo(AuthorizationRequest b } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -373,8 +373,8 @@ public ApiResponse RemovePermissionsWithHttpInfo(AuthorizationRequest } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; diff --git a/Conductor/Api/EventResourceApi.cs b/Conductor/Api/EventResourceApi.cs index d4037457..ecce4259 100644 --- a/Conductor/Api/EventResourceApi.cs +++ b/Conductor/Api/EventResourceApi.cs @@ -262,7 +262,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(); } /// @@ -346,8 +346,8 @@ public ApiResponse AddEventHandlerWithHttpInfo(EventHandler body) } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -420,8 +420,8 @@ 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, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -484,8 +484,8 @@ public ApiResponse> GetEventHandlersWithHttpInfo() } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -557,8 +557,8 @@ public ApiResponse> GetEventHandlersForEventWithHttpInfo(stri } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -633,8 +633,8 @@ public ApiResponse> GetQueueConfigWithHttpInfo(string } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -697,8 +697,8 @@ public ApiResponse> GetQueueNamesWithHttpInfo() } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -785,8 +785,8 @@ 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, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -853,8 +853,8 @@ public ApiResponse RemoveEventHandlerStatusWithHttpInfo(string name) } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -929,8 +929,8 @@ public ApiResponse UpdateEventHandlerWithHttpInfo(EventHandler body) } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; diff --git a/Conductor/Api/GroupResourceApi.cs b/Conductor/Api/GroupResourceApi.cs index 251b006e..b3bfbc5f 100644 --- a/Conductor/Api/GroupResourceApi.cs +++ b/Conductor/Api/GroupResourceApi.cs @@ -286,7 +286,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(); } /// @@ -370,8 +370,8 @@ 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, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -452,8 +452,8 @@ 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, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -522,8 +522,8 @@ public ApiResponse DeleteGroupWithHttpInfo(string id) } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -592,8 +592,8 @@ public ApiResponse GetGrantedPermissionsWithHttpInfo(string groupId) } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -662,8 +662,8 @@ public ApiResponse GetGroupWithHttpInfo(string id) } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -732,8 +732,8 @@ public ApiResponse GetUsersInGroupWithHttpInfo(string id) } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -796,8 +796,8 @@ public ApiResponse> ListGroupsWithHttpInfo() } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -872,8 +872,8 @@ 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, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -954,8 +954,8 @@ 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, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1038,8 +1038,8 @@ 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, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; diff --git a/Conductor/Api/MetadataResourceApi.cs b/Conductor/Api/MetadataResourceApi.cs index 246a1ea5..3a605e4f 100644 --- a/Conductor/Api/MetadataResourceApi.cs +++ b/Conductor/Api/MetadataResourceApi.cs @@ -1,9 +1,9 @@ +using Conductor.Client; +using Conductor.Client.Models; +using RestSharp; using System; using System.Collections.Generic; using System.Linq; -using RestSharp; -using Conductor.Client; -using Conductor.Client.Models; namespace Conductor.Api { @@ -322,7 +322,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(); } /// @@ -411,8 +411,8 @@ 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, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -487,8 +487,8 @@ 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, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -566,8 +566,8 @@ public ApiResponse> GetAllWorkflowsWithHttpInfo(string access } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -639,8 +639,8 @@ 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, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -715,8 +715,8 @@ 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, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -793,8 +793,8 @@ public ApiResponse RegisterTaskDefWithHttpInfo(List body) } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -861,8 +861,8 @@ public ApiResponse UnregisterTaskDefWithHttpInfo(string tasktype) } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -935,8 +935,8 @@ 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, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1016,8 +1016,8 @@ 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, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1094,8 +1094,8 @@ public ApiResponse UpdateTaskDefWithHttpInfo(TaskDef body) } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1158,8 +1158,8 @@ public ApiResponse UploadWorkflowsAndTasksDefinitionsToS3WithHttpInfo() } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; diff --git a/Conductor/Api/SchedulerResourceApi.cs b/Conductor/Api/SchedulerResourceApi.cs index 2eab8034..69255c12 100644 --- a/Conductor/Api/SchedulerResourceApi.cs +++ b/Conductor/Api/SchedulerResourceApi.cs @@ -392,7 +392,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(); } /// @@ -470,8 +470,8 @@ public ApiResponse DeleteScheduleWithHttpInfo(string name) } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -552,8 +552,8 @@ public ApiResponse DeleteTagForScheduleWithHttpInfo(List body } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -619,8 +619,8 @@ public ApiResponse> GetAllSchedulesWithHttpInfo(string wo } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -698,8 +698,8 @@ public ApiResponse> GetAllSchedulesWithHttpInfo(string wo } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -768,8 +768,8 @@ public ApiResponse GetScheduleWithHttpInfo(string name) } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -838,8 +838,8 @@ public ApiResponse> GetTagsForScheduleWithHttpInfo(string name) } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -902,8 +902,8 @@ public ApiResponse> PauseAllSchedulesWithHttpInfo() } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -972,8 +972,8 @@ public ApiResponse PauseScheduleWithHttpInfo(string name) } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1054,8 +1054,8 @@ 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, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1118,8 +1118,8 @@ public ApiResponse> RequeueAllExecutionRecordsWithHtt } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1182,8 +1182,8 @@ public ApiResponse> ResumeAllSchedulesWithHttpInfo() } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1252,8 +1252,8 @@ public ApiResponse ResumeScheduleWithHttpInfo(string name) } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1330,8 +1330,8 @@ public ApiResponse SaveScheduleWithHttpInfo(SaveScheduleRequest body) } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1409,8 +1409,8 @@ public ApiResponse SearchV22WithHttp } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1471,8 +1471,8 @@ public ApiResponse TestTimeoutWithHttpInfo() } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; diff --git a/Conductor/Api/SecretResourceApi.cs b/Conductor/Api/SecretResourceApi.cs index 6374340d..f9e350c0 100644 --- a/Conductor/Api/SecretResourceApi.cs +++ b/Conductor/Api/SecretResourceApi.cs @@ -277,7 +277,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(); } /// @@ -355,8 +355,8 @@ public ApiResponse DeleteSecretWithHttpInfo(string key) } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -437,8 +437,8 @@ public ApiResponse DeleteTagForSecretWithHttpInfo(List body, } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -507,8 +507,8 @@ public ApiResponse GetSecretWithHttpInfo(string key) } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -577,8 +577,8 @@ public ApiResponse> GetTagsWithHttpInfo(string key) } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -641,8 +641,8 @@ public ApiResponse ListAllSecretNamesWithHttpInfo() } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -705,8 +705,8 @@ public ApiResponse> ListSecretsThatUserCanGrantAccessToWithHttpInfo } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -769,8 +769,8 @@ public ApiResponse> ListSecretsWithTagsThatUserCanGrantAcce } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -853,8 +853,8 @@ 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, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -935,8 +935,8 @@ 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, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1005,8 +1005,8 @@ public ApiResponse SecretExistsWithHttpInfo(string key) } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; diff --git a/Conductor/Api/TagsApi.cs b/Conductor/Api/TagsApi.cs index a959ab3f..fb295f24 100644 --- a/Conductor/Api/TagsApi.cs +++ b/Conductor/Api/TagsApi.cs @@ -267,7 +267,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(); } /// @@ -359,8 +359,8 @@ 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, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -443,8 +443,8 @@ 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, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -527,8 +527,8 @@ 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, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -611,8 +611,8 @@ 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, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -675,8 +675,8 @@ public ApiResponse> GetTagsWithHttpInfo() } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -745,8 +745,8 @@ public ApiResponse> GetTaskTagsWithHttpInfo(string taskName) } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -815,8 +815,8 @@ public ApiResponse> GetWorkflowTagsWithHttpInfo(string name) } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -899,8 +899,8 @@ 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, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -983,8 +983,8 @@ 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, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; diff --git a/Conductor/Api/TaskResourceApi.cs b/Conductor/Api/TaskResourceApi.cs index f25b67e3..b3526a68 100644 --- a/Conductor/Api/TaskResourceApi.cs +++ b/Conductor/Api/TaskResourceApi.cs @@ -450,7 +450,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(); } /// @@ -522,8 +522,8 @@ public Conductor.Client.ExceptionFactory ExceptionFactory } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -586,8 +586,8 @@ public Conductor.Client.ExceptionFactory ExceptionFactory } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -668,8 +668,8 @@ public ApiResponse> BatchPollWithHttpInfo(string tasktype, string wor } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -761,8 +761,8 @@ public ApiResponse> GetAllPollDataWithHttpInfo(long? } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -843,8 +843,8 @@ public ApiResponse GetExternalStorageLocationWithHttpIn } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -913,8 +913,8 @@ public ApiResponse> GetPollDataWithHttpInfo(string taskType) } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -983,8 +983,8 @@ public ApiResponse GetTaskWithHttpInfo(string taskId) } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1053,8 +1053,8 @@ public ApiResponse> GetTaskLogsWithHttpInfo(string taskId) } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1135,8 +1135,8 @@ 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, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1211,8 +1211,8 @@ public ApiResponse PollWithHttpInfo(string tasktype, string workerid = nul } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1281,8 +1281,8 @@ public ApiResponse RequeuePendingTaskWithHttpInfo(string taskType) } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1360,8 +1360,8 @@ public ApiResponse SearchWithHttpInfo(int? start = null } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1439,8 +1439,8 @@ public ApiResponse SearchV2WithHttpInfo(int? start = null, int } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1506,8 +1506,8 @@ public ApiResponse SearchV2WithHttpInfo(int? start = null, int } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1584,8 +1584,8 @@ public ApiResponse UpdateTaskWithHttpInfo(TaskResult body) } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1687,8 +1687,8 @@ public ApiResponse UpdateTaskWithHttpInfo(Dictionary bod } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; diff --git a/Conductor/Api/TokenResourceApi.cs b/Conductor/Api/TokenResourceApi.cs index cd1a1605..ef5ce842 100644 --- a/Conductor/Api/TokenResourceApi.cs +++ b/Conductor/Api/TokenResourceApi.cs @@ -109,7 +109,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(); } /// @@ -190,8 +190,8 @@ public ApiResponse GenerateTokenWithHttpInfo(GenerateTokenRequest body) } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -252,8 +252,8 @@ 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, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; diff --git a/Conductor/Api/UserResourceApi.cs b/Conductor/Api/UserResourceApi.cs index 3e81b6c7..35a6a861 100644 --- a/Conductor/Api/UserResourceApi.cs +++ b/Conductor/Api/UserResourceApi.cs @@ -197,7 +197,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(); } /// @@ -275,8 +275,8 @@ public ApiResponse DeleteUserWithHttpInfo(string id) } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -345,8 +345,8 @@ public ApiResponse GetGrantedPermissionsWithHttpInfo(string userId) } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -415,8 +415,8 @@ public ApiResponse GetUserWithHttpInfo(string id) } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -482,8 +482,8 @@ public ApiResponse> ListUsersWithHttpInfo(bool? apps = null) } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -563,8 +563,8 @@ 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, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -647,8 +647,8 @@ 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, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; diff --git a/Conductor/Api/WorkflowBulkResourceApi.cs b/Conductor/Api/WorkflowBulkResourceApi.cs index dd1622a6..905ee1ff 100644 --- a/Conductor/Api/WorkflowBulkResourceApi.cs +++ b/Conductor/Api/WorkflowBulkResourceApi.cs @@ -178,7 +178,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(); } /// @@ -264,8 +264,8 @@ public ApiResponse PauseWorkflowWithHttpInfo(List body) } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -345,8 +345,8 @@ 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, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -423,8 +423,8 @@ public ApiResponse ResumeWorkflowWithHttpInfo(List body) } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -501,8 +501,8 @@ public ApiResponse RetryWithHttpInfo(List body) } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -585,8 +585,8 @@ 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, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; diff --git a/Conductor/Api/WorkflowResourceApi.cs b/Conductor/Api/WorkflowResourceApi.cs index 409632af..db342c02 100644 --- a/Conductor/Api/WorkflowResourceApi.cs +++ b/Conductor/Api/WorkflowResourceApi.cs @@ -772,7 +772,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(); } /// @@ -848,8 +848,8 @@ public ApiResponse DecideWithHttpInfo(string workflowId) } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -919,8 +919,8 @@ public ApiResponse DeleteWithHttpInfo(string workflowId, bool? archiveWo } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1018,8 +1018,8 @@ public ApiResponse ExecuteWorkflowWithHttpInfo(StartWorkflowRequest } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1086,8 +1086,8 @@ 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, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1161,8 +1161,8 @@ public ApiResponse GetExecutionStatusWithHttpInfo(string workflowId, b } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1240,8 +1240,8 @@ public ApiResponse GetExecutionStatusTaskListWithHt } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1322,8 +1322,8 @@ public ApiResponse GetExternalStorageLocationWithHttpIn } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1401,8 +1401,8 @@ public ApiResponse> GetRunningWorkflowWithHttpInfo(string name, int } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1477,8 +1477,8 @@ public ApiResponse GetWorkflowStatusSummaryWithHttpInfo(string w } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1567,8 +1567,8 @@ public ApiResponse>> GetWorkflowsWithHttpInfo( } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1651,8 +1651,8 @@ public ApiResponse>> GetWorkflowsWithHttpInfo( } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1733,8 +1733,8 @@ public ApiResponse> GetWorkflowsWithHttpInfo(string name, string } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1801,8 +1801,8 @@ public ApiResponse PauseWorkflowWithHttpInfo(string workflowId) } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1888,8 +1888,8 @@ public ApiResponse JumpToTaskWithHttpInfo(Dictionary bod } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1973,8 +1973,8 @@ 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, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -2041,8 +2041,8 @@ public ApiResponse ResetWorkflowWithHttpInfo(string workflowId) } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -2112,8 +2112,8 @@ public ApiResponse RestartWithHttpInfo(string workflowId, bool? useLates } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -2180,8 +2180,8 @@ public ApiResponse ResumeWorkflowWithHttpInfo(string workflowId) } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -2251,8 +2251,8 @@ public ApiResponse RetryWithHttpInfo(string workflowId, bool? resumeSubw } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -2336,8 +2336,8 @@ public ApiResponse SearchWithHttpInfo(str } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -2415,8 +2415,8 @@ public ApiResponse SearchV2WithHttpInfo(int? start = null, } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -2494,8 +2494,8 @@ public ApiResponse SearchWorkflowsByTasksWithHttpIn } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -2573,8 +2573,8 @@ public ApiResponse SearchWorkflowsByTasksV2WithHttpInfo(in } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -2653,8 +2653,8 @@ public ApiResponse SkipTaskFromWorkflowWithHttpInfo(string workflowId, s } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -2731,8 +2731,8 @@ public ApiResponse StartWorkflowWithHttpInfo(StartWorkflowRequest body) } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -2824,8 +2824,8 @@ public ApiResponse StartWorkflowWithHttpInfo(string name, Dictionary TerminateWithHttpInfo(string workflowId, string reaso } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -2976,8 +2976,8 @@ public ApiResponse TestWorkflowWithHttpInfo(WorkflowTestRequest body) } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -3040,8 +3040,8 @@ public ApiResponse UploadCompletedWorkflowsWithHttpInfo() } // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, + Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; 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..c26efa6b 100644 --- a/Conductor/Client/Extensions/ApiExtensions.cs +++ b/Conductor/Client/Extensions/ApiExtensions.cs @@ -16,22 +16,21 @@ public class ApiExtensions static ApiExtensions() { - Configuration = new Configuration + Configuration = new Configuration(30 * 1000) { - 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/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..84a779f4 100644 --- a/Tests/Api/WorkflowResourceApiTest.cs +++ b/Tests/Api/WorkflowResourceApiTest.cs @@ -5,10 +5,7 @@ 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..cf6e4260 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 { @@ -29,11 +30,12 @@ public class WorkFlowExamples public void RegisterWorkFlow() { - Configuration configuration = new Configuration() + Configuration configuration = new Configuration(98765) { AuthenticationSettings = new OrkesAuthenticationSettings(KEY_ID, KEY_SECRET) }; - + var con = ApiExtensions.Configuration; + Configuration configuration1 = new Configuration(); WorkflowExecutor executor = new WorkflowExecutor(configuration); executor.RegisterWorkflow(GetConductorWorkflow(), true); } @@ -73,5 +75,101 @@ public void UpdateWorkflowVariablesWithWorkFlowId() }); } + + /// + /// To test Update variables with workflowId + /// + public void TestUpdateWorkflowVariablesWithWorkFlowId() + { + var orkesApiClient = new OrkesApiClient(new Configuration(), + new OrkesAuthenticationSettings(KEY_ID, KEY_SECRET)); + var workflowClient = orkesApiClient.GetClient(); + var workFlowVariables = new Dictionary + { + { VARIABLE_NAME_1, VARIABLE_NEW_VALUE_1 }, + { VARIABLE_NAME_2, VARIABLE_NEW_VALUE_2 } + }; + + workflowClient.UpdateWorkflowVariables(new Conductor.Client.Models.Workflow() + { + WorkflowId = WORKFLOW_ID, + Variables = workFlowVariables + }); + } + + /// + /// 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); + } } } From 9a78771e4a2bc41559180b83abaf352f5b76fffb Mon Sep 17 00:00:00 2001 From: Jithesh Poojary Date: Fri, 2 Feb 2024 12:37:54 +0530 Subject: [PATCH 7/9] space modified --- Conductor/Client/Models/WorkflowRun.cs | 128 ++++++++++++------------- 1 file changed, 64 insertions(+), 64 deletions(-) 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)) + ); } /// From 65752004f128311b3ea0a7cbe33e22e4cb9ba4e5 Mon Sep 17 00:00:00 2001 From: Jithesh Poojary Date: Fri, 2 Feb 2024 13:01:59 +0530 Subject: [PATCH 8/9] Interface Seperation --- Conductor/Api/ApplicationResourceApi.cs | 838 +++++------ Conductor/Api/AuthorizationResourceApi.cs | 162 +- Conductor/Api/EventResourceApi.cs | 434 +++--- Conductor/Api/GroupResourceApi.cs | 491 +++--- Conductor/Api/IApplicationResourceApi.cs | 362 +++++ Conductor/Api/IAuthorizationResourceApi.cs | 90 ++ Conductor/Api/IEventResourceApi.cs | 225 +++ Conductor/Api/IGroupResourceApi.cs | 248 ++++ Conductor/Api/IMetaResourceApi.cs | 286 ++++ Conductor/Api/ISchedulerResourceApi.cs | 360 +++++ Conductor/Api/ISecretResourceApi.cs | 240 +++ Conductor/Api/ITagsApi.cs | 228 +++ Conductor/Api/ITaskResourceApi.cs | 420 ++++++ Conductor/Api/ITokenResourceApi.cs | 65 + Conductor/Api/IUserResourceApi.cs | 156 ++ Conductor/Api/IWorkflowBulkResourceApi.cs | 137 ++ Conductor/Api/IWorkflowResourceApi.cs | 763 ++++++++++ Conductor/Api/MetadataResourceApi.cs | 563 +++---- Conductor/Api/SchedulerResourceApi.cs | 743 ++++------ Conductor/Api/SecretResourceApi.cs | 486 +++--- Conductor/Api/TagsApi.cs | 463 +++--- Conductor/Api/TaskResourceApi.cs | 862 +++++------ Conductor/Api/TokenResourceApi.cs | 105 +- Conductor/Api/UserResourceApi.cs | 309 ++-- Conductor/Api/WorkflowBulkResourceApi.cs | 263 ++-- Conductor/Api/WorkflowResourceApi.cs | 1567 ++++++++------------ 26 files changed, 6497 insertions(+), 4369 deletions(-) create mode 100644 Conductor/Api/IApplicationResourceApi.cs create mode 100644 Conductor/Api/IAuthorizationResourceApi.cs create mode 100644 Conductor/Api/IEventResourceApi.cs create mode 100644 Conductor/Api/IGroupResourceApi.cs create mode 100644 Conductor/Api/IMetaResourceApi.cs create mode 100644 Conductor/Api/ISchedulerResourceApi.cs create mode 100644 Conductor/Api/ISecretResourceApi.cs create mode 100644 Conductor/Api/ITagsApi.cs create mode 100644 Conductor/Api/ITaskResourceApi.cs create mode 100644 Conductor/Api/ITokenResourceApi.cs create mode 100644 Conductor/Api/IUserResourceApi.cs create mode 100644 Conductor/Api/IWorkflowBulkResourceApi.cs create mode 100644 Conductor/Api/IWorkflowResourceApi.cs diff --git a/Conductor/Api/ApplicationResourceApi.cs b/Conductor/Api/ApplicationResourceApi.cs index 9f6a8013..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 /// @@ -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,20 +137,20 @@ 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; @@ -479,8 +158,8 @@ public ApiResponse AddRoleToApplicationUserWithHttpInfo(string applicati // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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,19 +220,19 @@ 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; @@ -549,8 +240,8 @@ public ApiResponse CreateAccessKeyWithHttpInfo(string id) // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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); @@ -627,8 +330,8 @@ public ApiResponse CreateApplicationWithHttpInfo(CreateOrUpdateApplicati // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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,20 +398,20 @@ 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; @@ -703,8 +419,8 @@ public ApiResponse DeleteAccessKeyWithHttpInfo(string applicationId, str // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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,19 +481,19 @@ 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; @@ -773,8 +501,8 @@ public ApiResponse DeleteApplicationWithHttpInfo(string id) // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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); @@ -855,8 +596,8 @@ public ApiResponse DeleteTagForApplicationWithHttpInfo(List b // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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,19 +658,19 @@ 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; @@ -925,8 +678,8 @@ public ApiResponse GetAccessKeysWithHttpInfo(string id) // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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,19 +740,19 @@ 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; @@ -995,8 +760,8 @@ public ApiResponse GetAppByAccessKeyIdWithHttpInfo(string accessKeyId) // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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,19 +822,19 @@ 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; @@ -1065,8 +842,8 @@ public ApiResponse GetApplicationWithHttpInfo(string id) // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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,19 +904,19 @@ 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; @@ -1135,8 +924,8 @@ public ApiResponse> GetTagsForApplicationWithHttpInfo(string id) // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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); @@ -1199,8 +999,8 @@ public ApiResponse> ListApplicationsWithHttpI // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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); @@ -1281,8 +1093,8 @@ public ApiResponse PutTagForApplicationWithHttpInfo(List body // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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,20 +1160,20 @@ 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; @@ -1357,8 +1181,8 @@ public ApiResponse RemoveRoleFromApplicationUserWithHttpInfo(string appl // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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,20 +1249,20 @@ 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; @@ -1433,8 +1270,8 @@ public ApiResponse ToggleAccessKeyStatusWithHttpInfo(string applicationI // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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); @@ -1517,8 +1367,8 @@ public ApiResponse UpdateApplicationWithHttpInfo(CreateOrUpdateApplicati // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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 3ae11de0..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 @@ -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,20 +140,20 @@ 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; @@ -218,8 +161,8 @@ public ApiResponse GetPermissionsWithHttpInfo(string type, string id) // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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); @@ -296,8 +250,8 @@ public ApiResponse GrantPermissionsWithHttpInfo(AuthorizationRequest b // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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); @@ -374,8 +340,8 @@ public ApiResponse RemovePermissionsWithHttpInfo(AuthorizationRequest // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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 ecce4259..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 @@ -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); @@ -347,8 +158,8 @@ public ApiResponse AddEventHandlerWithHttpInfo(EventHandler body) // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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); @@ -421,8 +244,8 @@ public ApiResponse DeleteQueueConfigWithHttpInfo(string queueType, strin // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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); @@ -485,8 +319,8 @@ public ApiResponse> GetEventHandlersWithHttpInfo() // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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); @@ -558,8 +405,8 @@ public ApiResponse> GetEventHandlersForEventWithHttpInfo(stri // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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); @@ -634,8 +494,8 @@ public ApiResponse> GetQueueConfigWithHttpInfo(string // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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); @@ -698,8 +569,8 @@ public ApiResponse> GetQueueNamesWithHttpInfo() // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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); @@ -786,8 +670,8 @@ public ApiResponse PutQueueConfigWithHttpInfo(string body, string queueT // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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); @@ -854,8 +749,8 @@ public ApiResponse RemoveEventHandlerStatusWithHttpInfo(string name) // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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); @@ -930,8 +836,8 @@ public ApiResponse UpdateEventHandlerWithHttpInfo(EventHandler body) // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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 b3bfbc5f..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 @@ -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); @@ -371,8 +161,8 @@ public ApiResponse AddUserToGroupWithHttpInfo(string groupId, string use // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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); @@ -453,8 +255,8 @@ public ApiResponse AddUsersToGroupWithHttpInfo(List body, string // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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); @@ -523,8 +337,8 @@ public ApiResponse DeleteGroupWithHttpInfo(string id) // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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); @@ -593,8 +419,8 @@ public ApiResponse GetGrantedPermissionsWithHttpInfo(string groupId) // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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); @@ -663,8 +501,8 @@ public ApiResponse GetGroupWithHttpInfo(string id) // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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); @@ -733,8 +583,8 @@ public ApiResponse GetUsersInGroupWithHttpInfo(string id) // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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); @@ -797,8 +658,8 @@ public ApiResponse> ListGroupsWithHttpInfo() // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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); @@ -873,8 +747,8 @@ public ApiResponse RemoveUserFromGroupWithHttpInfo(string groupId, strin // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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); @@ -955,8 +841,8 @@ public ApiResponse RemoveUsersFromGroupWithHttpInfo(List body, s // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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); @@ -1039,8 +938,8 @@ public ApiResponse UpsertGroupWithHttpInfo(UpsertGroupRequest body, stri // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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 3a605e4f..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 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 @@ -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); @@ -412,8 +165,8 @@ public ApiResponse CreateWithHttpInfo(WorkflowDef body, bool? overwrite // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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); @@ -488,8 +255,8 @@ public ApiResponse GetWithHttpInfo(string name, int? version = null // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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); @@ -567,8 +349,8 @@ public ApiResponse> GetAllWorkflowsWithHttpInfo(string access // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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); @@ -640,8 +435,8 @@ public ApiResponse GetTaskDefWithHttpInfo(string tasktype, bool? metada // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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); @@ -716,8 +526,8 @@ public ApiResponse> GetTaskDefsWithHttpInfo(string access = null, // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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); @@ -794,8 +616,8 @@ public ApiResponse RegisterTaskDefWithHttpInfo(List body) // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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); @@ -862,8 +695,8 @@ public ApiResponse UnregisterTaskDefWithHttpInfo(string tasktype) // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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); @@ -936,8 +781,8 @@ public ApiResponse UnregisterWorkflowDefWithHttpInfo(string name, int? v // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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); @@ -1017,8 +875,8 @@ public ApiResponse UpdateWithHttpInfo(List body, bool? over // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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); @@ -1095,8 +965,8 @@ public ApiResponse UpdateTaskDefWithHttpInfo(TaskDef body) // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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); @@ -1159,8 +1040,8 @@ public ApiResponse UploadWorkflowsAndTasksDefinitionsToS3WithHttpInfo() // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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 69255c12..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 @@ -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,19 +133,19 @@ 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; @@ -471,8 +153,8 @@ public ApiResponse DeleteScheduleWithHttpInfo(string name) // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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); @@ -553,8 +247,8 @@ public ApiResponse DeleteTagForScheduleWithHttpInfo(List body // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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,19 +306,19 @@ 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; @@ -620,8 +326,8 @@ public ApiResponse> GetAllSchedulesWithHttpInfo(string wo // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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,7 +412,7 @@ 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; @@ -699,8 +420,8 @@ public ApiResponse> GetAllSchedulesWithHttpInfo(string wo // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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,19 +482,19 @@ 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; @@ -769,8 +502,8 @@ public ApiResponse GetScheduleWithHttpInfo(string name) // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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,19 +564,19 @@ 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; @@ -839,8 +584,8 @@ public ApiResponse> GetTagsForScheduleWithHttpInfo(string name) // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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); @@ -903,8 +659,8 @@ public ApiResponse> PauseAllSchedulesWithHttpInfo() // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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,19 +721,19 @@ 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; @@ -973,8 +741,8 @@ public ApiResponse PauseScheduleWithHttpInfo(string name) // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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); @@ -1055,8 +835,8 @@ public ApiResponse PutTagForScheduleWithHttpInfo(List body, s // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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); @@ -1119,8 +910,8 @@ public ApiResponse> RequeueAllExecutionRecordsWithHtt // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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); @@ -1183,8 +985,8 @@ public ApiResponse> ResumeAllSchedulesWithHttpInfo() // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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,19 +1047,19 @@ 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; @@ -1253,8 +1067,8 @@ public ApiResponse ResumeScheduleWithHttpInfo(string name) // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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); @@ -1331,8 +1157,8 @@ public ApiResponse SaveScheduleWithHttpInfo(SaveScheduleRequest body) // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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,7 +1244,7 @@ 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; @@ -1410,8 +1252,8 @@ public ApiResponse SearchV22WithHttp // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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); @@ -1472,8 +1325,8 @@ public ApiResponse TestTimeoutWithHttpInfo() // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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 f9e350c0..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 @@ -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,19 +133,19 @@ 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; @@ -356,8 +153,8 @@ public ApiResponse DeleteSecretWithHttpInfo(string key) // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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); @@ -438,8 +247,8 @@ public ApiResponse DeleteTagForSecretWithHttpInfo(List body, // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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,19 +309,19 @@ 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; @@ -508,8 +329,8 @@ public ApiResponse GetSecretWithHttpInfo(string key) // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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,19 +391,19 @@ 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; @@ -578,8 +411,8 @@ public ApiResponse> GetTagsWithHttpInfo(string key) // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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); @@ -642,8 +485,8 @@ public ApiResponse ListAllSecretNamesWithHttpInfo() // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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); @@ -706,8 +560,8 @@ public ApiResponse> ListSecretsThatUserCanGrantAccessToWithHttpInfo // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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); @@ -770,8 +635,8 @@ public ApiResponse> ListSecretsWithTagsThatUserCanGrantAcce // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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); @@ -854,8 +732,8 @@ public ApiResponse PutSecretWithHttpInfo(string body, string key) // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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); @@ -936,8 +826,8 @@ public ApiResponse PutTagForSecretWithHttpInfo(List body, str // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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,19 +888,19 @@ 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; @@ -1006,8 +908,8 @@ public ApiResponse SecretExistsWithHttpInfo(string key) // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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 fb295f24..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 @@ -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); @@ -360,8 +169,8 @@ public ApiResponse AddTaskTagWithHttpInfo(TagObject body, string taskNam // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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); @@ -444,8 +266,8 @@ public ApiResponse AddWorkflowTagWithHttpInfo(TagObject body, string nam // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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); @@ -528,8 +363,8 @@ public ApiResponse DeleteTaskTagWithHttpInfo(TagString body, string task // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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); @@ -612,8 +460,8 @@ public ApiResponse DeleteWorkflowTagWithHttpInfo(TagObject body, string // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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); @@ -676,8 +535,8 @@ public ApiResponse> GetTagsWithHttpInfo() // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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,19 +597,19 @@ 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; @@ -746,8 +617,8 @@ public ApiResponse> GetTaskTagsWithHttpInfo(string taskName) // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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,19 +679,19 @@ 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; @@ -816,8 +699,8 @@ public ApiResponse> GetWorkflowTagsWithHttpInfo(string name) // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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); @@ -900,8 +796,8 @@ public ApiResponse SetTaskTagsWithHttpInfo(List body, string // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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); @@ -984,8 +893,8 @@ public ApiResponse SetWorkflowTagsWithHttpInfo(List body, str // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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 b3526a68..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 @@ -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); @@ -523,8 +147,8 @@ public Conductor.Client.ExceptionFactory ExceptionFactory // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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); @@ -587,8 +222,8 @@ public Conductor.Client.ExceptionFactory ExceptionFactory // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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,7 +312,7 @@ 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; @@ -669,8 +320,8 @@ public ApiResponse> BatchPollWithHttpInfo(string tasktype, string wor // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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,7 +422,7 @@ 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; @@ -762,8 +430,8 @@ public ApiResponse> GetAllPollDataWithHttpInfo(long? // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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,7 +518,7 @@ 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; @@ -844,8 +526,8 @@ public ApiResponse GetExternalStorageLocationWithHttpIn // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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,19 +588,19 @@ 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; @@ -914,8 +608,8 @@ public ApiResponse> GetPollDataWithHttpInfo(string taskType) // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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,19 +670,19 @@ 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; @@ -984,8 +690,8 @@ public ApiResponse GetTaskWithHttpInfo(string taskId) // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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,19 +752,19 @@ 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; @@ -1054,8 +772,8 @@ public ApiResponse> GetTaskLogsWithHttpInfo(string taskId) // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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); @@ -1136,8 +866,8 @@ public ApiResponse LogWithHttpInfo(string body, string taskId) // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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,7 +948,7 @@ 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; @@ -1212,8 +956,8 @@ public ApiResponse PollWithHttpInfo(string tasktype, string workerid = nul // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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,19 +1018,19 @@ 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; @@ -1282,8 +1038,8 @@ public ApiResponse RequeuePendingTaskWithHttpInfo(string taskType) // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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,7 +1125,7 @@ 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; @@ -1361,8 +1133,8 @@ public ApiResponse SearchWithHttpInfo(int? start = null // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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,7 +1220,7 @@ 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; @@ -1440,8 +1228,8 @@ public ApiResponse SearchV2WithHttpInfo(int? start = null, int // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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,19 +1287,19 @@ 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; @@ -1507,8 +1307,8 @@ public ApiResponse SearchV2WithHttpInfo(int? start = null, int // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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); @@ -1585,8 +1397,8 @@ public ApiResponse UpdateTaskWithHttpInfo(TaskResult body) // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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); @@ -1688,8 +1516,8 @@ public ApiResponse UpdateTaskWithHttpInfo(Dictionary bod // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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 ef5ce842..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 @@ -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); @@ -191,8 +156,8 @@ public ApiResponse GenerateTokenWithHttpInfo(GenerateTokenRequest body) // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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); @@ -253,8 +230,8 @@ public ApiResponse GetUserInfoWithHttpInfo(bool? claims = null) // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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 35a6a861..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 @@ -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,19 +133,19 @@ 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; @@ -276,8 +153,8 @@ public ApiResponse DeleteUserWithHttpInfo(string id) // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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,19 +215,19 @@ 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; @@ -346,8 +235,8 @@ public ApiResponse GetGrantedPermissionsWithHttpInfo(string userId) // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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,19 +297,19 @@ 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; @@ -416,8 +317,8 @@ public ApiResponse GetUserWithHttpInfo(string id) // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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,19 +376,19 @@ 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; @@ -483,8 +396,8 @@ public ApiResponse> ListUsersWithHttpInfo(bool? apps = null) // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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); @@ -564,8 +490,8 @@ public ApiResponse SendInviteEmailWithHttpInfo(string id, ConductorUser // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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); @@ -648,8 +587,8 @@ public ApiResponse UpsertUserWithHttpInfo(UpsertUserRequest body, string // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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 905ee1ff..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 @@ -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); @@ -265,8 +161,8 @@ public ApiResponse PauseWorkflowWithHttpInfo(List body) // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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); @@ -346,8 +255,8 @@ public ApiResponse RestartWithHttpInfo(List body, bool? us // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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); @@ -424,8 +345,8 @@ public ApiResponse ResumeWorkflowWithHttpInfo(List body) // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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); @@ -502,8 +435,8 @@ public ApiResponse RetryWithHttpInfo(List body) // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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); @@ -586,8 +533,8 @@ public ApiResponse TerminateWithHttpInfo(List body, string // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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 db342c02..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 @@ -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,18 +131,18 @@ 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; @@ -849,8 +150,8 @@ public ApiResponse DecideWithHttpInfo(string workflowId) // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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,19 +211,19 @@ 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; @@ -920,8 +231,8 @@ public ApiResponse DeleteWithHttpInfo(string workflowId, bool? archiveWo // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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); @@ -1019,8 +346,8 @@ public ApiResponse ExecuteWorkflowWithHttpInfo(StartWorkflowRequest // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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); @@ -1087,8 +435,8 @@ public ApiResponse UpdateWorkflowVariablesWithHttpInfo(Workflow workflow } RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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,7 +518,7 @@ 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; @@ -1162,8 +526,8 @@ public ApiResponse GetExecutionStatusWithHttpInfo(string workflowId, b // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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,7 +612,7 @@ 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; @@ -1241,8 +620,8 @@ public ApiResponse GetExecutionStatusTaskListWithHt // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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,7 +708,7 @@ 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; @@ -1323,8 +716,8 @@ public ApiResponse GetExternalStorageLocationWithHttpIn // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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,7 +802,7 @@ 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; @@ -1402,8 +810,8 @@ public ApiResponse> GetRunningWorkflowWithHttpInfo(string name, int // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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,7 +892,7 @@ 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; @@ -1478,8 +900,8 @@ public ApiResponse GetWorkflowStatusSummaryWithHttpInfo(string w // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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); @@ -1568,8 +1005,8 @@ public ApiResponse>> GetWorkflowsWithHttpInfo( // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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); @@ -1652,8 +1103,8 @@ public ApiResponse>> GetWorkflowsWithHttpInfo( // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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,7 +1192,7 @@ 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; @@ -1734,8 +1200,8 @@ public ApiResponse> GetWorkflowsWithHttpInfo(string name, string // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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,18 +1260,18 @@ 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; @@ -1802,8 +1279,8 @@ public ApiResponse PauseWorkflowWithHttpInfo(string workflowId) // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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); @@ -1889,8 +1379,8 @@ public ApiResponse JumpToTaskWithHttpInfo(Dictionary bod // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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); @@ -1974,8 +1477,8 @@ public ApiResponse RerunWithHttpInfo(RerunWorkflowRequest body, string w // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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,18 +1537,18 @@ 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; @@ -2042,8 +1556,8 @@ public ApiResponse ResetWorkflowWithHttpInfo(string workflowId) // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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,19 +1619,19 @@ 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; @@ -2113,8 +1639,8 @@ public ApiResponse RestartWithHttpInfo(string workflowId, bool? useLates // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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,18 +1699,18 @@ 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; @@ -2181,8 +1718,8 @@ public ApiResponse ResumeWorkflowWithHttpInfo(string workflowId) // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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,19 +1781,19 @@ 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; @@ -2252,8 +1801,8 @@ public ApiResponse RetryWithHttpInfo(string workflowId, bool? resumeSubw // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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,7 +1896,7 @@ 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; @@ -2337,8 +1904,8 @@ public ApiResponse SearchWithHttpInfo(str // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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,7 +1991,7 @@ 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; @@ -2416,8 +1999,8 @@ public ApiResponse SearchV2WithHttpInfo(int? start = null, // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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,7 +2086,7 @@ 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; @@ -2495,8 +2094,8 @@ public ApiResponse SearchWorkflowsByTasksWithHttpIn // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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,7 +2181,7 @@ 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; @@ -2574,8 +2189,8 @@ public ApiResponse SearchWorkflowsByTasksV2WithHttpInfo(in // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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,7 +2274,7 @@ 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; @@ -2654,8 +2282,8 @@ public ApiResponse SkipTaskFromWorkflowWithHttpInfo(string workflowId, s // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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); @@ -2732,8 +2372,8 @@ public ApiResponse StartWorkflowWithHttpInfo(StartWorkflowRequest body) // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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,7 +2560,7 @@ 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; @@ -2899,8 +2568,8 @@ public ApiResponse TerminateWithHttpInfo(string workflowId, string reaso // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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); @@ -2977,8 +2658,8 @@ public ApiResponse TestWorkflowWithHttpInfo(WorkflowTestRequest body) // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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); @@ -3041,8 +2732,8 @@ public ApiResponse UploadCompletedWorkflowsWithHttpInfo() // make the HTTP request RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + 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 From 3275a10f67527345d8762f051f044a19e15a0905 Mon Sep 17 00:00:00 2001 From: Jithesh Poojary Date: Fri, 2 Feb 2024 18:14:41 +0530 Subject: [PATCH 9/9] Added Variables --- Conductor/Client/Extensions/ApiExtensions.cs | 3 ++- csharp-examples/WorkFlowExamples.cs | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Conductor/Client/Extensions/ApiExtensions.cs b/Conductor/Client/Extensions/ApiExtensions.cs index c26efa6b..f5f82b6a 100644 --- a/Conductor/Client/Extensions/ApiExtensions.cs +++ b/Conductor/Client/Extensions/ApiExtensions.cs @@ -11,12 +11,13 @@ 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(30 * 1000) + Configuration = new Configuration(REST_CLIENT_REQUEST_TIME_OUT) { BasePath = GetEnvironmentVariable(ENV_ROOT_URI), AuthenticationSettings = new OrkesAuthenticationSettings( diff --git a/csharp-examples/WorkFlowExamples.cs b/csharp-examples/WorkFlowExamples.cs index cf6e4260..158ed16b 100644 --- a/csharp-examples/WorkFlowExamples.cs +++ b/csharp-examples/WorkFlowExamples.cs @@ -26,11 +26,12 @@ 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(98765) + Configuration configuration = new Configuration(REST_CLIENT_REQUEST_TIME_OUT) { AuthenticationSettings = new OrkesAuthenticationSettings(KEY_ID, KEY_SECRET) };