diff --git a/.github/workflows/harness-image.yml b/.github/workflows/harness-image.yml
index c4ebad22..2dc79eb7 100644
--- a/.github/workflows/harness-image.yml
+++ b/.github/workflows/harness-image.yml
@@ -24,6 +24,8 @@ concurrency:
jobs:
build-and-push:
runs-on: ubuntu-latest
+ outputs:
+ cleaned-branch-name: ${{ steps.vars.outputs.cleaned-branch-name }}
permissions:
contents: read
packages: write
@@ -87,4 +89,4 @@ jobs:
repository: conductor-oss/oss-ci-util
event-type: sdk_release
client-payload: |-
- {"tag": "${{ github.event.release.tag_name || 'latest' }}", "repo": "${{ github.repository }}"}
+ {"tag": "${{ github.event.release.tag_name || format('{0}-latest', needs.build-and-push.outputs.cleaned-branch-name) }}", "repo": "${{ github.repository }}"}
diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml
index 15b18b68..bb8fab20 100644
--- a/.github/workflows/pull_request.yml
+++ b/.github/workflows/pull_request.yml
@@ -11,6 +11,7 @@ on:
pull_request:
branches:
- main
+ - gated-metrics-standardization #todo - remove after rebasing to main
workflow_dispatch:
jobs:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4a1d90f9..a979467e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,7 +5,22 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
-## [Unreleased]
+## [Unreleased — async executor / thread-starvation fix]
+
+### Changed
+
+- `WorkflowTaskExecutor`: converted `async void` methods (`WorkOnce`, `ProcessTasks`, `ProcessTask`) to `async Task` so the poll loop properly awaits each batch before re-entering. Previously, `async void` caused untracked continuations — the `RunningWorkerDone()` monitor count drifted, and any exception after the first `await` was unobserved on the thread pool.
+- `WorkflowTaskExecutor`: replaced all `Thread.Sleep` calls (poll interval, error backoff, retry backoff) with `await Task.Delay`, releasing thread-pool threads during waits instead of blocking them.
+- `ApiClient`: added `CallApiAsync` overload that accepts `Configuration` for async token-refresh retry (mirrors the sync `CallApi` + `RetryRestClientCallApi` path but uses `RestClient.ExecuteAsync`).
+- `TaskResourceApi.BatchPollAsync` / `UpdateTaskAsync(TaskResult)`: now truly async — previously wrapped the synchronous `*WithHttpInfo` call in `Task.FromResult(...)`, providing zero async benefit.
+- `IWorkflowTaskClient`: added `PollTaskAsync` and `UpdateTaskAsync` to the interface; `WorkflowTaskHttpClient` implements them via the now-truly-async `TaskResourceApi` methods.
+
+### Fixed
+
+- `WorkflowTaskExecutor`: `task_update_time_seconds` metric now records per-attempt HTTP latency. Previously a single `Stopwatch` spanned the entire retry loop including `Thread.Sleep` backoff (2–8s per retry), inflating the metric 6–15× beyond actual network time.
+- `WorkflowTaskExecutor`: cancellation check in `ProcessTask`'s `finally` block was inverted (`== CancellationToken.None` instead of `!=`), so it never fired when a real token was provided.
+
+## [Unreleased — metrics]
> **Note for reviewers:** No version of this SDK has been published with metrics
> support. The `MetricsCollector` class and all metrics instrumentation exist only
diff --git a/Conductor/Api/ApplicationResourceApi.cs b/Conductor/Api/ApplicationResourceApi.cs
index 99dc127d..10ac3778 100644
--- a/Conductor/Api/ApplicationResourceApi.cs
+++ b/Conductor/Api/ApplicationResourceApi.cs
@@ -119,8 +119,41 @@ public Object AddRoleToApplicationUser(string applicationId, string role)
/// Object
public async ThreadTask.Task AddRoleToApplicationUserAsync(string applicationId, string role)
{
- ApiResponse localVarResponse = await ThreadTask.Task.FromResult(AddRoleToApplicationUserWithHttpInfo(applicationId, role));
- return localVarResponse.Data;
+ // verify the required parameter 'applicationId' is set
+ if (applicationId == null)
+ throw new ApiException(400, "Missing required parameter 'applicationId' when calling ApplicationResourceApi->AddRoleToApplicationUser");
+ // verify the required parameter 'role' is set
+ if (role == null)
+ throw new ApiException(400, "Missing required parameter 'role' when calling ApplicationResourceApi->AddRoleToApplicationUser");
+
+ var localVarPath = "/applications/{applicationId}/roles/{role}";
+ 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[] {
+ "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
+
+ return (await this.Configuration.ApiClient.ExecuteAsync(localVarPath,
+ Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
+ localVarFileParams, localVarPathParams, localVarHttpContentType, this.Configuration,
+ ExceptionFactory, "AddRoleToApplicationUser")).Data;
}
///
@@ -162,28 +195,11 @@ public ApiResponse AddRoleToApplicationUserWithHttpInfo(string applicati
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
- if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
- {
- localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken;
- }
-
- // make the HTTP request
- RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath,
- Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
- localVarPathParams, localVarHttpContentType, this.Configuration);
-
- int localVarStatusCode = (int)localVarResponse.StatusCode;
-
- if (ExceptionFactory != null)
- {
- Exception exception = ExceptionFactory("AddRoleToApplicationUser", 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)));
+ return this.Configuration.ApiClient.Execute(localVarPath,
+ Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
+ localVarFileParams, localVarPathParams, localVarHttpContentType, this.Configuration,
+ ExceptionFactory, "AddRoleToApplicationUser");
}
///
@@ -206,8 +222,37 @@ public Object CreateAccessKey(string id)
/// Object
public async ThreadTask.Task CreateAccessKeyAsync(string id)
{
- ApiResponse localVarResponse = await ThreadTask.Task.FromResult(CreateAccessKeyWithHttpInfo(id));
- return localVarResponse.Data;
+ // verify the required parameter 'id' is set
+ if (id == null)
+ throw new ApiException(400, "Missing required parameter 'id' when calling ApplicationResourceApi->CreateAccessKey");
+
+ var localVarPath = "/applications/{id}/accessKeys";
+ 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[] {
+ "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
+
+ return (await this.Configuration.ApiClient.ExecuteAsync(localVarPath,
+ Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
+ localVarFileParams, localVarPathParams, localVarHttpContentType, this.Configuration,
+ ExceptionFactory, "CreateAccessKey")).Data;
}
///
@@ -244,28 +289,11 @@ public ApiResponse CreateAccessKeyWithHttpInfo(string id)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (id != null) localVarPathParams.Add("id", this.Configuration.ApiClient.ParameterToString(id)); // path parameter
- // authentication (api_key) required
- if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
- {
- localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken;
- }
-
- // make the HTTP request
- RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath,
- Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
- localVarPathParams, localVarHttpContentType, this.Configuration);
-
- int localVarStatusCode = (int)localVarResponse.StatusCode;
-
- if (ExceptionFactory != null)
- {
- Exception exception = ExceptionFactory("CreateAccessKey", 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)));
+ return this.Configuration.ApiClient.Execute(localVarPath,
+ Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
+ localVarFileParams, localVarPathParams, localVarHttpContentType, this.Configuration,
+ ExceptionFactory, "CreateAccessKey");
}
///
@@ -288,8 +316,45 @@ public Object CreateApplication(CreateOrUpdateApplicationRequest body)
/// Object
public async ThreadTask.Task CreateApplicationAsync(CreateOrUpdateApplicationRequest body)
{
- ApiResponse localVarResponse = await ThreadTask.Task.FromResult(CreateApplicationWithHttpInfo(body));
- return localVarResponse.Data;
+ // verify the required parameter 'body' is set
+ if (body == null)
+ throw new ApiException(400, "Missing required parameter 'body' when calling ApplicationResourceApi->CreateApplication");
+
+ var localVarPath = "/applications";
+ 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
+ }
+
+ return (await this.Configuration.ApiClient.ExecuteAsync(localVarPath,
+ Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
+ localVarFileParams, localVarPathParams, localVarHttpContentType, this.Configuration,
+ ExceptionFactory, "CreateApplication")).Data;
}
///
@@ -334,28 +399,11 @@ public ApiResponse CreateApplicationWithHttpInfo(CreateOrUpdateApplicati
{
localVarPostBody = body; // byte array
}
- // authentication (api_key) required
- if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
- {
- localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken;
- }
-
- // make the HTTP request
- RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath,
- Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
- localVarPathParams, localVarHttpContentType, this.Configuration);
-
- int localVarStatusCode = (int)localVarResponse.StatusCode;
- if (ExceptionFactory != null)
- {
- Exception exception = ExceptionFactory("CreateApplication", 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)));
+ return this.Configuration.ApiClient.Execute(localVarPath,
+ Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
+ localVarFileParams, localVarPathParams, localVarHttpContentType, this.Configuration,
+ ExceptionFactory, "CreateApplication");
}
///
@@ -380,8 +428,41 @@ public Object DeleteAccessKey(string applicationId, string keyId)
/// Object
public async ThreadTask.Task DeleteAccessKeyAsync(string applicationId, string keyId)
{
- ApiResponse localVarResponse = await ThreadTask.Task.FromResult(DeleteAccessKeyWithHttpInfo(applicationId, keyId));
- return localVarResponse.Data;
+ // verify the required parameter 'applicationId' is set
+ if (applicationId == null)
+ throw new ApiException(400, "Missing required parameter 'applicationId' when calling ApplicationResourceApi->DeleteAccessKey");
+ // verify the required parameter 'keyId' is set
+ if (keyId == null)
+ throw new ApiException(400, "Missing required parameter 'keyId' when calling ApplicationResourceApi->DeleteAccessKey");
+
+ var localVarPath = "/applications/{applicationId}/accessKeys/{keyId}";
+ 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[] {
+ "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
+
+ return (await this.Configuration.ApiClient.ExecuteAsync(localVarPath,
+ Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
+ localVarFileParams, localVarPathParams, localVarHttpContentType, this.Configuration,
+ ExceptionFactory, "DeleteAccessKey")).Data;
}
///
@@ -423,28 +504,11 @@ public ApiResponse DeleteAccessKeyWithHttpInfo(string applicationId, str
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
- if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
- {
- localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken;
- }
-
- // make the HTTP request
- RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath,
- Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
- localVarPathParams, localVarHttpContentType, this.Configuration);
-
- int localVarStatusCode = (int)localVarResponse.StatusCode;
- if (ExceptionFactory != null)
- {
- Exception exception = ExceptionFactory("DeleteAccessKey", 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)));
+ return this.Configuration.ApiClient.Execute(localVarPath,
+ Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
+ localVarFileParams, localVarPathParams, localVarHttpContentType, this.Configuration,
+ ExceptionFactory, "DeleteAccessKey");
}
///
@@ -467,8 +531,37 @@ public Object DeleteApplication(string id)
/// Object
public async ThreadTask.Task DeleteApplicationAsync(string id)
{
- ApiResponse localVarResponse = await ThreadTask.Task.FromResult(DeleteApplicationWithHttpInfo(id));
- return localVarResponse.Data;
+ // verify the required parameter 'id' is set
+ if (id == null)
+ throw new ApiException(400, "Missing required parameter 'id' when calling ApplicationResourceApi->DeleteApplication");
+
+ var localVarPath = "/applications/{id}";
+ 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[] {
+ "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
+
+ return (await this.Configuration.ApiClient.ExecuteAsync(localVarPath,
+ Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
+ localVarFileParams, localVarPathParams, localVarHttpContentType, this.Configuration,
+ ExceptionFactory, "DeleteApplication")).Data;
}
///
@@ -505,28 +598,11 @@ public ApiResponse DeleteApplicationWithHttpInfo(string id)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (id != null) localVarPathParams.Add("id", this.Configuration.ApiClient.ParameterToString(id)); // path parameter
- // authentication (api_key) required
- if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
- {
- localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken;
- }
-
- // make the HTTP request
- RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath,
- Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
- localVarPathParams, localVarHttpContentType, this.Configuration);
-
- int localVarStatusCode = (int)localVarResponse.StatusCode;
-
- if (ExceptionFactory != null)
- {
- Exception exception = ExceptionFactory("DeleteApplication", 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)));
+ return this.Configuration.ApiClient.Execute(localVarPath,
+ Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
+ localVarFileParams, localVarPathParams, localVarHttpContentType, this.Configuration,
+ ExceptionFactory, "DeleteApplication");
}
///
@@ -549,9 +625,50 @@ public void DeleteTagForApplication(List body, string id)
///
///
///
- public async void DeleteTagForApplicationAsync(List body, string id)
+ public async ThreadTask.Task DeleteTagForApplicationAsync(List body, string id)
{
- await ThreadTask.Task.FromResult(DeleteTagForApplicationWithHttpInfo(body, id));
+ // verify the required parameter 'body' is set
+ if (body == null)
+ throw new ApiException(400, "Missing required parameter 'body' when calling ApplicationResourceApi->DeleteTagForApplication");
+ // verify the required parameter 'id' is set
+ if (id == null)
+ throw new ApiException(400, "Missing required parameter 'id' when calling ApplicationResourceApi->DeleteTagForApplication");
+
+ var localVarPath = "/applications/{id}/tags";
+ 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 (id != null) localVarPathParams.Add("id", this.Configuration.ApiClient.ParameterToString(id)); // path parameter
+ if (body != null && body.GetType() != typeof(byte[]))
+ {
+ localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter
+ }
+ else
+ {
+ localVarPostBody = body; // byte array
+ }
+
+ await this.Configuration.ApiClient.ExecuteAsync(localVarPath,
+ Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
+ localVarFileParams, localVarPathParams, localVarHttpContentType, this.Configuration,
+ ExceptionFactory, "DeleteTagForApplication");
}
///
@@ -600,28 +717,11 @@ public ApiResponse DeleteTagForApplicationWithHttpInfo(List b
{
localVarPostBody = body; // byte array
}
- // authentication (api_key) required
- if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
- {
- localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken;
- }
- // make the HTTP request
- RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath,
- Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
- localVarPathParams, localVarHttpContentType, this.Configuration);
-
- int localVarStatusCode = (int)localVarResponse.StatusCode;
-
- if (ExceptionFactory != null)
- {
- Exception exception = ExceptionFactory("DeleteTagForApplication", localVarResponse);
- if (exception != null) throw exception;
- }
-
- return new ApiResponse(localVarStatusCode,
- localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
- null);
+ return this.Configuration.ApiClient.Execute(localVarPath,
+ Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
+ localVarFileParams, localVarPathParams, localVarHttpContentType, this.Configuration,
+ ExceptionFactory, "DeleteTagForApplication");
}
///
@@ -644,8 +744,37 @@ public Object GetAccessKeys(string id)
/// Object
public async ThreadTask.Task GetAccessKeysAsync(string id)
{
- ApiResponse localVarResponse = await ThreadTask.Task.FromResult(GetAccessKeysWithHttpInfo(id));
- return localVarResponse.Data;
+ // verify the required parameter 'id' is set
+ if (id == null)
+ throw new ApiException(400, "Missing required parameter 'id' when calling ApplicationResourceApi->GetAccessKeys");
+
+ var localVarPath = "/applications/{id}/accessKeys";
+ 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[] {
+ "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
+
+ return (await this.Configuration.ApiClient.ExecuteAsync(localVarPath,
+ Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
+ localVarFileParams, localVarPathParams, localVarHttpContentType, this.Configuration,
+ ExceptionFactory, "GetAccessKeys")).Data;
}
///
@@ -682,28 +811,11 @@ public ApiResponse GetAccessKeysWithHttpInfo(string id)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (id != null) localVarPathParams.Add("id", this.Configuration.ApiClient.ParameterToString(id)); // path parameter
- // authentication (api_key) required
- if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
- {
- localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken;
- }
-
- // make the HTTP request
- RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath,
- Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
- localVarPathParams, localVarHttpContentType, this.Configuration);
-
- int localVarStatusCode = (int)localVarResponse.StatusCode;
- if (ExceptionFactory != null)
- {
- Exception exception = ExceptionFactory("GetAccessKeys", 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)));
+ return this.Configuration.ApiClient.Execute(localVarPath,
+ Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
+ localVarFileParams, localVarPathParams, localVarHttpContentType, this.Configuration,
+ ExceptionFactory, "GetAccessKeys");
}
///
@@ -726,8 +838,37 @@ public Object GetAppByAccessKeyId(string accessKeyId)
/// Object
public async ThreadTask.Task GetAppByAccessKeyIdAsync(string accessKeyId)
{
- ApiResponse localVarResponse = await ThreadTask.Task.FromResult(GetAppByAccessKeyIdWithHttpInfo(accessKeyId));
- return localVarResponse.Data;
+ // verify the required parameter 'accessKeyId' is set
+ if (accessKeyId == null)
+ throw new ApiException(400, "Missing required parameter 'accessKeyId' when calling ApplicationResourceApi->GetAppByAccessKeyId");
+
+ var localVarPath = "/applications/key/{accessKeyId}";
+ 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[] {
+ "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
+
+ return (await this.Configuration.ApiClient.ExecuteAsync(localVarPath,
+ Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
+ localVarFileParams, localVarPathParams, localVarHttpContentType, this.Configuration,
+ ExceptionFactory, "GetAppByAccessKeyId")).Data;
}
///
@@ -764,28 +905,11 @@ public ApiResponse GetAppByAccessKeyIdWithHttpInfo(string accessKeyId)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (accessKeyId != null) localVarPathParams.Add("accessKeyId", this.Configuration.ApiClient.ParameterToString(accessKeyId)); // path parameter
- // authentication (api_key) required
- if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
- {
- localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken;
- }
-
- // make the HTTP request
- RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath,
- Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
- localVarPathParams, localVarHttpContentType, this.Configuration);
-
- int localVarStatusCode = (int)localVarResponse.StatusCode;
- if (ExceptionFactory != null)
- {
- Exception exception = ExceptionFactory("GetAppByAccessKeyId", 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)));
+ return this.Configuration.ApiClient.Execute(localVarPath,
+ Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
+ localVarFileParams, localVarPathParams, localVarHttpContentType, this.Configuration,
+ ExceptionFactory, "GetAppByAccessKeyId");
}
///
@@ -800,16 +924,45 @@ public Object GetApplication(string 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;
+ ///
+ /// Asynchronous Get an application by id
+ ///
+ /// Thrown when fails to make API call
+ ///
+ /// Object
+ public async ThreadTask.Task GetApplicationAsync(string id)
+ {
+ // verify the required parameter 'id' is set
+ if (id == null)
+ throw new ApiException(400, "Missing required parameter 'id' when calling ApplicationResourceApi->GetApplication");
+
+ var localVarPath = "/applications/{id}";
+ 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[] {
+ "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
+
+ return (await this.Configuration.ApiClient.ExecuteAsync(localVarPath,
+ Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
+ localVarFileParams, localVarPathParams, localVarHttpContentType, this.Configuration,
+ ExceptionFactory, "GetApplication")).Data;
}
///
@@ -846,28 +999,11 @@ public ApiResponse GetApplicationWithHttpInfo(string id)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (id != null) localVarPathParams.Add("id", this.Configuration.ApiClient.ParameterToString(id)); // path parameter
- // authentication (api_key) required
- if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
- {
- localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken;
- }
- // make the HTTP request
- RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath,
- Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
- localVarPathParams, localVarHttpContentType, this.Configuration);
-
- int localVarStatusCode = (int)localVarResponse.StatusCode;
-
- if (ExceptionFactory != null)
- {
- Exception exception = ExceptionFactory("GetApplication", 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)));
+ return this.Configuration.ApiClient.Execute(localVarPath,
+ Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
+ localVarFileParams, localVarPathParams, localVarHttpContentType, this.Configuration,
+ ExceptionFactory, "GetApplication");
}
///
@@ -890,8 +1026,37 @@ public List GetTagsForApplication(string id)
/// List<TagObject>
public async ThreadTask.Task> GetTagsForApplicationAsync(string id)
{
- ApiResponse> localVarResponse = await ThreadTask.Task.FromResult(GetTagsForApplicationWithHttpInfo(id));
- return localVarResponse.Data;
+ // verify the required parameter 'id' is set
+ if (id == null)
+ throw new ApiException(400, "Missing required parameter 'id' when calling ApplicationResourceApi->GetTagsForApplication");
+
+ var localVarPath = "/applications/{id}/tags";
+ 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[] {
+ "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
+
+ return (await this.Configuration.ApiClient.ExecuteAsync>(localVarPath,
+ Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
+ localVarFileParams, localVarPathParams, localVarHttpContentType, this.Configuration,
+ ExceptionFactory, "GetTagsForApplication")).Data;
}
///
@@ -928,28 +1093,11 @@ public ApiResponse> GetTagsForApplicationWithHttpInfo(string id)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (id != null) localVarPathParams.Add("id", this.Configuration.ApiClient.ParameterToString(id)); // path parameter
- // authentication (api_key) required
- if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
- {
- localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken;
- }
-
- // make the HTTP request
- RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath,
- Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
- localVarPathParams, localVarHttpContentType, this.Configuration);
-
- int localVarStatusCode = (int)localVarResponse.StatusCode;
-
- if (ExceptionFactory != null)
- {
- Exception exception = ExceptionFactory("GetTagsForApplication", 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)));
+ return this.Configuration.ApiClient.Execute>(localVarPath,
+ Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
+ localVarFileParams, localVarPathParams, localVarHttpContentType, this.Configuration,
+ ExceptionFactory, "GetTagsForApplication");
}
///
@@ -970,8 +1118,31 @@ public List ListApplications()
/// List<ExtendedConductorApplication>
public async ThreadTask.Task> ListApplicationsAsync()
{
- ApiResponse> localVarResponse = await ThreadTask.Task.FromResult(ListApplicationsWithHttpInfo());
- return localVarResponse.Data;
+ var localVarPath = "/applications";
+ 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[] {
+ "application/json"
+ };
+ String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
+ if (localVarHttpHeaderAccept != null)
+ localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
+
+ return (await this.Configuration.ApiClient.ExecuteAsync>(localVarPath,
+ Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
+ localVarFileParams, localVarPathParams, localVarHttpContentType, this.Configuration,
+ ExceptionFactory, "ListApplications")).Data;
}
///
@@ -1003,28 +1174,10 @@ public ApiResponse> ListApplicationsWithHttpI
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
- RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath,
- Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
- localVarPathParams, localVarHttpContentType, this.Configuration);
-
- int localVarStatusCode = (int)localVarResponse.StatusCode;
-
- if (ExceptionFactory != null)
- {
- Exception exception = ExceptionFactory("ListApplications", 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)));
+ return this.Configuration.ApiClient.Execute>(localVarPath,
+ Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
+ localVarFileParams, localVarPathParams, localVarHttpContentType, this.Configuration,
+ ExceptionFactory, "ListApplications");
}
///
@@ -1046,9 +1199,50 @@ public void PutTagForApplication(List body, string id)
///
///
///
- public async void PutTagForApplicationAsync(List body, string id)
+ public async ThreadTask.Task PutTagForApplicationAsync(List body, string id)
{
- await ThreadTask.Task.FromResult(PutTagForApplicationWithHttpInfo(body, id));
+ // verify the required parameter 'body' is set
+ if (body == null)
+ throw new ApiException(400, "Missing required parameter 'body' when calling ApplicationResourceApi->PutTagForApplication");
+ // verify the required parameter 'id' is set
+ if (id == null)
+ throw new ApiException(400, "Missing required parameter 'id' when calling ApplicationResourceApi->PutTagForApplication");
+
+ var localVarPath = "/applications/{id}/tags";
+ 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 (id != null) localVarPathParams.Add("id", this.Configuration.ApiClient.ParameterToString(id)); // path parameter
+ if (body != null && body.GetType() != typeof(byte[]))
+ {
+ localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter
+ }
+ else
+ {
+ localVarPostBody = body; // byte array
+ }
+
+ await this.Configuration.ApiClient.ExecuteAsync(localVarPath,
+ Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
+ localVarFileParams, localVarPathParams, localVarHttpContentType, this.Configuration,
+ ExceptionFactory, "PutTagForApplication");
}
///
@@ -1097,28 +1291,11 @@ public ApiResponse PutTagForApplicationWithHttpInfo(List body
{
localVarPostBody = body; // byte array
}
- // authentication (api_key) required
- if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
- {
- localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken;
- }
-
- // make the HTTP request
- RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath,
- Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
- localVarPathParams, localVarHttpContentType, this.Configuration);
-
- int localVarStatusCode = (int)localVarResponse.StatusCode;
-
- if (ExceptionFactory != null)
- {
- Exception exception = ExceptionFactory("PutTagForApplication", localVarResponse);
- if (exception != null) throw exception;
- }
- return new ApiResponse(localVarStatusCode,
- localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
- null);
+ return this.Configuration.ApiClient.Execute(localVarPath,
+ Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
+ localVarFileParams, localVarPathParams, localVarHttpContentType, this.Configuration,
+ ExceptionFactory, "PutTagForApplication");
}
///
@@ -1142,8 +1319,41 @@ public Object RemoveRoleFromApplicationUser(string applicationId, string role)
///
public async ThreadTask.Task RemoveRoleFromApplicationUserAsync(string applicationId, string role)
{
- ApiResponse localVarResponse = await ThreadTask.Task.FromResult(RemoveRoleFromApplicationUserWithHttpInfo(applicationId, role));
- return localVarResponse.Data;
+ // verify the required parameter 'applicationId' is set
+ if (applicationId == null)
+ throw new ApiException(400, "Missing required parameter 'applicationId' when calling ApplicationResourceApi->RemoveRoleFromApplicationUser");
+ // verify the required parameter 'role' is set
+ if (role == null)
+ throw new ApiException(400, "Missing required parameter 'role' when calling ApplicationResourceApi->RemoveRoleFromApplicationUser");
+
+ var localVarPath = "/applications/{applicationId}/roles/{role}";
+ 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[] {
+ "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
+
+ return (await this.Configuration.ApiClient.ExecuteAsync(localVarPath,
+ Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
+ localVarFileParams, localVarPathParams, localVarHttpContentType, this.Configuration,
+ ExceptionFactory, "RemoveRoleFromApplicationUser")).Data;
}
///
@@ -1185,28 +1395,11 @@ public ApiResponse RemoveRoleFromApplicationUserWithHttpInfo(string appl
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
- if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
- {
- localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken;
- }
-
- // make the HTTP request
- RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath,
- Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
- localVarPathParams, localVarHttpContentType, this.Configuration);
-
- int localVarStatusCode = (int)localVarResponse.StatusCode;
-
- if (ExceptionFactory != null)
- {
- Exception exception = ExceptionFactory("RemoveRoleFromApplicationUser", 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)));
+ return this.Configuration.ApiClient.Execute(localVarPath,
+ Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
+ localVarFileParams, localVarPathParams, localVarHttpContentType, this.Configuration,
+ ExceptionFactory, "RemoveRoleFromApplicationUser");
}
///
@@ -1231,8 +1424,41 @@ public Object ToggleAccessKeyStatus(string applicationId, string keyId)
/// Object
public async ThreadTask.Task ToggleAccessKeyStatusAsync(string applicationId, string keyId)
{
- ApiResponse localVarResponse = await ThreadTask.Task.FromResult(ToggleAccessKeyStatusWithHttpInfo(applicationId, keyId));
- return localVarResponse.Data;
+ // verify the required parameter 'applicationId' is set
+ if (applicationId == null)
+ throw new ApiException(400, "Missing required parameter 'applicationId' when calling ApplicationResourceApi->ToggleAccessKeyStatus");
+ // verify the required parameter 'keyId' is set
+ if (keyId == null)
+ throw new ApiException(400, "Missing required parameter 'keyId' when calling ApplicationResourceApi->ToggleAccessKeyStatus");
+
+ var localVarPath = "/applications/{applicationId}/accessKeys/{keyId}/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[] {
+ "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
+
+ return (await this.Configuration.ApiClient.ExecuteAsync(localVarPath,
+ Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
+ localVarFileParams, localVarPathParams, localVarHttpContentType, this.Configuration,
+ ExceptionFactory, "ToggleAccessKeyStatus")).Data;
}
///
@@ -1274,28 +1500,11 @@ public ApiResponse ToggleAccessKeyStatusWithHttpInfo(string applicationI
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
- if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
- {
- localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken;
- }
-
- // make the HTTP request
- RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath,
- Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
- localVarPathParams, localVarHttpContentType, this.Configuration);
-
- int localVarStatusCode = (int)localVarResponse.StatusCode;
-
- if (ExceptionFactory != null)
- {
- Exception exception = ExceptionFactory("ToggleAccessKeyStatus", 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)));
+ return this.Configuration.ApiClient.Execute(localVarPath,
+ Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
+ localVarFileParams, localVarPathParams, localVarHttpContentType, this.Configuration,
+ ExceptionFactory, "ToggleAccessKeyStatus");
}
///
@@ -1320,8 +1529,49 @@ public Object UpdateApplication(CreateOrUpdateApplicationRequest body, string id
/// Object
public async ThreadTask.Task UpdateApplicationAsync(CreateOrUpdateApplicationRequest body, string id)
{
- ApiResponse localVarResponse = await ThreadTask.Task.FromResult(UpdateApplicationWithHttpInfo(body, id));
- return localVarResponse.Data;
+ // verify the required parameter 'body' is set
+ if (body == null)
+ throw new ApiException(400, "Missing required parameter 'body' when calling ApplicationResourceApi->UpdateApplication");
+ // verify the required parameter 'id' is set
+ if (id == null)
+ throw new ApiException(400, "Missing required parameter 'id' when calling ApplicationResourceApi->UpdateApplication");
+
+ var localVarPath = "/applications/{id}";
+ 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 (id != null) localVarPathParams.Add("id", this.Configuration.ApiClient.ParameterToString(id)); // path parameter
+ if (body != null && body.GetType() != typeof(byte[]))
+ {
+ localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter
+ }
+ else
+ {
+ localVarPostBody = body; // byte array
+ }
+
+ return (await this.Configuration.ApiClient.ExecuteAsync(localVarPath,
+ Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
+ localVarFileParams, localVarPathParams, localVarHttpContentType, this.Configuration,
+ ExceptionFactory, "UpdateApplication")).Data;
}
///
@@ -1371,28 +1621,11 @@ public ApiResponse UpdateApplicationWithHttpInfo(CreateOrUpdateApplicati
{
localVarPostBody = body; // byte array
}
- // authentication (api_key) required
- if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
- {
- localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken;
- }
-
- // make the HTTP request
- RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath,
- Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
- localVarPathParams, localVarHttpContentType, this.Configuration);
-
- int localVarStatusCode = (int)localVarResponse.StatusCode;
-
- if (ExceptionFactory != null)
- {
- Exception exception = ExceptionFactory("UpdateApplication", 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)));
+ return this.Configuration.ApiClient.Execute(localVarPath,
+ Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
+ localVarFileParams, localVarPathParams, localVarHttpContentType, this.Configuration,
+ ExceptionFactory, "UpdateApplication");
}
}
}
diff --git a/Conductor/Api/AuthorizationResourceApi.cs b/Conductor/Api/AuthorizationResourceApi.cs
index 48f199be..e8e637b1 100644
--- a/Conductor/Api/AuthorizationResourceApi.cs
+++ b/Conductor/Api/AuthorizationResourceApi.cs
@@ -122,8 +122,41 @@ public Object GetPermissions(string type, string id)
/// Object
public async ThreadTask.Task GetPermissionsAsync(string type, string id)
{
- ApiResponse localVarResponse = await ThreadTask.Task.FromResult(GetPermissionsWithHttpInfo(type, id));
- return localVarResponse.Data;
+ // verify the required parameter 'type' is set
+ if (type == null)
+ throw new ApiException(400, "Missing required parameter 'type' when calling AuthorizationResourceApi->GetPermissions");
+ // verify the required parameter 'id' is set
+ if (id == null)
+ throw new ApiException(400, "Missing required parameter 'id' when calling AuthorizationResourceApi->GetPermissions");
+
+ var localVarPath = "/auth/authorization/{type}/{id}";
+ 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[] {
+ "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
+
+ return (await this.Configuration.ApiClient.ExecuteAsync(localVarPath,
+ Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
+ localVarFileParams, localVarPathParams, localVarHttpContentType, this.Configuration,
+ ExceptionFactory, "GetPermissions")).Data;
}
///
@@ -165,28 +198,11 @@ public ApiResponse GetPermissionsWithHttpInfo(string type, string id)
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
- if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
- {
- localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken;
- }
-
- // make the HTTP request
- RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath,
- Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
- localVarPathParams, localVarHttpContentType, this.Configuration);
-
- int localVarStatusCode = (int)localVarResponse.StatusCode;
- if (ExceptionFactory != null)
- {
- Exception exception = ExceptionFactory("GetPermissions", 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)));
+ return this.Configuration.ApiClient.Execute(localVarPath,
+ Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
+ localVarFileParams, localVarPathParams, localVarHttpContentType, this.Configuration,
+ ExceptionFactory, "GetPermissions");
}
///
@@ -209,8 +225,45 @@ public Response GrantPermissions(AuthorizationRequest body)
/// Response
public async ThreadTask.Task GrantPermissionsAsync(AuthorizationRequest body)
{
- ApiResponse localVarResponse = await ThreadTask.Task.FromResult(GrantPermissionsWithHttpInfo(body));
- return localVarResponse.Data;
+ // verify the required parameter 'body' is set
+ if (body == null)
+ throw new ApiException(400, "Missing required parameter 'body' when calling AuthorizationResourceApi->GrantPermissions");
+
+ var localVarPath = "/auth/authorization";
+ 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
+ }
+
+ return (await this.Configuration.ApiClient.ExecuteAsync(localVarPath,
+ Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
+ localVarFileParams, localVarPathParams, localVarHttpContentType, this.Configuration,
+ ExceptionFactory, "GrantPermissions")).Data;
}
///
/// Grant access to a user over the target
@@ -254,28 +307,10 @@ public ApiResponse GrantPermissionsWithHttpInfo(AuthorizationRequest b
{
localVarPostBody = body; // byte array
}
- // authentication (api_key) required
- if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
- {
- localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken;
- }
-
- // make the HTTP request
- RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath,
- Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
- localVarPathParams, localVarHttpContentType, this.Configuration);
-
- int localVarStatusCode = (int)localVarResponse.StatusCode;
-
- if (ExceptionFactory != null)
- {
- Exception exception = ExceptionFactory("GrantPermissions", localVarResponse);
- if (exception != null) throw exception;
- }
-
- return new ApiResponse(localVarStatusCode,
- localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
- (Response)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Response)));
+ return this.Configuration.ApiClient.Execute(localVarPath,
+ Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
+ localVarFileParams, localVarPathParams, localVarHttpContentType, this.Configuration,
+ ExceptionFactory, "GrantPermissions");
}
///
@@ -298,8 +333,45 @@ public Response RemovePermissions(AuthorizationRequest body)
/// Response
public async ThreadTask.Task RemovePermissionsAsync(AuthorizationRequest body)
{
- ApiResponse localVarResponse = await ThreadTask.Task.FromResult(RemovePermissionsWithHttpInfo(body));
- return localVarResponse.Data;
+ // verify the required parameter 'body' is set
+ if (body == null)
+ throw new ApiException(400, "Missing required parameter 'body' when calling AuthorizationResourceApi->RemovePermissions");
+
+ var localVarPath = "/auth/authorization";
+ 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
+ }
+
+ return (await this.Configuration.ApiClient.ExecuteAsync(localVarPath,
+ Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
+ localVarFileParams, localVarPathParams, localVarHttpContentType, this.Configuration,
+ ExceptionFactory, "RemovePermissions")).Data;
}
///
@@ -344,28 +416,10 @@ public ApiResponse RemovePermissionsWithHttpInfo(AuthorizationRequest
{
localVarPostBody = body; // byte array
}
- // authentication (api_key) required
- if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
- {
- localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken;
- }
-
- // make the HTTP request
- RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath,
- Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
- localVarPathParams, localVarHttpContentType, this.Configuration);
-
- int localVarStatusCode = (int)localVarResponse.StatusCode;
-
- if (ExceptionFactory != null)
- {
- Exception exception = ExceptionFactory("RemovePermissions", localVarResponse);
- if (exception != null) throw exception;
- }
-
- return new ApiResponse(localVarStatusCode,
- localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
- (Response)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Response)));
+ return this.Configuration.ApiClient.Execute(localVarPath,
+ Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
+ localVarFileParams, localVarPathParams, localVarHttpContentType, this.Configuration,
+ ExceptionFactory, "RemovePermissions");
}
}
}
diff --git a/Conductor/Api/EventResourceApi.cs b/Conductor/Api/EventResourceApi.cs
index 6447036f..b14f6b6c 100644
--- a/Conductor/Api/EventResourceApi.cs
+++ b/Conductor/Api/EventResourceApi.cs
@@ -116,9 +116,46 @@ public void AddEventHandler(EventHandler body)
/// Thrown when fails to make API call
///
///
- public async void AddEventHandlerAsync(EventHandler body)
+ public async ThreadTask.Task AddEventHandlerAsync(EventHandler body)
{
- await ThreadTask.Task.FromResult(AddEventHandlerWithHttpInfo(body));
+ // verify the required parameter 'body' is set
+ if (body == null)
+ throw new ApiException(400, "Missing required parameter 'body' when calling EventResourceApi->AddEventHandler");
+
+ var localVarPath = "/event";
+ 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 (body != null && body.GetType() != typeof(byte[]))
+ {
+ localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter
+ }
+ else
+ {
+ localVarPostBody = body; // byte array
+ }
+
+ await this.Configuration.ApiClient.ExecuteAsync(localVarPath,
+ Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
+ localVarFileParams, localVarPathParams, localVarHttpContentType, this.Configuration,
+ ExceptionFactory, "AddEventHandler");
}
///
@@ -162,28 +199,11 @@ public ApiResponse AddEventHandlerWithHttpInfo(EventHandler body)
{
localVarPostBody = body; // byte array
}
- // authentication (api_key) required
- if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
- {
- localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken;
- }
-
- // make the HTTP request
- RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath,
- Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
- localVarPathParams, localVarHttpContentType, this.Configuration);
-
- int localVarStatusCode = (int)localVarResponse.StatusCode;
-
- if (ExceptionFactory != null)
- {
- Exception exception = ExceptionFactory("AddEventHandler", localVarResponse);
- if (exception != null) throw exception;
- }
- return new ApiResponse(localVarStatusCode,
- localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
- null);
+ return this.Configuration.ApiClient.Execute(localVarPath,
+ Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
+ localVarFileParams, localVarPathParams, localVarHttpContentType, this.Configuration,
+ ExceptionFactory, "AddEventHandler");
}
///
@@ -205,9 +225,42 @@ public void DeleteQueueConfig(string queueType, string queueName)
///