[csharp-netcore] added cancellation tokens to async calls (#7077)

* added cancellation tokens to async calls

* changed variable name for consistency

* update samples

Co-authored-by: William Cheng <wing328hk@gmail.com>
This commit is contained in:
devhl-labs 2020-08-02 05:53:53 -04:00 committed by GitHub
parent 43471bacbc
commit 761364eec9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
19 changed files with 1619 additions and 973 deletions

View File

@ -448,7 +448,7 @@ namespace {{packageName}}.Client
}
{{#supportsAsync}}
private async Task<ApiResponse<T>> ExecAsync<T>(RestRequest req, IReadableConfiguration configuration)
private async Task<ApiResponse<T>> ExecAsync<T>(RestRequest req, IReadableConfiguration configuration, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
RestClient client = new RestClient(_baseUrl);
@ -479,7 +479,7 @@ namespace {{packageName}}.Client
InterceptRequest(req);
var response = await client.ExecuteAsync<T>(req);
var response = await client.ExecuteAsync<T>(req, cancellationToken);
InterceptResponse(req, response);
@ -526,11 +526,12 @@ namespace {{packageName}}.Client
/// <param name="options">The additional request options.</param>
/// <param name="configuration">A per-request configuration object. It is assumed that any merge with
/// GlobalConfiguration has been done before calling this method.</param>
/// <param name="cancellationToken">Token that enables callers to cancel the request.</param>
/// <returns>A Task containing ApiResponse</returns>
public Task<ApiResponse<T>> GetAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null)
public Task<ApiResponse<T>> GetAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
var config = configuration ?? GlobalConfiguration.Instance;
return ExecAsync<T>(NewRequest(HttpMethod.Get, path, options, config), config);
return ExecAsync<T>(NewRequest(HttpMethod.Get, path, options, config), config, cancellationToken);
}
/// <summary>
@ -540,11 +541,12 @@ namespace {{packageName}}.Client
/// <param name="options">The additional request options.</param>
/// <param name="configuration">A per-request configuration object. It is assumed that any merge with
/// GlobalConfiguration has been done before calling this method.</param>
/// <param name="cancellationToken">Token that enables callers to cancel the request.</param>
/// <returns>A Task containing ApiResponse</returns>
public Task<ApiResponse<T>> PostAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null)
public Task<ApiResponse<T>> PostAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
var config = configuration ?? GlobalConfiguration.Instance;
return ExecAsync<T>(NewRequest(HttpMethod.Post, path, options, config), config);
return ExecAsync<T>(NewRequest(HttpMethod.Post, path, options, config), config, cancellationToken);
}
/// <summary>
@ -554,11 +556,12 @@ namespace {{packageName}}.Client
/// <param name="options">The additional request options.</param>
/// <param name="configuration">A per-request configuration object. It is assumed that any merge with
/// GlobalConfiguration has been done before calling this method.</param>
/// <param name="cancellationToken">Token that enables callers to cancel the request.</param>
/// <returns>A Task containing ApiResponse</returns>
public Task<ApiResponse<T>> PutAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null)
public Task<ApiResponse<T>> PutAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
var config = configuration ?? GlobalConfiguration.Instance;
return ExecAsync<T>(NewRequest(HttpMethod.Put, path, options, config), config);
return ExecAsync<T>(NewRequest(HttpMethod.Put, path, options, config), config, cancellationToken);
}
/// <summary>
@ -568,11 +571,12 @@ namespace {{packageName}}.Client
/// <param name="options">The additional request options.</param>
/// <param name="configuration">A per-request configuration object. It is assumed that any merge with
/// GlobalConfiguration has been done before calling this method.</param>
/// <param name="cancellationToken">Token that enables callers to cancel the request.</param>
/// <returns>A Task containing ApiResponse</returns>
public Task<ApiResponse<T>> DeleteAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null)
public Task<ApiResponse<T>> DeleteAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
var config = configuration ?? GlobalConfiguration.Instance;
return ExecAsync<T>(NewRequest(HttpMethod.Delete, path, options, config), config);
return ExecAsync<T>(NewRequest(HttpMethod.Delete, path, options, config), config, cancellationToken);
}
/// <summary>
@ -582,11 +586,12 @@ namespace {{packageName}}.Client
/// <param name="options">The additional request options.</param>
/// <param name="configuration">A per-request configuration object. It is assumed that any merge with
/// GlobalConfiguration has been done before calling this method.</param>
/// <param name="cancellationToken">Token that enables callers to cancel the request.</param>
/// <returns>A Task containing ApiResponse</returns>
public Task<ApiResponse<T>> HeadAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null)
public Task<ApiResponse<T>> HeadAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
var config = configuration ?? GlobalConfiguration.Instance;
return ExecAsync<T>(NewRequest(HttpMethod.Head, path, options, config), config);
return ExecAsync<T>(NewRequest(HttpMethod.Head, path, options, config), config, cancellationToken);
}
/// <summary>
@ -596,11 +601,12 @@ namespace {{packageName}}.Client
/// <param name="options">The additional request options.</param>
/// <param name="configuration">A per-request configuration object. It is assumed that any merge with
/// GlobalConfiguration has been done before calling this method.</param>
/// <param name="cancellationToken">Token that enables callers to cancel the request.</param>
/// <returns>A Task containing ApiResponse</returns>
public Task<ApiResponse<T>> OptionsAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null)
public Task<ApiResponse<T>> OptionsAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
var config = configuration ?? GlobalConfiguration.Instance;
return ExecAsync<T>(NewRequest(HttpMethod.Options, path, options, config), config);
return ExecAsync<T>(NewRequest(HttpMethod.Options, path, options, config), config, cancellationToken);
}
/// <summary>
@ -610,11 +616,12 @@ namespace {{packageName}}.Client
/// <param name="options">The additional request options.</param>
/// <param name="configuration">A per-request configuration object. It is assumed that any merge with
/// GlobalConfiguration has been done before calling this method.</param>
/// <param name="cancellationToken">Token that enables callers to cancel the request.</param>
/// <returns>A Task containing ApiResponse</returns>
public Task<ApiResponse<T>> PatchAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null)
public Task<ApiResponse<T>> PatchAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
var config = configuration ?? GlobalConfiguration.Instance;
return ExecAsync<T>(NewRequest(HttpMethod.Patch, path, options, config), config);
return ExecAsync<T>(NewRequest(HttpMethod.Patch, path, options, config), config, cancellationToken);
}
#endregion IAsynchronousClient
{{/supportsAsync}}

View File

@ -19,9 +19,10 @@ namespace {{packageName}}.Client
/// <param name="path">The relative path to invoke.</param>
/// <param name="options">The request parameters to pass along to the client.</param>
/// <param name="configuration">Per-request configurable settings.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <typeparam name="T">The return type.</typeparam>
/// <returns>A task eventually representing the response data, decorated with <see cref="ApiResponse{T}"/></returns>
Task<ApiResponse<T>> GetAsync<T>(String path, RequestOptions options, IReadableConfiguration configuration = null);
Task<ApiResponse<T>> GetAsync<T>(String path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Executes a non-blocking call to some <paramref name="path"/> using the POST http verb.
@ -29,9 +30,10 @@ namespace {{packageName}}.Client
/// <param name="path">The relative path to invoke.</param>
/// <param name="options">The request parameters to pass along to the client.</param>
/// <param name="configuration">Per-request configurable settings.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <typeparam name="T">The return type.</typeparam>
/// <returns>A task eventually representing the response data, decorated with <see cref="ApiResponse{T}"/></returns>
Task<ApiResponse<T>> PostAsync<T>(String path, RequestOptions options, IReadableConfiguration configuration = null);
Task<ApiResponse<T>> PostAsync<T>(String path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Executes a non-blocking call to some <paramref name="path"/> using the PUT http verb.
@ -39,9 +41,10 @@ namespace {{packageName}}.Client
/// <param name="path">The relative path to invoke.</param>
/// <param name="options">The request parameters to pass along to the client.</param>
/// <param name="configuration">Per-request configurable settings.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <typeparam name="T">The return type.</typeparam>
/// <returns>A task eventually representing the response data, decorated with <see cref="ApiResponse{T}"/></returns>
Task<ApiResponse<T>> PutAsync<T>(String path, RequestOptions options, IReadableConfiguration configuration = null);
Task<ApiResponse<T>> PutAsync<T>(String path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Executes a non-blocking call to some <paramref name="path"/> using the DELETE http verb.
@ -49,9 +52,10 @@ namespace {{packageName}}.Client
/// <param name="path">The relative path to invoke.</param>
/// <param name="options">The request parameters to pass along to the client.</param>
/// <param name="configuration">Per-request configurable settings.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <typeparam name="T">The return type.</typeparam>
/// <returns>A task eventually representing the response data, decorated with <see cref="ApiResponse{T}"/></returns>
Task<ApiResponse<T>> DeleteAsync<T>(String path, RequestOptions options, IReadableConfiguration configuration = null);
Task<ApiResponse<T>> DeleteAsync<T>(String path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Executes a non-blocking call to some <paramref name="path"/> using the HEAD http verb.
@ -59,9 +63,10 @@ namespace {{packageName}}.Client
/// <param name="path">The relative path to invoke.</param>
/// <param name="options">The request parameters to pass along to the client.</param>
/// <param name="configuration">Per-request configurable settings.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <typeparam name="T">The return type.</typeparam>
/// <returns>A task eventually representing the response data, decorated with <see cref="ApiResponse{T}"/></returns>
Task<ApiResponse<T>> HeadAsync<T>(String path, RequestOptions options, IReadableConfiguration configuration = null);
Task<ApiResponse<T>> HeadAsync<T>(String path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Executes a non-blocking call to some <paramref name="path"/> using the OPTIONS http verb.
@ -69,9 +74,10 @@ namespace {{packageName}}.Client
/// <param name="path">The relative path to invoke.</param>
/// <param name="options">The request parameters to pass along to the client.</param>
/// <param name="configuration">Per-request configurable settings.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <typeparam name="T">The return type.</typeparam>
/// <returns>A task eventually representing the response data, decorated with <see cref="ApiResponse{T}"/></returns>
Task<ApiResponse<T>> OptionsAsync<T>(String path, RequestOptions options, IReadableConfiguration configuration = null);
Task<ApiResponse<T>> OptionsAsync<T>(String path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Executes a non-blocking call to some <paramref name="path"/> using the PATCH http verb.
@ -79,9 +85,10 @@ namespace {{packageName}}.Client
/// <param name="path">The relative path to invoke.</param>
/// <param name="options">The request parameters to pass along to the client.</param>
/// <param name="configuration">Per-request configurable settings.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <typeparam name="T">The return type.</typeparam>
/// <returns>A task eventually representing the response data, decorated with <see cref="ApiResponse{T}"/></returns>
Task<ApiResponse<T>> PatchAsync<T>(String path, RequestOptions options, IReadableConfiguration configuration = null);
Task<ApiResponse<T>> PatchAsync<T>(String path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
}
}
{{^supportsAsync}}*/{{/supportsAsync}}

View File

@ -62,8 +62,9 @@ namespace {{packageName}}.{{apiPackage}}
/// </remarks>
/// <exception cref="{{packageName}}.Client.ApiException">Thrown when fails to make API call</exception>
{{#allParams}}/// <param name="{{paramName}}">{{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
{{/allParams}}/// <returns>Task of {{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}void{{/returnType}}</returns>
{{#returnType}}System.Threading.Tasks.Task<{{{returnType}}}>{{/returnType}}{{^returnType}}System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}});
{{#returnType}}System.Threading.Tasks.Task<{{{returnType}}}>{{/returnType}}{{^returnType}}System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// {{summary}}
@ -72,9 +73,10 @@ namespace {{packageName}}.{{apiPackage}}
/// {{notes}}
/// </remarks>
/// <exception cref="{{packageName}}.Client.ApiException">Thrown when fails to make API call</exception>
{{#allParams}}/// <param name="{{paramName}}">{{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}</param>
{{#allParams}}/// <param name="{{paramName}}">{{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
{{/allParams}}/// <returns>Task of ApiResponse{{#returnType}} ({{returnType}}){{/returnType}}</returns>
System.Threading.Tasks.Task<ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Object{{/returnType}}>> {{operationId}}AsyncWithHttpInfo ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}});
System.Threading.Tasks.Task<ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Object{{/returnType}}>> {{operationId}}AsyncWithHttpInfo ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
{{/operation}}
#endregion Asynchronous Operations
}
@ -376,12 +378,13 @@ namespace {{packageName}}.{{apiPackage}}
/// {{summary}} {{notes}}
/// </summary>
/// <exception cref="{{packageName}}.Client.ApiException">Thrown when fails to make API call</exception>
{{#allParams}}/// <param name="{{paramName}}">{{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}</param>
{{#allParams}}/// <param name="{{paramName}}">{{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
{{/allParams}}/// <returns>Task of {{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}void{{/returnType}}</returns>
{{#returnType}}public async System.Threading.Tasks.Task<{{{returnType}}}>{{/returnType}}{{^returnType}}public async System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}})
{{#returnType}}public async System.Threading.Tasks.Task<{{{returnType}}}>{{/returnType}}{{^returnType}}public async System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
{{#returnType}}{{packageName}}.Client.ApiResponse<{{{returnType}}}> localVarResponse = await {{operationId}}AsyncWithHttpInfo({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});
return localVarResponse.Data;{{/returnType}}{{^returnType}}await {{operationId}}AsyncWithHttpInfo({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{/returnType}}
{{#returnType}}{{packageName}}.Client.ApiResponse<{{{returnType}}}> localVarResponse = await {{operationId}}AsyncWithHttpInfo({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}cancellationToken);
return localVarResponse.Data;{{/returnType}}{{^returnType}}await {{operationId}}AsyncWithHttpInfo({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}cancellationToken);{{/returnType}}
}
@ -389,9 +392,10 @@ namespace {{packageName}}.{{apiPackage}}
/// {{summary}} {{notes}}
/// </summary>
/// <exception cref="{{packageName}}.Client.ApiException">Thrown when fails to make API call</exception>
{{#allParams}}/// <param name="{{paramName}}">{{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}</param>
{{#allParams}}/// <param name="{{paramName}}">{{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
{{/allParams}}/// <returns>Task of ApiResponse{{#returnType}} ({{returnType}}){{/returnType}}</returns>
public async System.Threading.Tasks.Task<{{packageName}}.Client.ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Object{{/returnType}}>> {{operationId}}AsyncWithHttpInfo ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}})
public async System.Threading.Tasks.Task<{{packageName}}.Client.ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Object{{/returnType}}>> {{operationId}}AsyncWithHttpInfo ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
{{#allParams}}
{{#required}}
@ -534,7 +538,7 @@ namespace {{packageName}}.{{apiPackage}}
// make the HTTP request
var localVarResponse = await this.AsynchronousClient.{{#lambda.titlecase}}{{#lambda.lowercase}}{{httpMethod}}{{/lambda.lowercase}}{{/lambda.titlecase}}Async<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Object{{/returnType}}>("{{{path}}}", localVarRequestOptions, this.Configuration);
var localVarResponse = await this.AsynchronousClient.{{#lambda.titlecase}}{{#lambda.lowercase}}{{httpMethod}}{{/lambda.lowercase}}{{/lambda.titlecase}}Async<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Object{{/returnType}}>("{{{path}}}", localVarRequestOptions, this.Configuration, cancellationToken);
if (this.ExceptionFactory != null)
{

View File

@ -65,8 +65,9 @@ namespace Org.OpenAPITools.Api
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">client model</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ModelClient</returns>
System.Threading.Tasks.Task<ModelClient> Call123TestSpecialTagsAsync (ModelClient body);
System.Threading.Tasks.Task<ModelClient> Call123TestSpecialTagsAsync (ModelClient body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// To test special tags
@ -75,9 +76,10 @@ namespace Org.OpenAPITools.Api
/// To test special tags and operation ID starting with number
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">client model</param>
/// <param name="body">client model</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (ModelClient)</returns>
System.Threading.Tasks.Task<ApiResponse<ModelClient>> Call123TestSpecialTagsAsyncWithHttpInfo (ModelClient body);
System.Threading.Tasks.Task<ApiResponse<ModelClient>> Call123TestSpecialTagsAsyncWithHttpInfo (ModelClient body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
#endregion Asynchronous Operations
}
@ -258,11 +260,12 @@ namespace Org.OpenAPITools.Api
/// To test special tags To test special tags and operation ID starting with number
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">client model</param>
/// <param name="body">client model</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ModelClient</returns>
public async System.Threading.Tasks.Task<ModelClient> Call123TestSpecialTagsAsync (ModelClient body)
public async System.Threading.Tasks.Task<ModelClient> Call123TestSpecialTagsAsync (ModelClient body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
Org.OpenAPITools.Client.ApiResponse<ModelClient> localVarResponse = await Call123TestSpecialTagsAsyncWithHttpInfo(body);
Org.OpenAPITools.Client.ApiResponse<ModelClient> localVarResponse = await Call123TestSpecialTagsAsyncWithHttpInfo(body, cancellationToken);
return localVarResponse.Data;
}
@ -271,9 +274,10 @@ namespace Org.OpenAPITools.Api
/// To test special tags To test special tags and operation ID starting with number
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">client model</param>
/// <param name="body">client model</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (ModelClient)</returns>
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<ModelClient>> Call123TestSpecialTagsAsyncWithHttpInfo (ModelClient body)
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<ModelClient>> Call123TestSpecialTagsAsyncWithHttpInfo (ModelClient body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
// verify the required parameter 'body' is set
if (body == null)
@ -303,7 +307,7 @@ namespace Org.OpenAPITools.Api
// make the HTTP request
var localVarResponse = await this.AsynchronousClient.PatchAsync<ModelClient>("/another-fake/dummy", localVarRequestOptions, this.Configuration);
var localVarResponse = await this.AsynchronousClient.PatchAsync<ModelClient>("/another-fake/dummy", localVarRequestOptions, this.Configuration, cancellationToken);
if (this.ExceptionFactory != null)
{

View File

@ -65,8 +65,9 @@ namespace Org.OpenAPITools.Api
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">client model</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ModelClient</returns>
System.Threading.Tasks.Task<ModelClient> TestClassnameAsync (ModelClient body);
System.Threading.Tasks.Task<ModelClient> TestClassnameAsync (ModelClient body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// To test class name in snake case
@ -75,9 +76,10 @@ namespace Org.OpenAPITools.Api
/// To test class name in snake case
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">client model</param>
/// <param name="body">client model</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (ModelClient)</returns>
System.Threading.Tasks.Task<ApiResponse<ModelClient>> TestClassnameAsyncWithHttpInfo (ModelClient body);
System.Threading.Tasks.Task<ApiResponse<ModelClient>> TestClassnameAsyncWithHttpInfo (ModelClient body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
#endregion Asynchronous Operations
}
@ -263,11 +265,12 @@ namespace Org.OpenAPITools.Api
/// To test class name in snake case To test class name in snake case
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">client model</param>
/// <param name="body">client model</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ModelClient</returns>
public async System.Threading.Tasks.Task<ModelClient> TestClassnameAsync (ModelClient body)
public async System.Threading.Tasks.Task<ModelClient> TestClassnameAsync (ModelClient body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
Org.OpenAPITools.Client.ApiResponse<ModelClient> localVarResponse = await TestClassnameAsyncWithHttpInfo(body);
Org.OpenAPITools.Client.ApiResponse<ModelClient> localVarResponse = await TestClassnameAsyncWithHttpInfo(body, cancellationToken);
return localVarResponse.Data;
}
@ -276,9 +279,10 @@ namespace Org.OpenAPITools.Api
/// To test class name in snake case To test class name in snake case
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">client model</param>
/// <param name="body">client model</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (ModelClient)</returns>
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<ModelClient>> TestClassnameAsyncWithHttpInfo (ModelClient body)
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<ModelClient>> TestClassnameAsyncWithHttpInfo (ModelClient body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
// verify the required parameter 'body' is set
if (body == null)
@ -313,7 +317,7 @@ namespace Org.OpenAPITools.Api
// make the HTTP request
var localVarResponse = await this.AsynchronousClient.PatchAsync<ModelClient>("/fake_classname_test", localVarRequestOptions, this.Configuration);
var localVarResponse = await this.AsynchronousClient.PatchAsync<ModelClient>("/fake_classname_test", localVarRequestOptions, this.Configuration, cancellationToken);
if (this.ExceptionFactory != null)
{

View File

@ -247,8 +247,9 @@ namespace Org.OpenAPITools.Api
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">Pet object that needs to be added to the store</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of void</returns>
System.Threading.Tasks.Task AddPetAsync (Pet body);
System.Threading.Tasks.Task AddPetAsync (Pet body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Add a new pet to the store
@ -257,9 +258,10 @@ namespace Org.OpenAPITools.Api
///
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">Pet object that needs to be added to the store</param>
/// <param name="body">Pet object that needs to be added to the store</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse</returns>
System.Threading.Tasks.Task<ApiResponse<Object>> AddPetAsyncWithHttpInfo (Pet body);
System.Threading.Tasks.Task<ApiResponse<Object>> AddPetAsyncWithHttpInfo (Pet body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Deletes a pet
/// </summary>
@ -268,9 +270,11 @@ namespace Org.OpenAPITools.Api
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="petId">Pet id to delete</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <param name="apiKey"> (optional)</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of void</returns>
System.Threading.Tasks.Task DeletePetAsync (long petId, string apiKey = default(string));
System.Threading.Tasks.Task DeletePetAsync (long petId, string apiKey = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Deletes a pet
@ -279,10 +283,12 @@ namespace Org.OpenAPITools.Api
///
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="petId">Pet id to delete</param>
/// <param name="apiKey"> (optional)</param>
/// <param name="petId">Pet id to delete</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <param name="apiKey"> (optional)</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse</returns>
System.Threading.Tasks.Task<ApiResponse<Object>> DeletePetAsyncWithHttpInfo (long petId, string apiKey = default(string));
System.Threading.Tasks.Task<ApiResponse<Object>> DeletePetAsyncWithHttpInfo (long petId, string apiKey = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Finds Pets by status
/// </summary>
@ -291,8 +297,9 @@ namespace Org.OpenAPITools.Api
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="status">Status values that need to be considered for filter</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of List&lt;Pet&gt;</returns>
System.Threading.Tasks.Task<List<Pet>> FindPetsByStatusAsync (List<string> status);
System.Threading.Tasks.Task<List<Pet>> FindPetsByStatusAsync (List<string> status, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Finds Pets by status
@ -301,9 +308,10 @@ namespace Org.OpenAPITools.Api
/// Multiple status values can be provided with comma separated strings
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="status">Status values that need to be considered for filter</param>
/// <param name="status">Status values that need to be considered for filter</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (List&lt;Pet&gt;)</returns>
System.Threading.Tasks.Task<ApiResponse<List<Pet>>> FindPetsByStatusAsyncWithHttpInfo (List<string> status);
System.Threading.Tasks.Task<ApiResponse<List<Pet>>> FindPetsByStatusAsyncWithHttpInfo (List<string> status, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Finds Pets by tags
/// </summary>
@ -312,8 +320,9 @@ namespace Org.OpenAPITools.Api
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="tags">Tags to filter by</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of List&lt;Pet&gt;</returns>
System.Threading.Tasks.Task<List<Pet>> FindPetsByTagsAsync (List<string> tags);
System.Threading.Tasks.Task<List<Pet>> FindPetsByTagsAsync (List<string> tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Finds Pets by tags
@ -322,9 +331,10 @@ namespace Org.OpenAPITools.Api
/// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="tags">Tags to filter by</param>
/// <param name="tags">Tags to filter by</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (List&lt;Pet&gt;)</returns>
System.Threading.Tasks.Task<ApiResponse<List<Pet>>> FindPetsByTagsAsyncWithHttpInfo (List<string> tags);
System.Threading.Tasks.Task<ApiResponse<List<Pet>>> FindPetsByTagsAsyncWithHttpInfo (List<string> tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Find pet by ID
/// </summary>
@ -333,8 +343,9 @@ namespace Org.OpenAPITools.Api
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="petId">ID of pet to return</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of Pet</returns>
System.Threading.Tasks.Task<Pet> GetPetByIdAsync (long petId);
System.Threading.Tasks.Task<Pet> GetPetByIdAsync (long petId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Find pet by ID
@ -343,9 +354,10 @@ namespace Org.OpenAPITools.Api
/// Returns a single pet
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="petId">ID of pet to return</param>
/// <param name="petId">ID of pet to return</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (Pet)</returns>
System.Threading.Tasks.Task<ApiResponse<Pet>> GetPetByIdAsyncWithHttpInfo (long petId);
System.Threading.Tasks.Task<ApiResponse<Pet>> GetPetByIdAsyncWithHttpInfo (long petId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Update an existing pet
/// </summary>
@ -354,8 +366,9 @@ namespace Org.OpenAPITools.Api
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">Pet object that needs to be added to the store</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of void</returns>
System.Threading.Tasks.Task UpdatePetAsync (Pet body);
System.Threading.Tasks.Task UpdatePetAsync (Pet body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Update an existing pet
@ -364,9 +377,10 @@ namespace Org.OpenAPITools.Api
///
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">Pet object that needs to be added to the store</param>
/// <param name="body">Pet object that needs to be added to the store</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse</returns>
System.Threading.Tasks.Task<ApiResponse<Object>> UpdatePetAsyncWithHttpInfo (Pet body);
System.Threading.Tasks.Task<ApiResponse<Object>> UpdatePetAsyncWithHttpInfo (Pet body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Updates a pet in the store with form data
/// </summary>
@ -375,10 +389,13 @@ namespace Org.OpenAPITools.Api
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="petId">ID of pet that needs to be updated</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <param name="name">Updated name of the pet (optional)</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <param name="status">Updated status of the pet (optional)</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of void</returns>
System.Threading.Tasks.Task UpdatePetWithFormAsync (long petId, string name = default(string), string status = default(string));
System.Threading.Tasks.Task UpdatePetWithFormAsync (long petId, string name = default(string), string status = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Updates a pet in the store with form data
@ -387,11 +404,14 @@ namespace Org.OpenAPITools.Api
///
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="petId">ID of pet that needs to be updated</param>
/// <param name="name">Updated name of the pet (optional)</param>
/// <param name="status">Updated status of the pet (optional)</param>
/// <param name="petId">ID of pet that needs to be updated</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <param name="name">Updated name of the pet (optional)</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <param name="status">Updated status of the pet (optional)</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse</returns>
System.Threading.Tasks.Task<ApiResponse<Object>> UpdatePetWithFormAsyncWithHttpInfo (long petId, string name = default(string), string status = default(string));
System.Threading.Tasks.Task<ApiResponse<Object>> UpdatePetWithFormAsyncWithHttpInfo (long petId, string name = default(string), string status = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// uploads an image
/// </summary>
@ -400,10 +420,13 @@ namespace Org.OpenAPITools.Api
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="petId">ID of pet to update</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <param name="additionalMetadata">Additional data to pass to server (optional)</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <param name="file">file to upload (optional)</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse</returns>
System.Threading.Tasks.Task<ApiResponse> UploadFileAsync (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream));
System.Threading.Tasks.Task<ApiResponse> UploadFileAsync (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// uploads an image
@ -412,11 +435,14 @@ namespace Org.OpenAPITools.Api
///
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="petId">ID of pet to update</param>
/// <param name="additionalMetadata">Additional data to pass to server (optional)</param>
/// <param name="file">file to upload (optional)</param>
/// <param name="petId">ID of pet to update</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <param name="additionalMetadata">Additional data to pass to server (optional)</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <param name="file">file to upload (optional)</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (ApiResponse)</returns>
System.Threading.Tasks.Task<ApiResponse<ApiResponse>> UploadFileAsyncWithHttpInfo (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream));
System.Threading.Tasks.Task<ApiResponse<ApiResponse>> UploadFileAsyncWithHttpInfo (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// uploads an image (required)
/// </summary>
@ -425,10 +451,13 @@ namespace Org.OpenAPITools.Api
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="petId">ID of pet to update</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <param name="requiredFile">file to upload</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <param name="additionalMetadata">Additional data to pass to server (optional)</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse</returns>
System.Threading.Tasks.Task<ApiResponse> UploadFileWithRequiredFileAsync (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string));
System.Threading.Tasks.Task<ApiResponse> UploadFileWithRequiredFileAsync (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// uploads an image (required)
@ -437,11 +466,14 @@ namespace Org.OpenAPITools.Api
///
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="petId">ID of pet to update</param>
/// <param name="requiredFile">file to upload</param>
/// <param name="additionalMetadata">Additional data to pass to server (optional)</param>
/// <param name="petId">ID of pet to update</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <param name="requiredFile">file to upload</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <param name="additionalMetadata">Additional data to pass to server (optional)</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (ApiResponse)</returns>
System.Threading.Tasks.Task<ApiResponse<ApiResponse>> UploadFileWithRequiredFileAsyncWithHttpInfo (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string));
System.Threading.Tasks.Task<ApiResponse<ApiResponse>> UploadFileWithRequiredFileAsyncWithHttpInfo (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
#endregion Asynchronous Operations
}
@ -627,11 +659,12 @@ namespace Org.OpenAPITools.Api
/// Add a new pet to the store
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">Pet object that needs to be added to the store</param>
/// <param name="body">Pet object that needs to be added to the store</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of void</returns>
public async System.Threading.Tasks.Task AddPetAsync (Pet body)
public async System.Threading.Tasks.Task AddPetAsync (Pet body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
await AddPetAsyncWithHttpInfo(body);
await AddPetAsyncWithHttpInfo(body, cancellationToken);
}
@ -639,9 +672,10 @@ namespace Org.OpenAPITools.Api
/// Add a new pet to the store
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">Pet object that needs to be added to the store</param>
/// <param name="body">Pet object that needs to be added to the store</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse</returns>
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Object>> AddPetAsyncWithHttpInfo (Pet body)
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Object>> AddPetAsyncWithHttpInfo (Pet body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
// verify the required parameter 'body' is set
if (body == null)
@ -677,7 +711,7 @@ namespace Org.OpenAPITools.Api
// make the HTTP request
var localVarResponse = await this.AsynchronousClient.PostAsync<Object>("/pet", localVarRequestOptions, this.Configuration);
var localVarResponse = await this.AsynchronousClient.PostAsync<Object>("/pet", localVarRequestOptions, this.Configuration, cancellationToken);
if (this.ExceptionFactory != null)
{
@ -753,12 +787,14 @@ namespace Org.OpenAPITools.Api
/// Deletes a pet
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="petId">Pet id to delete</param>
/// <param name="apiKey"> (optional)</param>
/// <param name="petId">Pet id to delete</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <param name="apiKey"> (optional)</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of void</returns>
public async System.Threading.Tasks.Task DeletePetAsync (long petId, string apiKey = default(string))
public async System.Threading.Tasks.Task DeletePetAsync (long petId, string apiKey = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
await DeletePetAsyncWithHttpInfo(petId, apiKey);
await DeletePetAsyncWithHttpInfo(petId, apiKey, cancellationToken);
}
@ -766,10 +802,12 @@ namespace Org.OpenAPITools.Api
/// Deletes a pet
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="petId">Pet id to delete</param>
/// <param name="apiKey"> (optional)</param>
/// <param name="petId">Pet id to delete</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <param name="apiKey"> (optional)</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse</returns>
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Object>> DeletePetAsyncWithHttpInfo (long petId, string apiKey = default(string))
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Object>> DeletePetAsyncWithHttpInfo (long petId, string apiKey = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
@ -803,7 +841,7 @@ namespace Org.OpenAPITools.Api
// make the HTTP request
var localVarResponse = await this.AsynchronousClient.DeleteAsync<Object>("/pet/{petId}", localVarRequestOptions, this.Configuration);
var localVarResponse = await this.AsynchronousClient.DeleteAsync<Object>("/pet/{petId}", localVarRequestOptions, this.Configuration, cancellationToken);
if (this.ExceptionFactory != null)
{
@ -880,11 +918,12 @@ namespace Org.OpenAPITools.Api
/// Finds Pets by status Multiple status values can be provided with comma separated strings
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="status">Status values that need to be considered for filter</param>
/// <param name="status">Status values that need to be considered for filter</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of List&lt;Pet&gt;</returns>
public async System.Threading.Tasks.Task<List<Pet>> FindPetsByStatusAsync (List<string> status)
public async System.Threading.Tasks.Task<List<Pet>> FindPetsByStatusAsync (List<string> status, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
Org.OpenAPITools.Client.ApiResponse<List<Pet>> localVarResponse = await FindPetsByStatusAsyncWithHttpInfo(status);
Org.OpenAPITools.Client.ApiResponse<List<Pet>> localVarResponse = await FindPetsByStatusAsyncWithHttpInfo(status, cancellationToken);
return localVarResponse.Data;
}
@ -893,9 +932,10 @@ namespace Org.OpenAPITools.Api
/// Finds Pets by status Multiple status values can be provided with comma separated strings
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="status">Status values that need to be considered for filter</param>
/// <param name="status">Status values that need to be considered for filter</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (List&lt;Pet&gt;)</returns>
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<List<Pet>>> FindPetsByStatusAsyncWithHttpInfo (List<string> status)
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<List<Pet>>> FindPetsByStatusAsyncWithHttpInfo (List<string> status, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
// verify the required parameter 'status' is set
if (status == null)
@ -931,7 +971,7 @@ namespace Org.OpenAPITools.Api
// make the HTTP request
var localVarResponse = await this.AsynchronousClient.GetAsync<List<Pet>>("/pet/findByStatus", localVarRequestOptions, this.Configuration);
var localVarResponse = await this.AsynchronousClient.GetAsync<List<Pet>>("/pet/findByStatus", localVarRequestOptions, this.Configuration, cancellationToken);
if (this.ExceptionFactory != null)
{
@ -1008,11 +1048,12 @@ namespace Org.OpenAPITools.Api
/// Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="tags">Tags to filter by</param>
/// <param name="tags">Tags to filter by</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of List&lt;Pet&gt;</returns>
public async System.Threading.Tasks.Task<List<Pet>> FindPetsByTagsAsync (List<string> tags)
public async System.Threading.Tasks.Task<List<Pet>> FindPetsByTagsAsync (List<string> tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
Org.OpenAPITools.Client.ApiResponse<List<Pet>> localVarResponse = await FindPetsByTagsAsyncWithHttpInfo(tags);
Org.OpenAPITools.Client.ApiResponse<List<Pet>> localVarResponse = await FindPetsByTagsAsyncWithHttpInfo(tags, cancellationToken);
return localVarResponse.Data;
}
@ -1021,9 +1062,10 @@ namespace Org.OpenAPITools.Api
/// Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="tags">Tags to filter by</param>
/// <param name="tags">Tags to filter by</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (List&lt;Pet&gt;)</returns>
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<List<Pet>>> FindPetsByTagsAsyncWithHttpInfo (List<string> tags)
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<List<Pet>>> FindPetsByTagsAsyncWithHttpInfo (List<string> tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
// verify the required parameter 'tags' is set
if (tags == null)
@ -1059,7 +1101,7 @@ namespace Org.OpenAPITools.Api
// make the HTTP request
var localVarResponse = await this.AsynchronousClient.GetAsync<List<Pet>>("/pet/findByTags", localVarRequestOptions, this.Configuration);
var localVarResponse = await this.AsynchronousClient.GetAsync<List<Pet>>("/pet/findByTags", localVarRequestOptions, this.Configuration, cancellationToken);
if (this.ExceptionFactory != null)
{
@ -1131,11 +1173,12 @@ namespace Org.OpenAPITools.Api
/// Find pet by ID Returns a single pet
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="petId">ID of pet to return</param>
/// <param name="petId">ID of pet to return</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of Pet</returns>
public async System.Threading.Tasks.Task<Pet> GetPetByIdAsync (long petId)
public async System.Threading.Tasks.Task<Pet> GetPetByIdAsync (long petId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
Org.OpenAPITools.Client.ApiResponse<Pet> localVarResponse = await GetPetByIdAsyncWithHttpInfo(petId);
Org.OpenAPITools.Client.ApiResponse<Pet> localVarResponse = await GetPetByIdAsyncWithHttpInfo(petId, cancellationToken);
return localVarResponse.Data;
}
@ -1144,9 +1187,10 @@ namespace Org.OpenAPITools.Api
/// Find pet by ID Returns a single pet
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="petId">ID of pet to return</param>
/// <param name="petId">ID of pet to return</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (Pet)</returns>
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Pet>> GetPetByIdAsyncWithHttpInfo (long petId)
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Pet>> GetPetByIdAsyncWithHttpInfo (long petId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
@ -1177,7 +1221,7 @@ namespace Org.OpenAPITools.Api
// make the HTTP request
var localVarResponse = await this.AsynchronousClient.GetAsync<Pet>("/pet/{petId}", localVarRequestOptions, this.Configuration);
var localVarResponse = await this.AsynchronousClient.GetAsync<Pet>("/pet/{petId}", localVarRequestOptions, this.Configuration, cancellationToken);
if (this.ExceptionFactory != null)
{
@ -1253,11 +1297,12 @@ namespace Org.OpenAPITools.Api
/// Update an existing pet
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">Pet object that needs to be added to the store</param>
/// <param name="body">Pet object that needs to be added to the store</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of void</returns>
public async System.Threading.Tasks.Task UpdatePetAsync (Pet body)
public async System.Threading.Tasks.Task UpdatePetAsync (Pet body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
await UpdatePetAsyncWithHttpInfo(body);
await UpdatePetAsyncWithHttpInfo(body, cancellationToken);
}
@ -1265,9 +1310,10 @@ namespace Org.OpenAPITools.Api
/// Update an existing pet
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">Pet object that needs to be added to the store</param>
/// <param name="body">Pet object that needs to be added to the store</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse</returns>
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Object>> UpdatePetAsyncWithHttpInfo (Pet body)
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Object>> UpdatePetAsyncWithHttpInfo (Pet body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
// verify the required parameter 'body' is set
if (body == null)
@ -1303,7 +1349,7 @@ namespace Org.OpenAPITools.Api
// make the HTTP request
var localVarResponse = await this.AsynchronousClient.PutAsync<Object>("/pet", localVarRequestOptions, this.Configuration);
var localVarResponse = await this.AsynchronousClient.PutAsync<Object>("/pet", localVarRequestOptions, this.Configuration, cancellationToken);
if (this.ExceptionFactory != null)
{
@ -1386,13 +1432,16 @@ namespace Org.OpenAPITools.Api
/// Updates a pet in the store with form data
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="petId">ID of pet that needs to be updated</param>
/// <param name="name">Updated name of the pet (optional)</param>
/// <param name="status">Updated status of the pet (optional)</param>
/// <param name="petId">ID of pet that needs to be updated</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <param name="name">Updated name of the pet (optional)</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <param name="status">Updated status of the pet (optional)</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of void</returns>
public async System.Threading.Tasks.Task UpdatePetWithFormAsync (long petId, string name = default(string), string status = default(string))
public async System.Threading.Tasks.Task UpdatePetWithFormAsync (long petId, string name = default(string), string status = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
await UpdatePetWithFormAsyncWithHttpInfo(petId, name, status);
await UpdatePetWithFormAsyncWithHttpInfo(petId, name, status, cancellationToken);
}
@ -1400,11 +1449,14 @@ namespace Org.OpenAPITools.Api
/// Updates a pet in the store with form data
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="petId">ID of pet that needs to be updated</param>
/// <param name="name">Updated name of the pet (optional)</param>
/// <param name="status">Updated status of the pet (optional)</param>
/// <param name="petId">ID of pet that needs to be updated</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <param name="name">Updated name of the pet (optional)</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <param name="status">Updated status of the pet (optional)</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse</returns>
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Object>> UpdatePetWithFormAsyncWithHttpInfo (long petId, string name = default(string), string status = default(string))
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Object>> UpdatePetWithFormAsyncWithHttpInfo (long petId, string name = default(string), string status = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
@ -1443,7 +1495,7 @@ namespace Org.OpenAPITools.Api
// make the HTTP request
var localVarResponse = await this.AsynchronousClient.PostAsync<Object>("/pet/{petId}", localVarRequestOptions, this.Configuration);
var localVarResponse = await this.AsynchronousClient.PostAsync<Object>("/pet/{petId}", localVarRequestOptions, this.Configuration, cancellationToken);
if (this.ExceptionFactory != null)
{
@ -1528,13 +1580,16 @@ namespace Org.OpenAPITools.Api
/// uploads an image
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="petId">ID of pet to update</param>
/// <param name="additionalMetadata">Additional data to pass to server (optional)</param>
/// <param name="file">file to upload (optional)</param>
/// <param name="petId">ID of pet to update</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <param name="additionalMetadata">Additional data to pass to server (optional)</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <param name="file">file to upload (optional)</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse</returns>
public async System.Threading.Tasks.Task<ApiResponse> UploadFileAsync (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream))
public async System.Threading.Tasks.Task<ApiResponse> UploadFileAsync (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
Org.OpenAPITools.Client.ApiResponse<ApiResponse> localVarResponse = await UploadFileAsyncWithHttpInfo(petId, additionalMetadata, file);
Org.OpenAPITools.Client.ApiResponse<ApiResponse> localVarResponse = await UploadFileAsyncWithHttpInfo(petId, additionalMetadata, file, cancellationToken);
return localVarResponse.Data;
}
@ -1543,11 +1598,14 @@ namespace Org.OpenAPITools.Api
/// uploads an image
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="petId">ID of pet to update</param>
/// <param name="additionalMetadata">Additional data to pass to server (optional)</param>
/// <param name="file">file to upload (optional)</param>
/// <param name="petId">ID of pet to update</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <param name="additionalMetadata">Additional data to pass to server (optional)</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <param name="file">file to upload (optional)</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (ApiResponse)</returns>
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<ApiResponse>> UploadFileAsyncWithHttpInfo (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream))
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<ApiResponse>> UploadFileAsyncWithHttpInfo (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
@ -1587,7 +1645,7 @@ namespace Org.OpenAPITools.Api
// make the HTTP request
var localVarResponse = await this.AsynchronousClient.PostAsync<ApiResponse>("/pet/{petId}/uploadImage", localVarRequestOptions, this.Configuration);
var localVarResponse = await this.AsynchronousClient.PostAsync<ApiResponse>("/pet/{petId}/uploadImage", localVarRequestOptions, this.Configuration, cancellationToken);
if (this.ExceptionFactory != null)
{
@ -1673,13 +1731,16 @@ namespace Org.OpenAPITools.Api
/// uploads an image (required)
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="petId">ID of pet to update</param>
/// <param name="requiredFile">file to upload</param>
/// <param name="additionalMetadata">Additional data to pass to server (optional)</param>
/// <param name="petId">ID of pet to update</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <param name="requiredFile">file to upload</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <param name="additionalMetadata">Additional data to pass to server (optional)</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse</returns>
public async System.Threading.Tasks.Task<ApiResponse> UploadFileWithRequiredFileAsync (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string))
public async System.Threading.Tasks.Task<ApiResponse> UploadFileWithRequiredFileAsync (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
Org.OpenAPITools.Client.ApiResponse<ApiResponse> localVarResponse = await UploadFileWithRequiredFileAsyncWithHttpInfo(petId, requiredFile, additionalMetadata);
Org.OpenAPITools.Client.ApiResponse<ApiResponse> localVarResponse = await UploadFileWithRequiredFileAsyncWithHttpInfo(petId, requiredFile, additionalMetadata, cancellationToken);
return localVarResponse.Data;
}
@ -1688,11 +1749,14 @@ namespace Org.OpenAPITools.Api
/// uploads an image (required)
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="petId">ID of pet to update</param>
/// <param name="requiredFile">file to upload</param>
/// <param name="additionalMetadata">Additional data to pass to server (optional)</param>
/// <param name="petId">ID of pet to update</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <param name="requiredFile">file to upload</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <param name="additionalMetadata">Additional data to pass to server (optional)</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (ApiResponse)</returns>
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<ApiResponse>> UploadFileWithRequiredFileAsyncWithHttpInfo (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string))
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<ApiResponse>> UploadFileWithRequiredFileAsyncWithHttpInfo (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
// verify the required parameter 'requiredFile' is set
if (requiredFile == null)
@ -1733,7 +1797,7 @@ namespace Org.OpenAPITools.Api
// make the HTTP request
var localVarResponse = await this.AsynchronousClient.PostAsync<ApiResponse>("/fake/{petId}/uploadImageWithRequiredFile", localVarRequestOptions, this.Configuration);
var localVarResponse = await this.AsynchronousClient.PostAsync<ApiResponse>("/fake/{petId}/uploadImageWithRequiredFile", localVarRequestOptions, this.Configuration, cancellationToken);
if (this.ExceptionFactory != null)
{

View File

@ -126,8 +126,9 @@ namespace Org.OpenAPITools.Api
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="orderId">ID of the order that needs to be deleted</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of void</returns>
System.Threading.Tasks.Task DeleteOrderAsync (string orderId);
System.Threading.Tasks.Task DeleteOrderAsync (string orderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Delete purchase order by ID
@ -136,9 +137,10 @@ namespace Org.OpenAPITools.Api
/// For valid response try integer IDs with value &lt; 1000. Anything above 1000 or nonintegers will generate API errors
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="orderId">ID of the order that needs to be deleted</param>
/// <param name="orderId">ID of the order that needs to be deleted</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse</returns>
System.Threading.Tasks.Task<ApiResponse<Object>> DeleteOrderAsyncWithHttpInfo (string orderId);
System.Threading.Tasks.Task<ApiResponse<Object>> DeleteOrderAsyncWithHttpInfo (string orderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Returns pet inventories by status
/// </summary>
@ -147,7 +149,7 @@ namespace Org.OpenAPITools.Api
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <returns>Task of Dictionary&lt;string, int&gt;</returns>
System.Threading.Tasks.Task<Dictionary<string, int>> GetInventoryAsync ();
System.Threading.Tasks.Task<Dictionary<string, int>> GetInventoryAsync (System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Returns pet inventories by status
@ -157,7 +159,7 @@ namespace Org.OpenAPITools.Api
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <returns>Task of ApiResponse (Dictionary&lt;string, int&gt;)</returns>
System.Threading.Tasks.Task<ApiResponse<Dictionary<string, int>>> GetInventoryAsyncWithHttpInfo ();
System.Threading.Tasks.Task<ApiResponse<Dictionary<string, int>>> GetInventoryAsyncWithHttpInfo (System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Find purchase order by ID
/// </summary>
@ -166,8 +168,9 @@ namespace Org.OpenAPITools.Api
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="orderId">ID of pet that needs to be fetched</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of Order</returns>
System.Threading.Tasks.Task<Order> GetOrderByIdAsync (long orderId);
System.Threading.Tasks.Task<Order> GetOrderByIdAsync (long orderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Find purchase order by ID
@ -176,9 +179,10 @@ namespace Org.OpenAPITools.Api
/// For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other values will generated exceptions
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="orderId">ID of pet that needs to be fetched</param>
/// <param name="orderId">ID of pet that needs to be fetched</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (Order)</returns>
System.Threading.Tasks.Task<ApiResponse<Order>> GetOrderByIdAsyncWithHttpInfo (long orderId);
System.Threading.Tasks.Task<ApiResponse<Order>> GetOrderByIdAsyncWithHttpInfo (long orderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Place an order for a pet
/// </summary>
@ -187,8 +191,9 @@ namespace Org.OpenAPITools.Api
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">order placed for purchasing the pet</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of Order</returns>
System.Threading.Tasks.Task<Order> PlaceOrderAsync (Order body);
System.Threading.Tasks.Task<Order> PlaceOrderAsync (Order body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Place an order for a pet
@ -197,9 +202,10 @@ namespace Org.OpenAPITools.Api
///
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">order placed for purchasing the pet</param>
/// <param name="body">order placed for purchasing the pet</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (Order)</returns>
System.Threading.Tasks.Task<ApiResponse<Order>> PlaceOrderAsyncWithHttpInfo (Order body);
System.Threading.Tasks.Task<ApiResponse<Order>> PlaceOrderAsyncWithHttpInfo (Order body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
#endregion Asynchronous Operations
}
@ -377,11 +383,12 @@ namespace Org.OpenAPITools.Api
/// Delete purchase order by ID For valid response try integer IDs with value &lt; 1000. Anything above 1000 or nonintegers will generate API errors
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="orderId">ID of the order that needs to be deleted</param>
/// <param name="orderId">ID of the order that needs to be deleted</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of void</returns>
public async System.Threading.Tasks.Task DeleteOrderAsync (string orderId)
public async System.Threading.Tasks.Task DeleteOrderAsync (string orderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
await DeleteOrderAsyncWithHttpInfo(orderId);
await DeleteOrderAsyncWithHttpInfo(orderId, cancellationToken);
}
@ -389,9 +396,10 @@ namespace Org.OpenAPITools.Api
/// Delete purchase order by ID For valid response try integer IDs with value &lt; 1000. Anything above 1000 or nonintegers will generate API errors
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="orderId">ID of the order that needs to be deleted</param>
/// <param name="orderId">ID of the order that needs to be deleted</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse</returns>
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Object>> DeleteOrderAsyncWithHttpInfo (string orderId)
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Object>> DeleteOrderAsyncWithHttpInfo (string orderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
// verify the required parameter 'orderId' is set
if (orderId == null)
@ -419,7 +427,7 @@ namespace Org.OpenAPITools.Api
// make the HTTP request
var localVarResponse = await this.AsynchronousClient.DeleteAsync<Object>("/store/order/{order_id}", localVarRequestOptions, this.Configuration);
var localVarResponse = await this.AsynchronousClient.DeleteAsync<Object>("/store/order/{order_id}", localVarRequestOptions, this.Configuration, cancellationToken);
if (this.ExceptionFactory != null)
{
@ -488,9 +496,9 @@ namespace Org.OpenAPITools.Api
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <returns>Task of Dictionary&lt;string, int&gt;</returns>
public async System.Threading.Tasks.Task<Dictionary<string, int>> GetInventoryAsync ()
public async System.Threading.Tasks.Task<Dictionary<string, int>> GetInventoryAsync (System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
Org.OpenAPITools.Client.ApiResponse<Dictionary<string, int>> localVarResponse = await GetInventoryAsyncWithHttpInfo();
Org.OpenAPITools.Client.ApiResponse<Dictionary<string, int>> localVarResponse = await GetInventoryAsyncWithHttpInfo(cancellationToken);
return localVarResponse.Data;
}
@ -500,7 +508,7 @@ namespace Org.OpenAPITools.Api
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <returns>Task of ApiResponse (Dictionary&lt;string, int&gt;)</returns>
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Dictionary<string, int>>> GetInventoryAsyncWithHttpInfo ()
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Dictionary<string, int>>> GetInventoryAsyncWithHttpInfo (System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
@ -529,7 +537,7 @@ namespace Org.OpenAPITools.Api
// make the HTTP request
var localVarResponse = await this.AsynchronousClient.GetAsync<Dictionary<string, int>>("/store/inventory", localVarRequestOptions, this.Configuration);
var localVarResponse = await this.AsynchronousClient.GetAsync<Dictionary<string, int>>("/store/inventory", localVarRequestOptions, this.Configuration, cancellationToken);
if (this.ExceptionFactory != null)
{
@ -596,11 +604,12 @@ namespace Org.OpenAPITools.Api
/// Find purchase order by ID For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other values will generated exceptions
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="orderId">ID of pet that needs to be fetched</param>
/// <param name="orderId">ID of pet that needs to be fetched</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of Order</returns>
public async System.Threading.Tasks.Task<Order> GetOrderByIdAsync (long orderId)
public async System.Threading.Tasks.Task<Order> GetOrderByIdAsync (long orderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
Org.OpenAPITools.Client.ApiResponse<Order> localVarResponse = await GetOrderByIdAsyncWithHttpInfo(orderId);
Org.OpenAPITools.Client.ApiResponse<Order> localVarResponse = await GetOrderByIdAsyncWithHttpInfo(orderId, cancellationToken);
return localVarResponse.Data;
}
@ -609,9 +618,10 @@ namespace Org.OpenAPITools.Api
/// Find purchase order by ID For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other values will generated exceptions
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="orderId">ID of pet that needs to be fetched</param>
/// <param name="orderId">ID of pet that needs to be fetched</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (Order)</returns>
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Order>> GetOrderByIdAsyncWithHttpInfo (long orderId)
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Order>> GetOrderByIdAsyncWithHttpInfo (long orderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
@ -637,7 +647,7 @@ namespace Org.OpenAPITools.Api
// make the HTTP request
var localVarResponse = await this.AsynchronousClient.GetAsync<Order>("/store/order/{order_id}", localVarRequestOptions, this.Configuration);
var localVarResponse = await this.AsynchronousClient.GetAsync<Order>("/store/order/{order_id}", localVarRequestOptions, this.Configuration, cancellationToken);
if (this.ExceptionFactory != null)
{
@ -708,11 +718,12 @@ namespace Org.OpenAPITools.Api
/// Place an order for a pet
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">order placed for purchasing the pet</param>
/// <param name="body">order placed for purchasing the pet</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of Order</returns>
public async System.Threading.Tasks.Task<Order> PlaceOrderAsync (Order body)
public async System.Threading.Tasks.Task<Order> PlaceOrderAsync (Order body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
Org.OpenAPITools.Client.ApiResponse<Order> localVarResponse = await PlaceOrderAsyncWithHttpInfo(body);
Org.OpenAPITools.Client.ApiResponse<Order> localVarResponse = await PlaceOrderAsyncWithHttpInfo(body, cancellationToken);
return localVarResponse.Data;
}
@ -721,9 +732,10 @@ namespace Org.OpenAPITools.Api
/// Place an order for a pet
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">order placed for purchasing the pet</param>
/// <param name="body">order placed for purchasing the pet</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (Order)</returns>
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Order>> PlaceOrderAsyncWithHttpInfo (Order body)
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Order>> PlaceOrderAsyncWithHttpInfo (Order body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
// verify the required parameter 'body' is set
if (body == null)
@ -753,7 +765,7 @@ namespace Org.OpenAPITools.Api
// make the HTTP request
var localVarResponse = await this.AsynchronousClient.PostAsync<Order>("/store/order", localVarRequestOptions, this.Configuration);
var localVarResponse = await this.AsynchronousClient.PostAsync<Order>("/store/order", localVarRequestOptions, this.Configuration, cancellationToken);
if (this.ExceptionFactory != null)
{

View File

@ -214,8 +214,9 @@ namespace Org.OpenAPITools.Api
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">Created user object</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of void</returns>
System.Threading.Tasks.Task CreateUserAsync (User body);
System.Threading.Tasks.Task CreateUserAsync (User body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Create user
@ -224,9 +225,10 @@ namespace Org.OpenAPITools.Api
/// This can only be done by the logged in user.
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">Created user object</param>
/// <param name="body">Created user object</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse</returns>
System.Threading.Tasks.Task<ApiResponse<Object>> CreateUserAsyncWithHttpInfo (User body);
System.Threading.Tasks.Task<ApiResponse<Object>> CreateUserAsyncWithHttpInfo (User body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Creates list of users with given input array
/// </summary>
@ -235,8 +237,9 @@ namespace Org.OpenAPITools.Api
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">List of user object</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of void</returns>
System.Threading.Tasks.Task CreateUsersWithArrayInputAsync (List<User> body);
System.Threading.Tasks.Task CreateUsersWithArrayInputAsync (List<User> body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Creates list of users with given input array
@ -245,9 +248,10 @@ namespace Org.OpenAPITools.Api
///
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">List of user object</param>
/// <param name="body">List of user object</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse</returns>
System.Threading.Tasks.Task<ApiResponse<Object>> CreateUsersWithArrayInputAsyncWithHttpInfo (List<User> body);
System.Threading.Tasks.Task<ApiResponse<Object>> CreateUsersWithArrayInputAsyncWithHttpInfo (List<User> body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Creates list of users with given input array
/// </summary>
@ -256,8 +260,9 @@ namespace Org.OpenAPITools.Api
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">List of user object</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of void</returns>
System.Threading.Tasks.Task CreateUsersWithListInputAsync (List<User> body);
System.Threading.Tasks.Task CreateUsersWithListInputAsync (List<User> body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Creates list of users with given input array
@ -266,9 +271,10 @@ namespace Org.OpenAPITools.Api
///
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">List of user object</param>
/// <param name="body">List of user object</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse</returns>
System.Threading.Tasks.Task<ApiResponse<Object>> CreateUsersWithListInputAsyncWithHttpInfo (List<User> body);
System.Threading.Tasks.Task<ApiResponse<Object>> CreateUsersWithListInputAsyncWithHttpInfo (List<User> body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Delete user
/// </summary>
@ -277,8 +283,9 @@ namespace Org.OpenAPITools.Api
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="username">The name that needs to be deleted</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of void</returns>
System.Threading.Tasks.Task DeleteUserAsync (string username);
System.Threading.Tasks.Task DeleteUserAsync (string username, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Delete user
@ -287,9 +294,10 @@ namespace Org.OpenAPITools.Api
/// This can only be done by the logged in user.
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="username">The name that needs to be deleted</param>
/// <param name="username">The name that needs to be deleted</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse</returns>
System.Threading.Tasks.Task<ApiResponse<Object>> DeleteUserAsyncWithHttpInfo (string username);
System.Threading.Tasks.Task<ApiResponse<Object>> DeleteUserAsyncWithHttpInfo (string username, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Get user by user name
/// </summary>
@ -298,8 +306,9 @@ namespace Org.OpenAPITools.Api
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="username">The name that needs to be fetched. Use user1 for testing.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of User</returns>
System.Threading.Tasks.Task<User> GetUserByNameAsync (string username);
System.Threading.Tasks.Task<User> GetUserByNameAsync (string username, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Get user by user name
@ -308,9 +317,10 @@ namespace Org.OpenAPITools.Api
///
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="username">The name that needs to be fetched. Use user1 for testing.</param>
/// <param name="username">The name that needs to be fetched. Use user1 for testing.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (User)</returns>
System.Threading.Tasks.Task<ApiResponse<User>> GetUserByNameAsyncWithHttpInfo (string username);
System.Threading.Tasks.Task<ApiResponse<User>> GetUserByNameAsyncWithHttpInfo (string username, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Logs user into the system
/// </summary>
@ -319,9 +329,11 @@ namespace Org.OpenAPITools.Api
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="username">The user name for login</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <param name="password">The password for login in clear text</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of string</returns>
System.Threading.Tasks.Task<string> LoginUserAsync (string username, string password);
System.Threading.Tasks.Task<string> LoginUserAsync (string username, string password, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Logs user into the system
@ -330,10 +342,12 @@ namespace Org.OpenAPITools.Api
///
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="username">The user name for login</param>
/// <param name="password">The password for login in clear text</param>
/// <param name="username">The user name for login</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <param name="password">The password for login in clear text</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (string)</returns>
System.Threading.Tasks.Task<ApiResponse<string>> LoginUserAsyncWithHttpInfo (string username, string password);
System.Threading.Tasks.Task<ApiResponse<string>> LoginUserAsyncWithHttpInfo (string username, string password, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Logs out current logged in user session
/// </summary>
@ -342,7 +356,7 @@ namespace Org.OpenAPITools.Api
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <returns>Task of void</returns>
System.Threading.Tasks.Task LogoutUserAsync ();
System.Threading.Tasks.Task LogoutUserAsync (System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Logs out current logged in user session
@ -352,7 +366,7 @@ namespace Org.OpenAPITools.Api
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <returns>Task of ApiResponse</returns>
System.Threading.Tasks.Task<ApiResponse<Object>> LogoutUserAsyncWithHttpInfo ();
System.Threading.Tasks.Task<ApiResponse<Object>> LogoutUserAsyncWithHttpInfo (System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Updated user
/// </summary>
@ -361,9 +375,11 @@ namespace Org.OpenAPITools.Api
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="username">name that need to be deleted</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <param name="body">Updated user object</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of void</returns>
System.Threading.Tasks.Task UpdateUserAsync (string username, User body);
System.Threading.Tasks.Task UpdateUserAsync (string username, User body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Updated user
@ -372,10 +388,12 @@ namespace Org.OpenAPITools.Api
/// This can only be done by the logged in user.
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="username">name that need to be deleted</param>
/// <param name="body">Updated user object</param>
/// <param name="username">name that need to be deleted</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <param name="body">Updated user object</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse</returns>
System.Threading.Tasks.Task<ApiResponse<Object>> UpdateUserAsyncWithHttpInfo (string username, User body);
System.Threading.Tasks.Task<ApiResponse<Object>> UpdateUserAsyncWithHttpInfo (string username, User body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
#endregion Asynchronous Operations
}
@ -553,11 +571,12 @@ namespace Org.OpenAPITools.Api
/// Create user This can only be done by the logged in user.
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">Created user object</param>
/// <param name="body">Created user object</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of void</returns>
public async System.Threading.Tasks.Task CreateUserAsync (User body)
public async System.Threading.Tasks.Task CreateUserAsync (User body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
await CreateUserAsyncWithHttpInfo(body);
await CreateUserAsyncWithHttpInfo(body, cancellationToken);
}
@ -565,9 +584,10 @@ namespace Org.OpenAPITools.Api
/// Create user This can only be done by the logged in user.
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">Created user object</param>
/// <param name="body">Created user object</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse</returns>
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Object>> CreateUserAsyncWithHttpInfo (User body)
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Object>> CreateUserAsyncWithHttpInfo (User body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
// verify the required parameter 'body' is set
if (body == null)
@ -595,7 +615,7 @@ namespace Org.OpenAPITools.Api
// make the HTTP request
var localVarResponse = await this.AsynchronousClient.PostAsync<Object>("/user", localVarRequestOptions, this.Configuration);
var localVarResponse = await this.AsynchronousClient.PostAsync<Object>("/user", localVarRequestOptions, this.Configuration, cancellationToken);
if (this.ExceptionFactory != null)
{
@ -663,11 +683,12 @@ namespace Org.OpenAPITools.Api
/// Creates list of users with given input array
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">List of user object</param>
/// <param name="body">List of user object</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of void</returns>
public async System.Threading.Tasks.Task CreateUsersWithArrayInputAsync (List<User> body)
public async System.Threading.Tasks.Task CreateUsersWithArrayInputAsync (List<User> body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
await CreateUsersWithArrayInputAsyncWithHttpInfo(body);
await CreateUsersWithArrayInputAsyncWithHttpInfo(body, cancellationToken);
}
@ -675,9 +696,10 @@ namespace Org.OpenAPITools.Api
/// Creates list of users with given input array
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">List of user object</param>
/// <param name="body">List of user object</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse</returns>
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Object>> CreateUsersWithArrayInputAsyncWithHttpInfo (List<User> body)
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Object>> CreateUsersWithArrayInputAsyncWithHttpInfo (List<User> body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
// verify the required parameter 'body' is set
if (body == null)
@ -705,7 +727,7 @@ namespace Org.OpenAPITools.Api
// make the HTTP request
var localVarResponse = await this.AsynchronousClient.PostAsync<Object>("/user/createWithArray", localVarRequestOptions, this.Configuration);
var localVarResponse = await this.AsynchronousClient.PostAsync<Object>("/user/createWithArray", localVarRequestOptions, this.Configuration, cancellationToken);
if (this.ExceptionFactory != null)
{
@ -773,11 +795,12 @@ namespace Org.OpenAPITools.Api
/// Creates list of users with given input array
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">List of user object</param>
/// <param name="body">List of user object</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of void</returns>
public async System.Threading.Tasks.Task CreateUsersWithListInputAsync (List<User> body)
public async System.Threading.Tasks.Task CreateUsersWithListInputAsync (List<User> body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
await CreateUsersWithListInputAsyncWithHttpInfo(body);
await CreateUsersWithListInputAsyncWithHttpInfo(body, cancellationToken);
}
@ -785,9 +808,10 @@ namespace Org.OpenAPITools.Api
/// Creates list of users with given input array
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">List of user object</param>
/// <param name="body">List of user object</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse</returns>
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Object>> CreateUsersWithListInputAsyncWithHttpInfo (List<User> body)
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Object>> CreateUsersWithListInputAsyncWithHttpInfo (List<User> body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
// verify the required parameter 'body' is set
if (body == null)
@ -815,7 +839,7 @@ namespace Org.OpenAPITools.Api
// make the HTTP request
var localVarResponse = await this.AsynchronousClient.PostAsync<Object>("/user/createWithList", localVarRequestOptions, this.Configuration);
var localVarResponse = await this.AsynchronousClient.PostAsync<Object>("/user/createWithList", localVarRequestOptions, this.Configuration, cancellationToken);
if (this.ExceptionFactory != null)
{
@ -883,11 +907,12 @@ namespace Org.OpenAPITools.Api
/// Delete user This can only be done by the logged in user.
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="username">The name that needs to be deleted</param>
/// <param name="username">The name that needs to be deleted</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of void</returns>
public async System.Threading.Tasks.Task DeleteUserAsync (string username)
public async System.Threading.Tasks.Task DeleteUserAsync (string username, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
await DeleteUserAsyncWithHttpInfo(username);
await DeleteUserAsyncWithHttpInfo(username, cancellationToken);
}
@ -895,9 +920,10 @@ namespace Org.OpenAPITools.Api
/// Delete user This can only be done by the logged in user.
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="username">The name that needs to be deleted</param>
/// <param name="username">The name that needs to be deleted</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse</returns>
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Object>> DeleteUserAsyncWithHttpInfo (string username)
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Object>> DeleteUserAsyncWithHttpInfo (string username, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
// verify the required parameter 'username' is set
if (username == null)
@ -925,7 +951,7 @@ namespace Org.OpenAPITools.Api
// make the HTTP request
var localVarResponse = await this.AsynchronousClient.DeleteAsync<Object>("/user/{username}", localVarRequestOptions, this.Configuration);
var localVarResponse = await this.AsynchronousClient.DeleteAsync<Object>("/user/{username}", localVarRequestOptions, this.Configuration, cancellationToken);
if (this.ExceptionFactory != null)
{
@ -996,11 +1022,12 @@ namespace Org.OpenAPITools.Api
/// Get user by user name
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="username">The name that needs to be fetched. Use user1 for testing.</param>
/// <param name="username">The name that needs to be fetched. Use user1 for testing.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of User</returns>
public async System.Threading.Tasks.Task<User> GetUserByNameAsync (string username)
public async System.Threading.Tasks.Task<User> GetUserByNameAsync (string username, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
Org.OpenAPITools.Client.ApiResponse<User> localVarResponse = await GetUserByNameAsyncWithHttpInfo(username);
Org.OpenAPITools.Client.ApiResponse<User> localVarResponse = await GetUserByNameAsyncWithHttpInfo(username, cancellationToken);
return localVarResponse.Data;
}
@ -1009,9 +1036,10 @@ namespace Org.OpenAPITools.Api
/// Get user by user name
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="username">The name that needs to be fetched. Use user1 for testing.</param>
/// <param name="username">The name that needs to be fetched. Use user1 for testing.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (User)</returns>
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<User>> GetUserByNameAsyncWithHttpInfo (string username)
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<User>> GetUserByNameAsyncWithHttpInfo (string username, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
// verify the required parameter 'username' is set
if (username == null)
@ -1041,7 +1069,7 @@ namespace Org.OpenAPITools.Api
// make the HTTP request
var localVarResponse = await this.AsynchronousClient.GetAsync<User>("/user/{username}", localVarRequestOptions, this.Configuration);
var localVarResponse = await this.AsynchronousClient.GetAsync<User>("/user/{username}", localVarRequestOptions, this.Configuration, cancellationToken);
if (this.ExceptionFactory != null)
{
@ -1119,12 +1147,14 @@ namespace Org.OpenAPITools.Api
/// Logs user into the system
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="username">The user name for login</param>
/// <param name="password">The password for login in clear text</param>
/// <param name="username">The user name for login</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <param name="password">The password for login in clear text</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of string</returns>
public async System.Threading.Tasks.Task<string> LoginUserAsync (string username, string password)
public async System.Threading.Tasks.Task<string> LoginUserAsync (string username, string password, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
Org.OpenAPITools.Client.ApiResponse<string> localVarResponse = await LoginUserAsyncWithHttpInfo(username, password);
Org.OpenAPITools.Client.ApiResponse<string> localVarResponse = await LoginUserAsyncWithHttpInfo(username, password, cancellationToken);
return localVarResponse.Data;
}
@ -1133,10 +1163,12 @@ namespace Org.OpenAPITools.Api
/// Logs user into the system
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="username">The user name for login</param>
/// <param name="password">The password for login in clear text</param>
/// <param name="username">The user name for login</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <param name="password">The password for login in clear text</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (string)</returns>
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<string>> LoginUserAsyncWithHttpInfo (string username, string password)
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<string>> LoginUserAsyncWithHttpInfo (string username, string password, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
// verify the required parameter 'username' is set
if (username == null)
@ -1171,7 +1203,7 @@ namespace Org.OpenAPITools.Api
// make the HTTP request
var localVarResponse = await this.AsynchronousClient.GetAsync<string>("/user/login", localVarRequestOptions, this.Configuration);
var localVarResponse = await this.AsynchronousClient.GetAsync<string>("/user/login", localVarRequestOptions, this.Configuration, cancellationToken);
if (this.ExceptionFactory != null)
{
@ -1233,9 +1265,9 @@ namespace Org.OpenAPITools.Api
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <returns>Task of void</returns>
public async System.Threading.Tasks.Task LogoutUserAsync ()
public async System.Threading.Tasks.Task LogoutUserAsync (System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
await LogoutUserAsyncWithHttpInfo();
await LogoutUserAsyncWithHttpInfo(cancellationToken);
}
@ -1244,7 +1276,7 @@ namespace Org.OpenAPITools.Api
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <returns>Task of ApiResponse</returns>
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Object>> LogoutUserAsyncWithHttpInfo ()
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Object>> LogoutUserAsyncWithHttpInfo (System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
@ -1267,7 +1299,7 @@ namespace Org.OpenAPITools.Api
// make the HTTP request
var localVarResponse = await this.AsynchronousClient.GetAsync<Object>("/user/logout", localVarRequestOptions, this.Configuration);
var localVarResponse = await this.AsynchronousClient.GetAsync<Object>("/user/logout", localVarRequestOptions, this.Configuration, cancellationToken);
if (this.ExceptionFactory != null)
{
@ -1342,12 +1374,14 @@ namespace Org.OpenAPITools.Api
/// Updated user This can only be done by the logged in user.
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="username">name that need to be deleted</param>
/// <param name="body">Updated user object</param>
/// <param name="username">name that need to be deleted</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <param name="body">Updated user object</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of void</returns>
public async System.Threading.Tasks.Task UpdateUserAsync (string username, User body)
public async System.Threading.Tasks.Task UpdateUserAsync (string username, User body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
await UpdateUserAsyncWithHttpInfo(username, body);
await UpdateUserAsyncWithHttpInfo(username, body, cancellationToken);
}
@ -1355,10 +1389,12 @@ namespace Org.OpenAPITools.Api
/// Updated user This can only be done by the logged in user.
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="username">name that need to be deleted</param>
/// <param name="body">Updated user object</param>
/// <param name="username">name that need to be deleted</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <param name="body">Updated user object</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse</returns>
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Object>> UpdateUserAsyncWithHttpInfo (string username, User body)
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Object>> UpdateUserAsyncWithHttpInfo (string username, User body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
// verify the required parameter 'username' is set
if (username == null)
@ -1391,7 +1427,7 @@ namespace Org.OpenAPITools.Api
// make the HTTP request
var localVarResponse = await this.AsynchronousClient.PutAsync<Object>("/user/{username}", localVarRequestOptions, this.Configuration);
var localVarResponse = await this.AsynchronousClient.PutAsync<Object>("/user/{username}", localVarRequestOptions, this.Configuration, cancellationToken);
if (this.ExceptionFactory != null)
{

View File

@ -450,7 +450,7 @@ namespace Org.OpenAPITools.Client
return result;
}
private async Task<ApiResponse<T>> ExecAsync<T>(RestRequest req, IReadableConfiguration configuration)
private async Task<ApiResponse<T>> ExecAsync<T>(RestRequest req, IReadableConfiguration configuration, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
RestClient client = new RestClient(_baseUrl);
@ -481,7 +481,7 @@ namespace Org.OpenAPITools.Client
InterceptRequest(req);
var response = await client.ExecuteAsync<T>(req);
var response = await client.ExecuteAsync<T>(req, cancellationToken);
InterceptResponse(req, response);
@ -528,11 +528,12 @@ namespace Org.OpenAPITools.Client
/// <param name="options">The additional request options.</param>
/// <param name="configuration">A per-request configuration object. It is assumed that any merge with
/// GlobalConfiguration has been done before calling this method.</param>
/// <param name="cancellationToken">Token that enables callers to cancel the request.</param>
/// <returns>A Task containing ApiResponse</returns>
public Task<ApiResponse<T>> GetAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null)
public Task<ApiResponse<T>> GetAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
var config = configuration ?? GlobalConfiguration.Instance;
return ExecAsync<T>(NewRequest(HttpMethod.Get, path, options, config), config);
return ExecAsync<T>(NewRequest(HttpMethod.Get, path, options, config), config, cancellationToken);
}
/// <summary>
@ -542,11 +543,12 @@ namespace Org.OpenAPITools.Client
/// <param name="options">The additional request options.</param>
/// <param name="configuration">A per-request configuration object. It is assumed that any merge with
/// GlobalConfiguration has been done before calling this method.</param>
/// <param name="cancellationToken">Token that enables callers to cancel the request.</param>
/// <returns>A Task containing ApiResponse</returns>
public Task<ApiResponse<T>> PostAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null)
public Task<ApiResponse<T>> PostAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
var config = configuration ?? GlobalConfiguration.Instance;
return ExecAsync<T>(NewRequest(HttpMethod.Post, path, options, config), config);
return ExecAsync<T>(NewRequest(HttpMethod.Post, path, options, config), config, cancellationToken);
}
/// <summary>
@ -556,11 +558,12 @@ namespace Org.OpenAPITools.Client
/// <param name="options">The additional request options.</param>
/// <param name="configuration">A per-request configuration object. It is assumed that any merge with
/// GlobalConfiguration has been done before calling this method.</param>
/// <param name="cancellationToken">Token that enables callers to cancel the request.</param>
/// <returns>A Task containing ApiResponse</returns>
public Task<ApiResponse<T>> PutAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null)
public Task<ApiResponse<T>> PutAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
var config = configuration ?? GlobalConfiguration.Instance;
return ExecAsync<T>(NewRequest(HttpMethod.Put, path, options, config), config);
return ExecAsync<T>(NewRequest(HttpMethod.Put, path, options, config), config, cancellationToken);
}
/// <summary>
@ -570,11 +573,12 @@ namespace Org.OpenAPITools.Client
/// <param name="options">The additional request options.</param>
/// <param name="configuration">A per-request configuration object. It is assumed that any merge with
/// GlobalConfiguration has been done before calling this method.</param>
/// <param name="cancellationToken">Token that enables callers to cancel the request.</param>
/// <returns>A Task containing ApiResponse</returns>
public Task<ApiResponse<T>> DeleteAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null)
public Task<ApiResponse<T>> DeleteAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
var config = configuration ?? GlobalConfiguration.Instance;
return ExecAsync<T>(NewRequest(HttpMethod.Delete, path, options, config), config);
return ExecAsync<T>(NewRequest(HttpMethod.Delete, path, options, config), config, cancellationToken);
}
/// <summary>
@ -584,11 +588,12 @@ namespace Org.OpenAPITools.Client
/// <param name="options">The additional request options.</param>
/// <param name="configuration">A per-request configuration object. It is assumed that any merge with
/// GlobalConfiguration has been done before calling this method.</param>
/// <param name="cancellationToken">Token that enables callers to cancel the request.</param>
/// <returns>A Task containing ApiResponse</returns>
public Task<ApiResponse<T>> HeadAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null)
public Task<ApiResponse<T>> HeadAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
var config = configuration ?? GlobalConfiguration.Instance;
return ExecAsync<T>(NewRequest(HttpMethod.Head, path, options, config), config);
return ExecAsync<T>(NewRequest(HttpMethod.Head, path, options, config), config, cancellationToken);
}
/// <summary>
@ -598,11 +603,12 @@ namespace Org.OpenAPITools.Client
/// <param name="options">The additional request options.</param>
/// <param name="configuration">A per-request configuration object. It is assumed that any merge with
/// GlobalConfiguration has been done before calling this method.</param>
/// <param name="cancellationToken">Token that enables callers to cancel the request.</param>
/// <returns>A Task containing ApiResponse</returns>
public Task<ApiResponse<T>> OptionsAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null)
public Task<ApiResponse<T>> OptionsAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
var config = configuration ?? GlobalConfiguration.Instance;
return ExecAsync<T>(NewRequest(HttpMethod.Options, path, options, config), config);
return ExecAsync<T>(NewRequest(HttpMethod.Options, path, options, config), config, cancellationToken);
}
/// <summary>
@ -612,11 +618,12 @@ namespace Org.OpenAPITools.Client
/// <param name="options">The additional request options.</param>
/// <param name="configuration">A per-request configuration object. It is assumed that any merge with
/// GlobalConfiguration has been done before calling this method.</param>
/// <param name="cancellationToken">Token that enables callers to cancel the request.</param>
/// <returns>A Task containing ApiResponse</returns>
public Task<ApiResponse<T>> PatchAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null)
public Task<ApiResponse<T>> PatchAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
var config = configuration ?? GlobalConfiguration.Instance;
return ExecAsync<T>(NewRequest(HttpMethod.Patch, path, options, config), config);
return ExecAsync<T>(NewRequest(HttpMethod.Patch, path, options, config), config, cancellationToken);
}
#endregion IAsynchronousClient

View File

@ -28,9 +28,10 @@ namespace Org.OpenAPITools.Client
/// <param name="path">The relative path to invoke.</param>
/// <param name="options">The request parameters to pass along to the client.</param>
/// <param name="configuration">Per-request configurable settings.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <typeparam name="T">The return type.</typeparam>
/// <returns>A task eventually representing the response data, decorated with <see cref="ApiResponse{T}"/></returns>
Task<ApiResponse<T>> GetAsync<T>(String path, RequestOptions options, IReadableConfiguration configuration = null);
Task<ApiResponse<T>> GetAsync<T>(String path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Executes a non-blocking call to some <paramref name="path"/> using the POST http verb.
@ -38,9 +39,10 @@ namespace Org.OpenAPITools.Client
/// <param name="path">The relative path to invoke.</param>
/// <param name="options">The request parameters to pass along to the client.</param>
/// <param name="configuration">Per-request configurable settings.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <typeparam name="T">The return type.</typeparam>
/// <returns>A task eventually representing the response data, decorated with <see cref="ApiResponse{T}"/></returns>
Task<ApiResponse<T>> PostAsync<T>(String path, RequestOptions options, IReadableConfiguration configuration = null);
Task<ApiResponse<T>> PostAsync<T>(String path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Executes a non-blocking call to some <paramref name="path"/> using the PUT http verb.
@ -48,9 +50,10 @@ namespace Org.OpenAPITools.Client
/// <param name="path">The relative path to invoke.</param>
/// <param name="options">The request parameters to pass along to the client.</param>
/// <param name="configuration">Per-request configurable settings.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <typeparam name="T">The return type.</typeparam>
/// <returns>A task eventually representing the response data, decorated with <see cref="ApiResponse{T}"/></returns>
Task<ApiResponse<T>> PutAsync<T>(String path, RequestOptions options, IReadableConfiguration configuration = null);
Task<ApiResponse<T>> PutAsync<T>(String path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Executes a non-blocking call to some <paramref name="path"/> using the DELETE http verb.
@ -58,9 +61,10 @@ namespace Org.OpenAPITools.Client
/// <param name="path">The relative path to invoke.</param>
/// <param name="options">The request parameters to pass along to the client.</param>
/// <param name="configuration">Per-request configurable settings.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <typeparam name="T">The return type.</typeparam>
/// <returns>A task eventually representing the response data, decorated with <see cref="ApiResponse{T}"/></returns>
Task<ApiResponse<T>> DeleteAsync<T>(String path, RequestOptions options, IReadableConfiguration configuration = null);
Task<ApiResponse<T>> DeleteAsync<T>(String path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Executes a non-blocking call to some <paramref name="path"/> using the HEAD http verb.
@ -68,9 +72,10 @@ namespace Org.OpenAPITools.Client
/// <param name="path">The relative path to invoke.</param>
/// <param name="options">The request parameters to pass along to the client.</param>
/// <param name="configuration">Per-request configurable settings.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <typeparam name="T">The return type.</typeparam>
/// <returns>A task eventually representing the response data, decorated with <see cref="ApiResponse{T}"/></returns>
Task<ApiResponse<T>> HeadAsync<T>(String path, RequestOptions options, IReadableConfiguration configuration = null);
Task<ApiResponse<T>> HeadAsync<T>(String path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Executes a non-blocking call to some <paramref name="path"/> using the OPTIONS http verb.
@ -78,9 +83,10 @@ namespace Org.OpenAPITools.Client
/// <param name="path">The relative path to invoke.</param>
/// <param name="options">The request parameters to pass along to the client.</param>
/// <param name="configuration">Per-request configurable settings.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <typeparam name="T">The return type.</typeparam>
/// <returns>A task eventually representing the response data, decorated with <see cref="ApiResponse{T}"/></returns>
Task<ApiResponse<T>> OptionsAsync<T>(String path, RequestOptions options, IReadableConfiguration configuration = null);
Task<ApiResponse<T>> OptionsAsync<T>(String path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Executes a non-blocking call to some <paramref name="path"/> using the PATCH http verb.
@ -88,9 +94,10 @@ namespace Org.OpenAPITools.Client
/// <param name="path">The relative path to invoke.</param>
/// <param name="options">The request parameters to pass along to the client.</param>
/// <param name="configuration">Per-request configurable settings.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <typeparam name="T">The return type.</typeparam>
/// <returns>A task eventually representing the response data, decorated with <see cref="ApiResponse{T}"/></returns>
Task<ApiResponse<T>> PatchAsync<T>(String path, RequestOptions options, IReadableConfiguration configuration = null);
Task<ApiResponse<T>> PatchAsync<T>(String path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
}
}

View File

@ -65,8 +65,9 @@ namespace Org.OpenAPITools.Api
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">client model</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ModelClient</returns>
System.Threading.Tasks.Task<ModelClient> Call123TestSpecialTagsAsync (ModelClient body);
System.Threading.Tasks.Task<ModelClient> Call123TestSpecialTagsAsync (ModelClient body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// To test special tags
@ -75,9 +76,10 @@ namespace Org.OpenAPITools.Api
/// To test special tags and operation ID starting with number
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">client model</param>
/// <param name="body">client model</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (ModelClient)</returns>
System.Threading.Tasks.Task<ApiResponse<ModelClient>> Call123TestSpecialTagsAsyncWithHttpInfo (ModelClient body);
System.Threading.Tasks.Task<ApiResponse<ModelClient>> Call123TestSpecialTagsAsyncWithHttpInfo (ModelClient body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
#endregion Asynchronous Operations
}
@ -258,11 +260,12 @@ namespace Org.OpenAPITools.Api
/// To test special tags To test special tags and operation ID starting with number
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">client model</param>
/// <param name="body">client model</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ModelClient</returns>
public async System.Threading.Tasks.Task<ModelClient> Call123TestSpecialTagsAsync (ModelClient body)
public async System.Threading.Tasks.Task<ModelClient> Call123TestSpecialTagsAsync (ModelClient body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
Org.OpenAPITools.Client.ApiResponse<ModelClient> localVarResponse = await Call123TestSpecialTagsAsyncWithHttpInfo(body);
Org.OpenAPITools.Client.ApiResponse<ModelClient> localVarResponse = await Call123TestSpecialTagsAsyncWithHttpInfo(body, cancellationToken);
return localVarResponse.Data;
}
@ -271,9 +274,10 @@ namespace Org.OpenAPITools.Api
/// To test special tags To test special tags and operation ID starting with number
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">client model</param>
/// <param name="body">client model</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (ModelClient)</returns>
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<ModelClient>> Call123TestSpecialTagsAsyncWithHttpInfo (ModelClient body)
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<ModelClient>> Call123TestSpecialTagsAsyncWithHttpInfo (ModelClient body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
// verify the required parameter 'body' is set
if (body == null)
@ -303,7 +307,7 @@ namespace Org.OpenAPITools.Api
// make the HTTP request
var localVarResponse = await this.AsynchronousClient.PatchAsync<ModelClient>("/another-fake/dummy", localVarRequestOptions, this.Configuration);
var localVarResponse = await this.AsynchronousClient.PatchAsync<ModelClient>("/another-fake/dummy", localVarRequestOptions, this.Configuration, cancellationToken);
if (this.ExceptionFactory != null)
{

View File

@ -65,8 +65,9 @@ namespace Org.OpenAPITools.Api
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">client model</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ModelClient</returns>
System.Threading.Tasks.Task<ModelClient> TestClassnameAsync (ModelClient body);
System.Threading.Tasks.Task<ModelClient> TestClassnameAsync (ModelClient body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// To test class name in snake case
@ -75,9 +76,10 @@ namespace Org.OpenAPITools.Api
/// To test class name in snake case
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">client model</param>
/// <param name="body">client model</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (ModelClient)</returns>
System.Threading.Tasks.Task<ApiResponse<ModelClient>> TestClassnameAsyncWithHttpInfo (ModelClient body);
System.Threading.Tasks.Task<ApiResponse<ModelClient>> TestClassnameAsyncWithHttpInfo (ModelClient body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
#endregion Asynchronous Operations
}
@ -263,11 +265,12 @@ namespace Org.OpenAPITools.Api
/// To test class name in snake case To test class name in snake case
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">client model</param>
/// <param name="body">client model</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ModelClient</returns>
public async System.Threading.Tasks.Task<ModelClient> TestClassnameAsync (ModelClient body)
public async System.Threading.Tasks.Task<ModelClient> TestClassnameAsync (ModelClient body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
Org.OpenAPITools.Client.ApiResponse<ModelClient> localVarResponse = await TestClassnameAsyncWithHttpInfo(body);
Org.OpenAPITools.Client.ApiResponse<ModelClient> localVarResponse = await TestClassnameAsyncWithHttpInfo(body, cancellationToken);
return localVarResponse.Data;
}
@ -276,9 +279,10 @@ namespace Org.OpenAPITools.Api
/// To test class name in snake case To test class name in snake case
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">client model</param>
/// <param name="body">client model</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (ModelClient)</returns>
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<ModelClient>> TestClassnameAsyncWithHttpInfo (ModelClient body)
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<ModelClient>> TestClassnameAsyncWithHttpInfo (ModelClient body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
// verify the required parameter 'body' is set
if (body == null)
@ -313,7 +317,7 @@ namespace Org.OpenAPITools.Api
// make the HTTP request
var localVarResponse = await this.AsynchronousClient.PatchAsync<ModelClient>("/fake_classname_test", localVarRequestOptions, this.Configuration);
var localVarResponse = await this.AsynchronousClient.PatchAsync<ModelClient>("/fake_classname_test", localVarRequestOptions, this.Configuration, cancellationToken);
if (this.ExceptionFactory != null)
{

View File

@ -247,8 +247,9 @@ namespace Org.OpenAPITools.Api
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">Pet object that needs to be added to the store</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of void</returns>
System.Threading.Tasks.Task AddPetAsync (Pet body);
System.Threading.Tasks.Task AddPetAsync (Pet body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Add a new pet to the store
@ -257,9 +258,10 @@ namespace Org.OpenAPITools.Api
///
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">Pet object that needs to be added to the store</param>
/// <param name="body">Pet object that needs to be added to the store</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse</returns>
System.Threading.Tasks.Task<ApiResponse<Object>> AddPetAsyncWithHttpInfo (Pet body);
System.Threading.Tasks.Task<ApiResponse<Object>> AddPetAsyncWithHttpInfo (Pet body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Deletes a pet
/// </summary>
@ -268,9 +270,11 @@ namespace Org.OpenAPITools.Api
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="petId">Pet id to delete</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <param name="apiKey"> (optional)</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of void</returns>
System.Threading.Tasks.Task DeletePetAsync (long petId, string apiKey = default(string));
System.Threading.Tasks.Task DeletePetAsync (long petId, string apiKey = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Deletes a pet
@ -279,10 +283,12 @@ namespace Org.OpenAPITools.Api
///
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="petId">Pet id to delete</param>
/// <param name="apiKey"> (optional)</param>
/// <param name="petId">Pet id to delete</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <param name="apiKey"> (optional)</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse</returns>
System.Threading.Tasks.Task<ApiResponse<Object>> DeletePetAsyncWithHttpInfo (long petId, string apiKey = default(string));
System.Threading.Tasks.Task<ApiResponse<Object>> DeletePetAsyncWithHttpInfo (long petId, string apiKey = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Finds Pets by status
/// </summary>
@ -291,8 +297,9 @@ namespace Org.OpenAPITools.Api
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="status">Status values that need to be considered for filter</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of List&lt;Pet&gt;</returns>
System.Threading.Tasks.Task<List<Pet>> FindPetsByStatusAsync (List<string> status);
System.Threading.Tasks.Task<List<Pet>> FindPetsByStatusAsync (List<string> status, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Finds Pets by status
@ -301,9 +308,10 @@ namespace Org.OpenAPITools.Api
/// Multiple status values can be provided with comma separated strings
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="status">Status values that need to be considered for filter</param>
/// <param name="status">Status values that need to be considered for filter</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (List&lt;Pet&gt;)</returns>
System.Threading.Tasks.Task<ApiResponse<List<Pet>>> FindPetsByStatusAsyncWithHttpInfo (List<string> status);
System.Threading.Tasks.Task<ApiResponse<List<Pet>>> FindPetsByStatusAsyncWithHttpInfo (List<string> status, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Finds Pets by tags
/// </summary>
@ -312,8 +320,9 @@ namespace Org.OpenAPITools.Api
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="tags">Tags to filter by</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of List&lt;Pet&gt;</returns>
System.Threading.Tasks.Task<List<Pet>> FindPetsByTagsAsync (List<string> tags);
System.Threading.Tasks.Task<List<Pet>> FindPetsByTagsAsync (List<string> tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Finds Pets by tags
@ -322,9 +331,10 @@ namespace Org.OpenAPITools.Api
/// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="tags">Tags to filter by</param>
/// <param name="tags">Tags to filter by</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (List&lt;Pet&gt;)</returns>
System.Threading.Tasks.Task<ApiResponse<List<Pet>>> FindPetsByTagsAsyncWithHttpInfo (List<string> tags);
System.Threading.Tasks.Task<ApiResponse<List<Pet>>> FindPetsByTagsAsyncWithHttpInfo (List<string> tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Find pet by ID
/// </summary>
@ -333,8 +343,9 @@ namespace Org.OpenAPITools.Api
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="petId">ID of pet to return</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of Pet</returns>
System.Threading.Tasks.Task<Pet> GetPetByIdAsync (long petId);
System.Threading.Tasks.Task<Pet> GetPetByIdAsync (long petId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Find pet by ID
@ -343,9 +354,10 @@ namespace Org.OpenAPITools.Api
/// Returns a single pet
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="petId">ID of pet to return</param>
/// <param name="petId">ID of pet to return</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (Pet)</returns>
System.Threading.Tasks.Task<ApiResponse<Pet>> GetPetByIdAsyncWithHttpInfo (long petId);
System.Threading.Tasks.Task<ApiResponse<Pet>> GetPetByIdAsyncWithHttpInfo (long petId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Update an existing pet
/// </summary>
@ -354,8 +366,9 @@ namespace Org.OpenAPITools.Api
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">Pet object that needs to be added to the store</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of void</returns>
System.Threading.Tasks.Task UpdatePetAsync (Pet body);
System.Threading.Tasks.Task UpdatePetAsync (Pet body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Update an existing pet
@ -364,9 +377,10 @@ namespace Org.OpenAPITools.Api
///
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">Pet object that needs to be added to the store</param>
/// <param name="body">Pet object that needs to be added to the store</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse</returns>
System.Threading.Tasks.Task<ApiResponse<Object>> UpdatePetAsyncWithHttpInfo (Pet body);
System.Threading.Tasks.Task<ApiResponse<Object>> UpdatePetAsyncWithHttpInfo (Pet body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Updates a pet in the store with form data
/// </summary>
@ -375,10 +389,13 @@ namespace Org.OpenAPITools.Api
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="petId">ID of pet that needs to be updated</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <param name="name">Updated name of the pet (optional)</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <param name="status">Updated status of the pet (optional)</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of void</returns>
System.Threading.Tasks.Task UpdatePetWithFormAsync (long petId, string name = default(string), string status = default(string));
System.Threading.Tasks.Task UpdatePetWithFormAsync (long petId, string name = default(string), string status = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Updates a pet in the store with form data
@ -387,11 +404,14 @@ namespace Org.OpenAPITools.Api
///
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="petId">ID of pet that needs to be updated</param>
/// <param name="name">Updated name of the pet (optional)</param>
/// <param name="status">Updated status of the pet (optional)</param>
/// <param name="petId">ID of pet that needs to be updated</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <param name="name">Updated name of the pet (optional)</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <param name="status">Updated status of the pet (optional)</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse</returns>
System.Threading.Tasks.Task<ApiResponse<Object>> UpdatePetWithFormAsyncWithHttpInfo (long petId, string name = default(string), string status = default(string));
System.Threading.Tasks.Task<ApiResponse<Object>> UpdatePetWithFormAsyncWithHttpInfo (long petId, string name = default(string), string status = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// uploads an image
/// </summary>
@ -400,10 +420,13 @@ namespace Org.OpenAPITools.Api
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="petId">ID of pet to update</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <param name="additionalMetadata">Additional data to pass to server (optional)</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <param name="file">file to upload (optional)</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse</returns>
System.Threading.Tasks.Task<ApiResponse> UploadFileAsync (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream));
System.Threading.Tasks.Task<ApiResponse> UploadFileAsync (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// uploads an image
@ -412,11 +435,14 @@ namespace Org.OpenAPITools.Api
///
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="petId">ID of pet to update</param>
/// <param name="additionalMetadata">Additional data to pass to server (optional)</param>
/// <param name="file">file to upload (optional)</param>
/// <param name="petId">ID of pet to update</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <param name="additionalMetadata">Additional data to pass to server (optional)</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <param name="file">file to upload (optional)</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (ApiResponse)</returns>
System.Threading.Tasks.Task<ApiResponse<ApiResponse>> UploadFileAsyncWithHttpInfo (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream));
System.Threading.Tasks.Task<ApiResponse<ApiResponse>> UploadFileAsyncWithHttpInfo (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// uploads an image (required)
/// </summary>
@ -425,10 +451,13 @@ namespace Org.OpenAPITools.Api
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="petId">ID of pet to update</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <param name="requiredFile">file to upload</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <param name="additionalMetadata">Additional data to pass to server (optional)</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse</returns>
System.Threading.Tasks.Task<ApiResponse> UploadFileWithRequiredFileAsync (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string));
System.Threading.Tasks.Task<ApiResponse> UploadFileWithRequiredFileAsync (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// uploads an image (required)
@ -437,11 +466,14 @@ namespace Org.OpenAPITools.Api
///
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="petId">ID of pet to update</param>
/// <param name="requiredFile">file to upload</param>
/// <param name="additionalMetadata">Additional data to pass to server (optional)</param>
/// <param name="petId">ID of pet to update</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <param name="requiredFile">file to upload</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <param name="additionalMetadata">Additional data to pass to server (optional)</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (ApiResponse)</returns>
System.Threading.Tasks.Task<ApiResponse<ApiResponse>> UploadFileWithRequiredFileAsyncWithHttpInfo (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string));
System.Threading.Tasks.Task<ApiResponse<ApiResponse>> UploadFileWithRequiredFileAsyncWithHttpInfo (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
#endregion Asynchronous Operations
}
@ -627,11 +659,12 @@ namespace Org.OpenAPITools.Api
/// Add a new pet to the store
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">Pet object that needs to be added to the store</param>
/// <param name="body">Pet object that needs to be added to the store</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of void</returns>
public async System.Threading.Tasks.Task AddPetAsync (Pet body)
public async System.Threading.Tasks.Task AddPetAsync (Pet body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
await AddPetAsyncWithHttpInfo(body);
await AddPetAsyncWithHttpInfo(body, cancellationToken);
}
@ -639,9 +672,10 @@ namespace Org.OpenAPITools.Api
/// Add a new pet to the store
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">Pet object that needs to be added to the store</param>
/// <param name="body">Pet object that needs to be added to the store</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse</returns>
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Object>> AddPetAsyncWithHttpInfo (Pet body)
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Object>> AddPetAsyncWithHttpInfo (Pet body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
// verify the required parameter 'body' is set
if (body == null)
@ -677,7 +711,7 @@ namespace Org.OpenAPITools.Api
// make the HTTP request
var localVarResponse = await this.AsynchronousClient.PostAsync<Object>("/pet", localVarRequestOptions, this.Configuration);
var localVarResponse = await this.AsynchronousClient.PostAsync<Object>("/pet", localVarRequestOptions, this.Configuration, cancellationToken);
if (this.ExceptionFactory != null)
{
@ -753,12 +787,14 @@ namespace Org.OpenAPITools.Api
/// Deletes a pet
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="petId">Pet id to delete</param>
/// <param name="apiKey"> (optional)</param>
/// <param name="petId">Pet id to delete</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <param name="apiKey"> (optional)</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of void</returns>
public async System.Threading.Tasks.Task DeletePetAsync (long petId, string apiKey = default(string))
public async System.Threading.Tasks.Task DeletePetAsync (long petId, string apiKey = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
await DeletePetAsyncWithHttpInfo(petId, apiKey);
await DeletePetAsyncWithHttpInfo(petId, apiKey, cancellationToken);
}
@ -766,10 +802,12 @@ namespace Org.OpenAPITools.Api
/// Deletes a pet
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="petId">Pet id to delete</param>
/// <param name="apiKey"> (optional)</param>
/// <param name="petId">Pet id to delete</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <param name="apiKey"> (optional)</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse</returns>
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Object>> DeletePetAsyncWithHttpInfo (long petId, string apiKey = default(string))
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Object>> DeletePetAsyncWithHttpInfo (long petId, string apiKey = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
@ -803,7 +841,7 @@ namespace Org.OpenAPITools.Api
// make the HTTP request
var localVarResponse = await this.AsynchronousClient.DeleteAsync<Object>("/pet/{petId}", localVarRequestOptions, this.Configuration);
var localVarResponse = await this.AsynchronousClient.DeleteAsync<Object>("/pet/{petId}", localVarRequestOptions, this.Configuration, cancellationToken);
if (this.ExceptionFactory != null)
{
@ -880,11 +918,12 @@ namespace Org.OpenAPITools.Api
/// Finds Pets by status Multiple status values can be provided with comma separated strings
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="status">Status values that need to be considered for filter</param>
/// <param name="status">Status values that need to be considered for filter</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of List&lt;Pet&gt;</returns>
public async System.Threading.Tasks.Task<List<Pet>> FindPetsByStatusAsync (List<string> status)
public async System.Threading.Tasks.Task<List<Pet>> FindPetsByStatusAsync (List<string> status, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
Org.OpenAPITools.Client.ApiResponse<List<Pet>> localVarResponse = await FindPetsByStatusAsyncWithHttpInfo(status);
Org.OpenAPITools.Client.ApiResponse<List<Pet>> localVarResponse = await FindPetsByStatusAsyncWithHttpInfo(status, cancellationToken);
return localVarResponse.Data;
}
@ -893,9 +932,10 @@ namespace Org.OpenAPITools.Api
/// Finds Pets by status Multiple status values can be provided with comma separated strings
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="status">Status values that need to be considered for filter</param>
/// <param name="status">Status values that need to be considered for filter</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (List&lt;Pet&gt;)</returns>
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<List<Pet>>> FindPetsByStatusAsyncWithHttpInfo (List<string> status)
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<List<Pet>>> FindPetsByStatusAsyncWithHttpInfo (List<string> status, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
// verify the required parameter 'status' is set
if (status == null)
@ -931,7 +971,7 @@ namespace Org.OpenAPITools.Api
// make the HTTP request
var localVarResponse = await this.AsynchronousClient.GetAsync<List<Pet>>("/pet/findByStatus", localVarRequestOptions, this.Configuration);
var localVarResponse = await this.AsynchronousClient.GetAsync<List<Pet>>("/pet/findByStatus", localVarRequestOptions, this.Configuration, cancellationToken);
if (this.ExceptionFactory != null)
{
@ -1008,11 +1048,12 @@ namespace Org.OpenAPITools.Api
/// Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="tags">Tags to filter by</param>
/// <param name="tags">Tags to filter by</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of List&lt;Pet&gt;</returns>
public async System.Threading.Tasks.Task<List<Pet>> FindPetsByTagsAsync (List<string> tags)
public async System.Threading.Tasks.Task<List<Pet>> FindPetsByTagsAsync (List<string> tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
Org.OpenAPITools.Client.ApiResponse<List<Pet>> localVarResponse = await FindPetsByTagsAsyncWithHttpInfo(tags);
Org.OpenAPITools.Client.ApiResponse<List<Pet>> localVarResponse = await FindPetsByTagsAsyncWithHttpInfo(tags, cancellationToken);
return localVarResponse.Data;
}
@ -1021,9 +1062,10 @@ namespace Org.OpenAPITools.Api
/// Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="tags">Tags to filter by</param>
/// <param name="tags">Tags to filter by</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (List&lt;Pet&gt;)</returns>
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<List<Pet>>> FindPetsByTagsAsyncWithHttpInfo (List<string> tags)
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<List<Pet>>> FindPetsByTagsAsyncWithHttpInfo (List<string> tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
// verify the required parameter 'tags' is set
if (tags == null)
@ -1059,7 +1101,7 @@ namespace Org.OpenAPITools.Api
// make the HTTP request
var localVarResponse = await this.AsynchronousClient.GetAsync<List<Pet>>("/pet/findByTags", localVarRequestOptions, this.Configuration);
var localVarResponse = await this.AsynchronousClient.GetAsync<List<Pet>>("/pet/findByTags", localVarRequestOptions, this.Configuration, cancellationToken);
if (this.ExceptionFactory != null)
{
@ -1131,11 +1173,12 @@ namespace Org.OpenAPITools.Api
/// Find pet by ID Returns a single pet
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="petId">ID of pet to return</param>
/// <param name="petId">ID of pet to return</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of Pet</returns>
public async System.Threading.Tasks.Task<Pet> GetPetByIdAsync (long petId)
public async System.Threading.Tasks.Task<Pet> GetPetByIdAsync (long petId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
Org.OpenAPITools.Client.ApiResponse<Pet> localVarResponse = await GetPetByIdAsyncWithHttpInfo(petId);
Org.OpenAPITools.Client.ApiResponse<Pet> localVarResponse = await GetPetByIdAsyncWithHttpInfo(petId, cancellationToken);
return localVarResponse.Data;
}
@ -1144,9 +1187,10 @@ namespace Org.OpenAPITools.Api
/// Find pet by ID Returns a single pet
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="petId">ID of pet to return</param>
/// <param name="petId">ID of pet to return</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (Pet)</returns>
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Pet>> GetPetByIdAsyncWithHttpInfo (long petId)
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Pet>> GetPetByIdAsyncWithHttpInfo (long petId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
@ -1177,7 +1221,7 @@ namespace Org.OpenAPITools.Api
// make the HTTP request
var localVarResponse = await this.AsynchronousClient.GetAsync<Pet>("/pet/{petId}", localVarRequestOptions, this.Configuration);
var localVarResponse = await this.AsynchronousClient.GetAsync<Pet>("/pet/{petId}", localVarRequestOptions, this.Configuration, cancellationToken);
if (this.ExceptionFactory != null)
{
@ -1253,11 +1297,12 @@ namespace Org.OpenAPITools.Api
/// Update an existing pet
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">Pet object that needs to be added to the store</param>
/// <param name="body">Pet object that needs to be added to the store</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of void</returns>
public async System.Threading.Tasks.Task UpdatePetAsync (Pet body)
public async System.Threading.Tasks.Task UpdatePetAsync (Pet body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
await UpdatePetAsyncWithHttpInfo(body);
await UpdatePetAsyncWithHttpInfo(body, cancellationToken);
}
@ -1265,9 +1310,10 @@ namespace Org.OpenAPITools.Api
/// Update an existing pet
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">Pet object that needs to be added to the store</param>
/// <param name="body">Pet object that needs to be added to the store</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse</returns>
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Object>> UpdatePetAsyncWithHttpInfo (Pet body)
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Object>> UpdatePetAsyncWithHttpInfo (Pet body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
// verify the required parameter 'body' is set
if (body == null)
@ -1303,7 +1349,7 @@ namespace Org.OpenAPITools.Api
// make the HTTP request
var localVarResponse = await this.AsynchronousClient.PutAsync<Object>("/pet", localVarRequestOptions, this.Configuration);
var localVarResponse = await this.AsynchronousClient.PutAsync<Object>("/pet", localVarRequestOptions, this.Configuration, cancellationToken);
if (this.ExceptionFactory != null)
{
@ -1386,13 +1432,16 @@ namespace Org.OpenAPITools.Api
/// Updates a pet in the store with form data
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="petId">ID of pet that needs to be updated</param>
/// <param name="name">Updated name of the pet (optional)</param>
/// <param name="status">Updated status of the pet (optional)</param>
/// <param name="petId">ID of pet that needs to be updated</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <param name="name">Updated name of the pet (optional)</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <param name="status">Updated status of the pet (optional)</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of void</returns>
public async System.Threading.Tasks.Task UpdatePetWithFormAsync (long petId, string name = default(string), string status = default(string))
public async System.Threading.Tasks.Task UpdatePetWithFormAsync (long petId, string name = default(string), string status = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
await UpdatePetWithFormAsyncWithHttpInfo(petId, name, status);
await UpdatePetWithFormAsyncWithHttpInfo(petId, name, status, cancellationToken);
}
@ -1400,11 +1449,14 @@ namespace Org.OpenAPITools.Api
/// Updates a pet in the store with form data
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="petId">ID of pet that needs to be updated</param>
/// <param name="name">Updated name of the pet (optional)</param>
/// <param name="status">Updated status of the pet (optional)</param>
/// <param name="petId">ID of pet that needs to be updated</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <param name="name">Updated name of the pet (optional)</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <param name="status">Updated status of the pet (optional)</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse</returns>
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Object>> UpdatePetWithFormAsyncWithHttpInfo (long petId, string name = default(string), string status = default(string))
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Object>> UpdatePetWithFormAsyncWithHttpInfo (long petId, string name = default(string), string status = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
@ -1443,7 +1495,7 @@ namespace Org.OpenAPITools.Api
// make the HTTP request
var localVarResponse = await this.AsynchronousClient.PostAsync<Object>("/pet/{petId}", localVarRequestOptions, this.Configuration);
var localVarResponse = await this.AsynchronousClient.PostAsync<Object>("/pet/{petId}", localVarRequestOptions, this.Configuration, cancellationToken);
if (this.ExceptionFactory != null)
{
@ -1528,13 +1580,16 @@ namespace Org.OpenAPITools.Api
/// uploads an image
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="petId">ID of pet to update</param>
/// <param name="additionalMetadata">Additional data to pass to server (optional)</param>
/// <param name="file">file to upload (optional)</param>
/// <param name="petId">ID of pet to update</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <param name="additionalMetadata">Additional data to pass to server (optional)</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <param name="file">file to upload (optional)</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse</returns>
public async System.Threading.Tasks.Task<ApiResponse> UploadFileAsync (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream))
public async System.Threading.Tasks.Task<ApiResponse> UploadFileAsync (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
Org.OpenAPITools.Client.ApiResponse<ApiResponse> localVarResponse = await UploadFileAsyncWithHttpInfo(petId, additionalMetadata, file);
Org.OpenAPITools.Client.ApiResponse<ApiResponse> localVarResponse = await UploadFileAsyncWithHttpInfo(petId, additionalMetadata, file, cancellationToken);
return localVarResponse.Data;
}
@ -1543,11 +1598,14 @@ namespace Org.OpenAPITools.Api
/// uploads an image
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="petId">ID of pet to update</param>
/// <param name="additionalMetadata">Additional data to pass to server (optional)</param>
/// <param name="file">file to upload (optional)</param>
/// <param name="petId">ID of pet to update</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <param name="additionalMetadata">Additional data to pass to server (optional)</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <param name="file">file to upload (optional)</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (ApiResponse)</returns>
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<ApiResponse>> UploadFileAsyncWithHttpInfo (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream))
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<ApiResponse>> UploadFileAsyncWithHttpInfo (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
@ -1587,7 +1645,7 @@ namespace Org.OpenAPITools.Api
// make the HTTP request
var localVarResponse = await this.AsynchronousClient.PostAsync<ApiResponse>("/pet/{petId}/uploadImage", localVarRequestOptions, this.Configuration);
var localVarResponse = await this.AsynchronousClient.PostAsync<ApiResponse>("/pet/{petId}/uploadImage", localVarRequestOptions, this.Configuration, cancellationToken);
if (this.ExceptionFactory != null)
{
@ -1673,13 +1731,16 @@ namespace Org.OpenAPITools.Api
/// uploads an image (required)
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="petId">ID of pet to update</param>
/// <param name="requiredFile">file to upload</param>
/// <param name="additionalMetadata">Additional data to pass to server (optional)</param>
/// <param name="petId">ID of pet to update</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <param name="requiredFile">file to upload</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <param name="additionalMetadata">Additional data to pass to server (optional)</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse</returns>
public async System.Threading.Tasks.Task<ApiResponse> UploadFileWithRequiredFileAsync (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string))
public async System.Threading.Tasks.Task<ApiResponse> UploadFileWithRequiredFileAsync (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
Org.OpenAPITools.Client.ApiResponse<ApiResponse> localVarResponse = await UploadFileWithRequiredFileAsyncWithHttpInfo(petId, requiredFile, additionalMetadata);
Org.OpenAPITools.Client.ApiResponse<ApiResponse> localVarResponse = await UploadFileWithRequiredFileAsyncWithHttpInfo(petId, requiredFile, additionalMetadata, cancellationToken);
return localVarResponse.Data;
}
@ -1688,11 +1749,14 @@ namespace Org.OpenAPITools.Api
/// uploads an image (required)
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="petId">ID of pet to update</param>
/// <param name="requiredFile">file to upload</param>
/// <param name="additionalMetadata">Additional data to pass to server (optional)</param>
/// <param name="petId">ID of pet to update</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <param name="requiredFile">file to upload</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <param name="additionalMetadata">Additional data to pass to server (optional)</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (ApiResponse)</returns>
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<ApiResponse>> UploadFileWithRequiredFileAsyncWithHttpInfo (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string))
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<ApiResponse>> UploadFileWithRequiredFileAsyncWithHttpInfo (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
// verify the required parameter 'requiredFile' is set
if (requiredFile == null)
@ -1733,7 +1797,7 @@ namespace Org.OpenAPITools.Api
// make the HTTP request
var localVarResponse = await this.AsynchronousClient.PostAsync<ApiResponse>("/fake/{petId}/uploadImageWithRequiredFile", localVarRequestOptions, this.Configuration);
var localVarResponse = await this.AsynchronousClient.PostAsync<ApiResponse>("/fake/{petId}/uploadImageWithRequiredFile", localVarRequestOptions, this.Configuration, cancellationToken);
if (this.ExceptionFactory != null)
{

View File

@ -126,8 +126,9 @@ namespace Org.OpenAPITools.Api
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="orderId">ID of the order that needs to be deleted</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of void</returns>
System.Threading.Tasks.Task DeleteOrderAsync (string orderId);
System.Threading.Tasks.Task DeleteOrderAsync (string orderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Delete purchase order by ID
@ -136,9 +137,10 @@ namespace Org.OpenAPITools.Api
/// For valid response try integer IDs with value &lt; 1000. Anything above 1000 or nonintegers will generate API errors
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="orderId">ID of the order that needs to be deleted</param>
/// <param name="orderId">ID of the order that needs to be deleted</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse</returns>
System.Threading.Tasks.Task<ApiResponse<Object>> DeleteOrderAsyncWithHttpInfo (string orderId);
System.Threading.Tasks.Task<ApiResponse<Object>> DeleteOrderAsyncWithHttpInfo (string orderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Returns pet inventories by status
/// </summary>
@ -147,7 +149,7 @@ namespace Org.OpenAPITools.Api
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <returns>Task of Dictionary&lt;string, int&gt;</returns>
System.Threading.Tasks.Task<Dictionary<string, int>> GetInventoryAsync ();
System.Threading.Tasks.Task<Dictionary<string, int>> GetInventoryAsync (System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Returns pet inventories by status
@ -157,7 +159,7 @@ namespace Org.OpenAPITools.Api
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <returns>Task of ApiResponse (Dictionary&lt;string, int&gt;)</returns>
System.Threading.Tasks.Task<ApiResponse<Dictionary<string, int>>> GetInventoryAsyncWithHttpInfo ();
System.Threading.Tasks.Task<ApiResponse<Dictionary<string, int>>> GetInventoryAsyncWithHttpInfo (System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Find purchase order by ID
/// </summary>
@ -166,8 +168,9 @@ namespace Org.OpenAPITools.Api
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="orderId">ID of pet that needs to be fetched</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of Order</returns>
System.Threading.Tasks.Task<Order> GetOrderByIdAsync (long orderId);
System.Threading.Tasks.Task<Order> GetOrderByIdAsync (long orderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Find purchase order by ID
@ -176,9 +179,10 @@ namespace Org.OpenAPITools.Api
/// For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other values will generated exceptions
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="orderId">ID of pet that needs to be fetched</param>
/// <param name="orderId">ID of pet that needs to be fetched</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (Order)</returns>
System.Threading.Tasks.Task<ApiResponse<Order>> GetOrderByIdAsyncWithHttpInfo (long orderId);
System.Threading.Tasks.Task<ApiResponse<Order>> GetOrderByIdAsyncWithHttpInfo (long orderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Place an order for a pet
/// </summary>
@ -187,8 +191,9 @@ namespace Org.OpenAPITools.Api
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">order placed for purchasing the pet</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of Order</returns>
System.Threading.Tasks.Task<Order> PlaceOrderAsync (Order body);
System.Threading.Tasks.Task<Order> PlaceOrderAsync (Order body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Place an order for a pet
@ -197,9 +202,10 @@ namespace Org.OpenAPITools.Api
///
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">order placed for purchasing the pet</param>
/// <param name="body">order placed for purchasing the pet</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (Order)</returns>
System.Threading.Tasks.Task<ApiResponse<Order>> PlaceOrderAsyncWithHttpInfo (Order body);
System.Threading.Tasks.Task<ApiResponse<Order>> PlaceOrderAsyncWithHttpInfo (Order body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
#endregion Asynchronous Operations
}
@ -377,11 +383,12 @@ namespace Org.OpenAPITools.Api
/// Delete purchase order by ID For valid response try integer IDs with value &lt; 1000. Anything above 1000 or nonintegers will generate API errors
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="orderId">ID of the order that needs to be deleted</param>
/// <param name="orderId">ID of the order that needs to be deleted</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of void</returns>
public async System.Threading.Tasks.Task DeleteOrderAsync (string orderId)
public async System.Threading.Tasks.Task DeleteOrderAsync (string orderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
await DeleteOrderAsyncWithHttpInfo(orderId);
await DeleteOrderAsyncWithHttpInfo(orderId, cancellationToken);
}
@ -389,9 +396,10 @@ namespace Org.OpenAPITools.Api
/// Delete purchase order by ID For valid response try integer IDs with value &lt; 1000. Anything above 1000 or nonintegers will generate API errors
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="orderId">ID of the order that needs to be deleted</param>
/// <param name="orderId">ID of the order that needs to be deleted</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse</returns>
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Object>> DeleteOrderAsyncWithHttpInfo (string orderId)
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Object>> DeleteOrderAsyncWithHttpInfo (string orderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
// verify the required parameter 'orderId' is set
if (orderId == null)
@ -419,7 +427,7 @@ namespace Org.OpenAPITools.Api
// make the HTTP request
var localVarResponse = await this.AsynchronousClient.DeleteAsync<Object>("/store/order/{order_id}", localVarRequestOptions, this.Configuration);
var localVarResponse = await this.AsynchronousClient.DeleteAsync<Object>("/store/order/{order_id}", localVarRequestOptions, this.Configuration, cancellationToken);
if (this.ExceptionFactory != null)
{
@ -488,9 +496,9 @@ namespace Org.OpenAPITools.Api
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <returns>Task of Dictionary&lt;string, int&gt;</returns>
public async System.Threading.Tasks.Task<Dictionary<string, int>> GetInventoryAsync ()
public async System.Threading.Tasks.Task<Dictionary<string, int>> GetInventoryAsync (System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
Org.OpenAPITools.Client.ApiResponse<Dictionary<string, int>> localVarResponse = await GetInventoryAsyncWithHttpInfo();
Org.OpenAPITools.Client.ApiResponse<Dictionary<string, int>> localVarResponse = await GetInventoryAsyncWithHttpInfo(cancellationToken);
return localVarResponse.Data;
}
@ -500,7 +508,7 @@ namespace Org.OpenAPITools.Api
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <returns>Task of ApiResponse (Dictionary&lt;string, int&gt;)</returns>
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Dictionary<string, int>>> GetInventoryAsyncWithHttpInfo ()
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Dictionary<string, int>>> GetInventoryAsyncWithHttpInfo (System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
@ -529,7 +537,7 @@ namespace Org.OpenAPITools.Api
// make the HTTP request
var localVarResponse = await this.AsynchronousClient.GetAsync<Dictionary<string, int>>("/store/inventory", localVarRequestOptions, this.Configuration);
var localVarResponse = await this.AsynchronousClient.GetAsync<Dictionary<string, int>>("/store/inventory", localVarRequestOptions, this.Configuration, cancellationToken);
if (this.ExceptionFactory != null)
{
@ -596,11 +604,12 @@ namespace Org.OpenAPITools.Api
/// Find purchase order by ID For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other values will generated exceptions
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="orderId">ID of pet that needs to be fetched</param>
/// <param name="orderId">ID of pet that needs to be fetched</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of Order</returns>
public async System.Threading.Tasks.Task<Order> GetOrderByIdAsync (long orderId)
public async System.Threading.Tasks.Task<Order> GetOrderByIdAsync (long orderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
Org.OpenAPITools.Client.ApiResponse<Order> localVarResponse = await GetOrderByIdAsyncWithHttpInfo(orderId);
Org.OpenAPITools.Client.ApiResponse<Order> localVarResponse = await GetOrderByIdAsyncWithHttpInfo(orderId, cancellationToken);
return localVarResponse.Data;
}
@ -609,9 +618,10 @@ namespace Org.OpenAPITools.Api
/// Find purchase order by ID For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other values will generated exceptions
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="orderId">ID of pet that needs to be fetched</param>
/// <param name="orderId">ID of pet that needs to be fetched</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (Order)</returns>
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Order>> GetOrderByIdAsyncWithHttpInfo (long orderId)
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Order>> GetOrderByIdAsyncWithHttpInfo (long orderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
@ -637,7 +647,7 @@ namespace Org.OpenAPITools.Api
// make the HTTP request
var localVarResponse = await this.AsynchronousClient.GetAsync<Order>("/store/order/{order_id}", localVarRequestOptions, this.Configuration);
var localVarResponse = await this.AsynchronousClient.GetAsync<Order>("/store/order/{order_id}", localVarRequestOptions, this.Configuration, cancellationToken);
if (this.ExceptionFactory != null)
{
@ -708,11 +718,12 @@ namespace Org.OpenAPITools.Api
/// Place an order for a pet
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">order placed for purchasing the pet</param>
/// <param name="body">order placed for purchasing the pet</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of Order</returns>
public async System.Threading.Tasks.Task<Order> PlaceOrderAsync (Order body)
public async System.Threading.Tasks.Task<Order> PlaceOrderAsync (Order body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
Org.OpenAPITools.Client.ApiResponse<Order> localVarResponse = await PlaceOrderAsyncWithHttpInfo(body);
Org.OpenAPITools.Client.ApiResponse<Order> localVarResponse = await PlaceOrderAsyncWithHttpInfo(body, cancellationToken);
return localVarResponse.Data;
}
@ -721,9 +732,10 @@ namespace Org.OpenAPITools.Api
/// Place an order for a pet
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">order placed for purchasing the pet</param>
/// <param name="body">order placed for purchasing the pet</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (Order)</returns>
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Order>> PlaceOrderAsyncWithHttpInfo (Order body)
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Order>> PlaceOrderAsyncWithHttpInfo (Order body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
// verify the required parameter 'body' is set
if (body == null)
@ -753,7 +765,7 @@ namespace Org.OpenAPITools.Api
// make the HTTP request
var localVarResponse = await this.AsynchronousClient.PostAsync<Order>("/store/order", localVarRequestOptions, this.Configuration);
var localVarResponse = await this.AsynchronousClient.PostAsync<Order>("/store/order", localVarRequestOptions, this.Configuration, cancellationToken);
if (this.ExceptionFactory != null)
{

View File

@ -214,8 +214,9 @@ namespace Org.OpenAPITools.Api
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">Created user object</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of void</returns>
System.Threading.Tasks.Task CreateUserAsync (User body);
System.Threading.Tasks.Task CreateUserAsync (User body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Create user
@ -224,9 +225,10 @@ namespace Org.OpenAPITools.Api
/// This can only be done by the logged in user.
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">Created user object</param>
/// <param name="body">Created user object</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse</returns>
System.Threading.Tasks.Task<ApiResponse<Object>> CreateUserAsyncWithHttpInfo (User body);
System.Threading.Tasks.Task<ApiResponse<Object>> CreateUserAsyncWithHttpInfo (User body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Creates list of users with given input array
/// </summary>
@ -235,8 +237,9 @@ namespace Org.OpenAPITools.Api
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">List of user object</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of void</returns>
System.Threading.Tasks.Task CreateUsersWithArrayInputAsync (List<User> body);
System.Threading.Tasks.Task CreateUsersWithArrayInputAsync (List<User> body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Creates list of users with given input array
@ -245,9 +248,10 @@ namespace Org.OpenAPITools.Api
///
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">List of user object</param>
/// <param name="body">List of user object</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse</returns>
System.Threading.Tasks.Task<ApiResponse<Object>> CreateUsersWithArrayInputAsyncWithHttpInfo (List<User> body);
System.Threading.Tasks.Task<ApiResponse<Object>> CreateUsersWithArrayInputAsyncWithHttpInfo (List<User> body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Creates list of users with given input array
/// </summary>
@ -256,8 +260,9 @@ namespace Org.OpenAPITools.Api
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">List of user object</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of void</returns>
System.Threading.Tasks.Task CreateUsersWithListInputAsync (List<User> body);
System.Threading.Tasks.Task CreateUsersWithListInputAsync (List<User> body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Creates list of users with given input array
@ -266,9 +271,10 @@ namespace Org.OpenAPITools.Api
///
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">List of user object</param>
/// <param name="body">List of user object</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse</returns>
System.Threading.Tasks.Task<ApiResponse<Object>> CreateUsersWithListInputAsyncWithHttpInfo (List<User> body);
System.Threading.Tasks.Task<ApiResponse<Object>> CreateUsersWithListInputAsyncWithHttpInfo (List<User> body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Delete user
/// </summary>
@ -277,8 +283,9 @@ namespace Org.OpenAPITools.Api
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="username">The name that needs to be deleted</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of void</returns>
System.Threading.Tasks.Task DeleteUserAsync (string username);
System.Threading.Tasks.Task DeleteUserAsync (string username, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Delete user
@ -287,9 +294,10 @@ namespace Org.OpenAPITools.Api
/// This can only be done by the logged in user.
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="username">The name that needs to be deleted</param>
/// <param name="username">The name that needs to be deleted</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse</returns>
System.Threading.Tasks.Task<ApiResponse<Object>> DeleteUserAsyncWithHttpInfo (string username);
System.Threading.Tasks.Task<ApiResponse<Object>> DeleteUserAsyncWithHttpInfo (string username, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Get user by user name
/// </summary>
@ -298,8 +306,9 @@ namespace Org.OpenAPITools.Api
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="username">The name that needs to be fetched. Use user1 for testing.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of User</returns>
System.Threading.Tasks.Task<User> GetUserByNameAsync (string username);
System.Threading.Tasks.Task<User> GetUserByNameAsync (string username, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Get user by user name
@ -308,9 +317,10 @@ namespace Org.OpenAPITools.Api
///
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="username">The name that needs to be fetched. Use user1 for testing.</param>
/// <param name="username">The name that needs to be fetched. Use user1 for testing.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (User)</returns>
System.Threading.Tasks.Task<ApiResponse<User>> GetUserByNameAsyncWithHttpInfo (string username);
System.Threading.Tasks.Task<ApiResponse<User>> GetUserByNameAsyncWithHttpInfo (string username, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Logs user into the system
/// </summary>
@ -319,9 +329,11 @@ namespace Org.OpenAPITools.Api
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="username">The user name for login</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <param name="password">The password for login in clear text</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of string</returns>
System.Threading.Tasks.Task<string> LoginUserAsync (string username, string password);
System.Threading.Tasks.Task<string> LoginUserAsync (string username, string password, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Logs user into the system
@ -330,10 +342,12 @@ namespace Org.OpenAPITools.Api
///
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="username">The user name for login</param>
/// <param name="password">The password for login in clear text</param>
/// <param name="username">The user name for login</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <param name="password">The password for login in clear text</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (string)</returns>
System.Threading.Tasks.Task<ApiResponse<string>> LoginUserAsyncWithHttpInfo (string username, string password);
System.Threading.Tasks.Task<ApiResponse<string>> LoginUserAsyncWithHttpInfo (string username, string password, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Logs out current logged in user session
/// </summary>
@ -342,7 +356,7 @@ namespace Org.OpenAPITools.Api
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <returns>Task of void</returns>
System.Threading.Tasks.Task LogoutUserAsync ();
System.Threading.Tasks.Task LogoutUserAsync (System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Logs out current logged in user session
@ -352,7 +366,7 @@ namespace Org.OpenAPITools.Api
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <returns>Task of ApiResponse</returns>
System.Threading.Tasks.Task<ApiResponse<Object>> LogoutUserAsyncWithHttpInfo ();
System.Threading.Tasks.Task<ApiResponse<Object>> LogoutUserAsyncWithHttpInfo (System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Updated user
/// </summary>
@ -361,9 +375,11 @@ namespace Org.OpenAPITools.Api
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="username">name that need to be deleted</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <param name="body">Updated user object</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of void</returns>
System.Threading.Tasks.Task UpdateUserAsync (string username, User body);
System.Threading.Tasks.Task UpdateUserAsync (string username, User body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Updated user
@ -372,10 +388,12 @@ namespace Org.OpenAPITools.Api
/// This can only be done by the logged in user.
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="username">name that need to be deleted</param>
/// <param name="body">Updated user object</param>
/// <param name="username">name that need to be deleted</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <param name="body">Updated user object</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse</returns>
System.Threading.Tasks.Task<ApiResponse<Object>> UpdateUserAsyncWithHttpInfo (string username, User body);
System.Threading.Tasks.Task<ApiResponse<Object>> UpdateUserAsyncWithHttpInfo (string username, User body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
#endregion Asynchronous Operations
}
@ -553,11 +571,12 @@ namespace Org.OpenAPITools.Api
/// Create user This can only be done by the logged in user.
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">Created user object</param>
/// <param name="body">Created user object</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of void</returns>
public async System.Threading.Tasks.Task CreateUserAsync (User body)
public async System.Threading.Tasks.Task CreateUserAsync (User body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
await CreateUserAsyncWithHttpInfo(body);
await CreateUserAsyncWithHttpInfo(body, cancellationToken);
}
@ -565,9 +584,10 @@ namespace Org.OpenAPITools.Api
/// Create user This can only be done by the logged in user.
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">Created user object</param>
/// <param name="body">Created user object</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse</returns>
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Object>> CreateUserAsyncWithHttpInfo (User body)
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Object>> CreateUserAsyncWithHttpInfo (User body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
// verify the required parameter 'body' is set
if (body == null)
@ -595,7 +615,7 @@ namespace Org.OpenAPITools.Api
// make the HTTP request
var localVarResponse = await this.AsynchronousClient.PostAsync<Object>("/user", localVarRequestOptions, this.Configuration);
var localVarResponse = await this.AsynchronousClient.PostAsync<Object>("/user", localVarRequestOptions, this.Configuration, cancellationToken);
if (this.ExceptionFactory != null)
{
@ -663,11 +683,12 @@ namespace Org.OpenAPITools.Api
/// Creates list of users with given input array
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">List of user object</param>
/// <param name="body">List of user object</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of void</returns>
public async System.Threading.Tasks.Task CreateUsersWithArrayInputAsync (List<User> body)
public async System.Threading.Tasks.Task CreateUsersWithArrayInputAsync (List<User> body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
await CreateUsersWithArrayInputAsyncWithHttpInfo(body);
await CreateUsersWithArrayInputAsyncWithHttpInfo(body, cancellationToken);
}
@ -675,9 +696,10 @@ namespace Org.OpenAPITools.Api
/// Creates list of users with given input array
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">List of user object</param>
/// <param name="body">List of user object</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse</returns>
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Object>> CreateUsersWithArrayInputAsyncWithHttpInfo (List<User> body)
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Object>> CreateUsersWithArrayInputAsyncWithHttpInfo (List<User> body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
// verify the required parameter 'body' is set
if (body == null)
@ -705,7 +727,7 @@ namespace Org.OpenAPITools.Api
// make the HTTP request
var localVarResponse = await this.AsynchronousClient.PostAsync<Object>("/user/createWithArray", localVarRequestOptions, this.Configuration);
var localVarResponse = await this.AsynchronousClient.PostAsync<Object>("/user/createWithArray", localVarRequestOptions, this.Configuration, cancellationToken);
if (this.ExceptionFactory != null)
{
@ -773,11 +795,12 @@ namespace Org.OpenAPITools.Api
/// Creates list of users with given input array
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">List of user object</param>
/// <param name="body">List of user object</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of void</returns>
public async System.Threading.Tasks.Task CreateUsersWithListInputAsync (List<User> body)
public async System.Threading.Tasks.Task CreateUsersWithListInputAsync (List<User> body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
await CreateUsersWithListInputAsyncWithHttpInfo(body);
await CreateUsersWithListInputAsyncWithHttpInfo(body, cancellationToken);
}
@ -785,9 +808,10 @@ namespace Org.OpenAPITools.Api
/// Creates list of users with given input array
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">List of user object</param>
/// <param name="body">List of user object</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse</returns>
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Object>> CreateUsersWithListInputAsyncWithHttpInfo (List<User> body)
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Object>> CreateUsersWithListInputAsyncWithHttpInfo (List<User> body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
// verify the required parameter 'body' is set
if (body == null)
@ -815,7 +839,7 @@ namespace Org.OpenAPITools.Api
// make the HTTP request
var localVarResponse = await this.AsynchronousClient.PostAsync<Object>("/user/createWithList", localVarRequestOptions, this.Configuration);
var localVarResponse = await this.AsynchronousClient.PostAsync<Object>("/user/createWithList", localVarRequestOptions, this.Configuration, cancellationToken);
if (this.ExceptionFactory != null)
{
@ -883,11 +907,12 @@ namespace Org.OpenAPITools.Api
/// Delete user This can only be done by the logged in user.
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="username">The name that needs to be deleted</param>
/// <param name="username">The name that needs to be deleted</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of void</returns>
public async System.Threading.Tasks.Task DeleteUserAsync (string username)
public async System.Threading.Tasks.Task DeleteUserAsync (string username, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
await DeleteUserAsyncWithHttpInfo(username);
await DeleteUserAsyncWithHttpInfo(username, cancellationToken);
}
@ -895,9 +920,10 @@ namespace Org.OpenAPITools.Api
/// Delete user This can only be done by the logged in user.
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="username">The name that needs to be deleted</param>
/// <param name="username">The name that needs to be deleted</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse</returns>
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Object>> DeleteUserAsyncWithHttpInfo (string username)
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Object>> DeleteUserAsyncWithHttpInfo (string username, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
// verify the required parameter 'username' is set
if (username == null)
@ -925,7 +951,7 @@ namespace Org.OpenAPITools.Api
// make the HTTP request
var localVarResponse = await this.AsynchronousClient.DeleteAsync<Object>("/user/{username}", localVarRequestOptions, this.Configuration);
var localVarResponse = await this.AsynchronousClient.DeleteAsync<Object>("/user/{username}", localVarRequestOptions, this.Configuration, cancellationToken);
if (this.ExceptionFactory != null)
{
@ -996,11 +1022,12 @@ namespace Org.OpenAPITools.Api
/// Get user by user name
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="username">The name that needs to be fetched. Use user1 for testing.</param>
/// <param name="username">The name that needs to be fetched. Use user1 for testing.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of User</returns>
public async System.Threading.Tasks.Task<User> GetUserByNameAsync (string username)
public async System.Threading.Tasks.Task<User> GetUserByNameAsync (string username, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
Org.OpenAPITools.Client.ApiResponse<User> localVarResponse = await GetUserByNameAsyncWithHttpInfo(username);
Org.OpenAPITools.Client.ApiResponse<User> localVarResponse = await GetUserByNameAsyncWithHttpInfo(username, cancellationToken);
return localVarResponse.Data;
}
@ -1009,9 +1036,10 @@ namespace Org.OpenAPITools.Api
/// Get user by user name
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="username">The name that needs to be fetched. Use user1 for testing.</param>
/// <param name="username">The name that needs to be fetched. Use user1 for testing.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (User)</returns>
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<User>> GetUserByNameAsyncWithHttpInfo (string username)
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<User>> GetUserByNameAsyncWithHttpInfo (string username, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
// verify the required parameter 'username' is set
if (username == null)
@ -1041,7 +1069,7 @@ namespace Org.OpenAPITools.Api
// make the HTTP request
var localVarResponse = await this.AsynchronousClient.GetAsync<User>("/user/{username}", localVarRequestOptions, this.Configuration);
var localVarResponse = await this.AsynchronousClient.GetAsync<User>("/user/{username}", localVarRequestOptions, this.Configuration, cancellationToken);
if (this.ExceptionFactory != null)
{
@ -1119,12 +1147,14 @@ namespace Org.OpenAPITools.Api
/// Logs user into the system
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="username">The user name for login</param>
/// <param name="password">The password for login in clear text</param>
/// <param name="username">The user name for login</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <param name="password">The password for login in clear text</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of string</returns>
public async System.Threading.Tasks.Task<string> LoginUserAsync (string username, string password)
public async System.Threading.Tasks.Task<string> LoginUserAsync (string username, string password, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
Org.OpenAPITools.Client.ApiResponse<string> localVarResponse = await LoginUserAsyncWithHttpInfo(username, password);
Org.OpenAPITools.Client.ApiResponse<string> localVarResponse = await LoginUserAsyncWithHttpInfo(username, password, cancellationToken);
return localVarResponse.Data;
}
@ -1133,10 +1163,12 @@ namespace Org.OpenAPITools.Api
/// Logs user into the system
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="username">The user name for login</param>
/// <param name="password">The password for login in clear text</param>
/// <param name="username">The user name for login</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <param name="password">The password for login in clear text</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (string)</returns>
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<string>> LoginUserAsyncWithHttpInfo (string username, string password)
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<string>> LoginUserAsyncWithHttpInfo (string username, string password, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
// verify the required parameter 'username' is set
if (username == null)
@ -1171,7 +1203,7 @@ namespace Org.OpenAPITools.Api
// make the HTTP request
var localVarResponse = await this.AsynchronousClient.GetAsync<string>("/user/login", localVarRequestOptions, this.Configuration);
var localVarResponse = await this.AsynchronousClient.GetAsync<string>("/user/login", localVarRequestOptions, this.Configuration, cancellationToken);
if (this.ExceptionFactory != null)
{
@ -1233,9 +1265,9 @@ namespace Org.OpenAPITools.Api
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <returns>Task of void</returns>
public async System.Threading.Tasks.Task LogoutUserAsync ()
public async System.Threading.Tasks.Task LogoutUserAsync (System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
await LogoutUserAsyncWithHttpInfo();
await LogoutUserAsyncWithHttpInfo(cancellationToken);
}
@ -1244,7 +1276,7 @@ namespace Org.OpenAPITools.Api
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <returns>Task of ApiResponse</returns>
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Object>> LogoutUserAsyncWithHttpInfo ()
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Object>> LogoutUserAsyncWithHttpInfo (System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
@ -1267,7 +1299,7 @@ namespace Org.OpenAPITools.Api
// make the HTTP request
var localVarResponse = await this.AsynchronousClient.GetAsync<Object>("/user/logout", localVarRequestOptions, this.Configuration);
var localVarResponse = await this.AsynchronousClient.GetAsync<Object>("/user/logout", localVarRequestOptions, this.Configuration, cancellationToken);
if (this.ExceptionFactory != null)
{
@ -1342,12 +1374,14 @@ namespace Org.OpenAPITools.Api
/// Updated user This can only be done by the logged in user.
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="username">name that need to be deleted</param>
/// <param name="body">Updated user object</param>
/// <param name="username">name that need to be deleted</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <param name="body">Updated user object</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of void</returns>
public async System.Threading.Tasks.Task UpdateUserAsync (string username, User body)
public async System.Threading.Tasks.Task UpdateUserAsync (string username, User body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
await UpdateUserAsyncWithHttpInfo(username, body);
await UpdateUserAsyncWithHttpInfo(username, body, cancellationToken);
}
@ -1355,10 +1389,12 @@ namespace Org.OpenAPITools.Api
/// Updated user This can only be done by the logged in user.
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="username">name that need to be deleted</param>
/// <param name="body">Updated user object</param>
/// <param name="username">name that need to be deleted</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <param name="body">Updated user object</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse</returns>
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Object>> UpdateUserAsyncWithHttpInfo (string username, User body)
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Object>> UpdateUserAsyncWithHttpInfo (string username, User body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
// verify the required parameter 'username' is set
if (username == null)
@ -1391,7 +1427,7 @@ namespace Org.OpenAPITools.Api
// make the HTTP request
var localVarResponse = await this.AsynchronousClient.PutAsync<Object>("/user/{username}", localVarRequestOptions, this.Configuration);
var localVarResponse = await this.AsynchronousClient.PutAsync<Object>("/user/{username}", localVarRequestOptions, this.Configuration, cancellationToken);
if (this.ExceptionFactory != null)
{

View File

@ -451,7 +451,7 @@ namespace Org.OpenAPITools.Client
return result;
}
private async Task<ApiResponse<T>> ExecAsync<T>(RestRequest req, IReadableConfiguration configuration)
private async Task<ApiResponse<T>> ExecAsync<T>(RestRequest req, IReadableConfiguration configuration, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
RestClient client = new RestClient(_baseUrl);
@ -482,7 +482,7 @@ namespace Org.OpenAPITools.Client
InterceptRequest(req);
var response = await client.ExecuteAsync<T>(req);
var response = await client.ExecuteAsync<T>(req, cancellationToken);
InterceptResponse(req, response);
@ -529,11 +529,12 @@ namespace Org.OpenAPITools.Client
/// <param name="options">The additional request options.</param>
/// <param name="configuration">A per-request configuration object. It is assumed that any merge with
/// GlobalConfiguration has been done before calling this method.</param>
/// <param name="cancellationToken">Token that enables callers to cancel the request.</param>
/// <returns>A Task containing ApiResponse</returns>
public Task<ApiResponse<T>> GetAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null)
public Task<ApiResponse<T>> GetAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
var config = configuration ?? GlobalConfiguration.Instance;
return ExecAsync<T>(NewRequest(HttpMethod.Get, path, options, config), config);
return ExecAsync<T>(NewRequest(HttpMethod.Get, path, options, config), config, cancellationToken);
}
/// <summary>
@ -543,11 +544,12 @@ namespace Org.OpenAPITools.Client
/// <param name="options">The additional request options.</param>
/// <param name="configuration">A per-request configuration object. It is assumed that any merge with
/// GlobalConfiguration has been done before calling this method.</param>
/// <param name="cancellationToken">Token that enables callers to cancel the request.</param>
/// <returns>A Task containing ApiResponse</returns>
public Task<ApiResponse<T>> PostAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null)
public Task<ApiResponse<T>> PostAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
var config = configuration ?? GlobalConfiguration.Instance;
return ExecAsync<T>(NewRequest(HttpMethod.Post, path, options, config), config);
return ExecAsync<T>(NewRequest(HttpMethod.Post, path, options, config), config, cancellationToken);
}
/// <summary>
@ -557,11 +559,12 @@ namespace Org.OpenAPITools.Client
/// <param name="options">The additional request options.</param>
/// <param name="configuration">A per-request configuration object. It is assumed that any merge with
/// GlobalConfiguration has been done before calling this method.</param>
/// <param name="cancellationToken">Token that enables callers to cancel the request.</param>
/// <returns>A Task containing ApiResponse</returns>
public Task<ApiResponse<T>> PutAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null)
public Task<ApiResponse<T>> PutAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
var config = configuration ?? GlobalConfiguration.Instance;
return ExecAsync<T>(NewRequest(HttpMethod.Put, path, options, config), config);
return ExecAsync<T>(NewRequest(HttpMethod.Put, path, options, config), config, cancellationToken);
}
/// <summary>
@ -571,11 +574,12 @@ namespace Org.OpenAPITools.Client
/// <param name="options">The additional request options.</param>
/// <param name="configuration">A per-request configuration object. It is assumed that any merge with
/// GlobalConfiguration has been done before calling this method.</param>
/// <param name="cancellationToken">Token that enables callers to cancel the request.</param>
/// <returns>A Task containing ApiResponse</returns>
public Task<ApiResponse<T>> DeleteAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null)
public Task<ApiResponse<T>> DeleteAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
var config = configuration ?? GlobalConfiguration.Instance;
return ExecAsync<T>(NewRequest(HttpMethod.Delete, path, options, config), config);
return ExecAsync<T>(NewRequest(HttpMethod.Delete, path, options, config), config, cancellationToken);
}
/// <summary>
@ -585,11 +589,12 @@ namespace Org.OpenAPITools.Client
/// <param name="options">The additional request options.</param>
/// <param name="configuration">A per-request configuration object. It is assumed that any merge with
/// GlobalConfiguration has been done before calling this method.</param>
/// <param name="cancellationToken">Token that enables callers to cancel the request.</param>
/// <returns>A Task containing ApiResponse</returns>
public Task<ApiResponse<T>> HeadAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null)
public Task<ApiResponse<T>> HeadAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
var config = configuration ?? GlobalConfiguration.Instance;
return ExecAsync<T>(NewRequest(HttpMethod.Head, path, options, config), config);
return ExecAsync<T>(NewRequest(HttpMethod.Head, path, options, config), config, cancellationToken);
}
/// <summary>
@ -599,11 +604,12 @@ namespace Org.OpenAPITools.Client
/// <param name="options">The additional request options.</param>
/// <param name="configuration">A per-request configuration object. It is assumed that any merge with
/// GlobalConfiguration has been done before calling this method.</param>
/// <param name="cancellationToken">Token that enables callers to cancel the request.</param>
/// <returns>A Task containing ApiResponse</returns>
public Task<ApiResponse<T>> OptionsAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null)
public Task<ApiResponse<T>> OptionsAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
var config = configuration ?? GlobalConfiguration.Instance;
return ExecAsync<T>(NewRequest(HttpMethod.Options, path, options, config), config);
return ExecAsync<T>(NewRequest(HttpMethod.Options, path, options, config), config, cancellationToken);
}
/// <summary>
@ -613,11 +619,12 @@ namespace Org.OpenAPITools.Client
/// <param name="options">The additional request options.</param>
/// <param name="configuration">A per-request configuration object. It is assumed that any merge with
/// GlobalConfiguration has been done before calling this method.</param>
/// <param name="cancellationToken">Token that enables callers to cancel the request.</param>
/// <returns>A Task containing ApiResponse</returns>
public Task<ApiResponse<T>> PatchAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null)
public Task<ApiResponse<T>> PatchAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
var config = configuration ?? GlobalConfiguration.Instance;
return ExecAsync<T>(NewRequest(HttpMethod.Patch, path, options, config), config);
return ExecAsync<T>(NewRequest(HttpMethod.Patch, path, options, config), config, cancellationToken);
}
#endregion IAsynchronousClient

View File

@ -28,9 +28,10 @@ namespace Org.OpenAPITools.Client
/// <param name="path">The relative path to invoke.</param>
/// <param name="options">The request parameters to pass along to the client.</param>
/// <param name="configuration">Per-request configurable settings.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <typeparam name="T">The return type.</typeparam>
/// <returns>A task eventually representing the response data, decorated with <see cref="ApiResponse{T}"/></returns>
Task<ApiResponse<T>> GetAsync<T>(String path, RequestOptions options, IReadableConfiguration configuration = null);
Task<ApiResponse<T>> GetAsync<T>(String path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Executes a non-blocking call to some <paramref name="path"/> using the POST http verb.
@ -38,9 +39,10 @@ namespace Org.OpenAPITools.Client
/// <param name="path">The relative path to invoke.</param>
/// <param name="options">The request parameters to pass along to the client.</param>
/// <param name="configuration">Per-request configurable settings.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <typeparam name="T">The return type.</typeparam>
/// <returns>A task eventually representing the response data, decorated with <see cref="ApiResponse{T}"/></returns>
Task<ApiResponse<T>> PostAsync<T>(String path, RequestOptions options, IReadableConfiguration configuration = null);
Task<ApiResponse<T>> PostAsync<T>(String path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Executes a non-blocking call to some <paramref name="path"/> using the PUT http verb.
@ -48,9 +50,10 @@ namespace Org.OpenAPITools.Client
/// <param name="path">The relative path to invoke.</param>
/// <param name="options">The request parameters to pass along to the client.</param>
/// <param name="configuration">Per-request configurable settings.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <typeparam name="T">The return type.</typeparam>
/// <returns>A task eventually representing the response data, decorated with <see cref="ApiResponse{T}"/></returns>
Task<ApiResponse<T>> PutAsync<T>(String path, RequestOptions options, IReadableConfiguration configuration = null);
Task<ApiResponse<T>> PutAsync<T>(String path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Executes a non-blocking call to some <paramref name="path"/> using the DELETE http verb.
@ -58,9 +61,10 @@ namespace Org.OpenAPITools.Client
/// <param name="path">The relative path to invoke.</param>
/// <param name="options">The request parameters to pass along to the client.</param>
/// <param name="configuration">Per-request configurable settings.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <typeparam name="T">The return type.</typeparam>
/// <returns>A task eventually representing the response data, decorated with <see cref="ApiResponse{T}"/></returns>
Task<ApiResponse<T>> DeleteAsync<T>(String path, RequestOptions options, IReadableConfiguration configuration = null);
Task<ApiResponse<T>> DeleteAsync<T>(String path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Executes a non-blocking call to some <paramref name="path"/> using the HEAD http verb.
@ -68,9 +72,10 @@ namespace Org.OpenAPITools.Client
/// <param name="path">The relative path to invoke.</param>
/// <param name="options">The request parameters to pass along to the client.</param>
/// <param name="configuration">Per-request configurable settings.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <typeparam name="T">The return type.</typeparam>
/// <returns>A task eventually representing the response data, decorated with <see cref="ApiResponse{T}"/></returns>
Task<ApiResponse<T>> HeadAsync<T>(String path, RequestOptions options, IReadableConfiguration configuration = null);
Task<ApiResponse<T>> HeadAsync<T>(String path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Executes a non-blocking call to some <paramref name="path"/> using the OPTIONS http verb.
@ -78,9 +83,10 @@ namespace Org.OpenAPITools.Client
/// <param name="path">The relative path to invoke.</param>
/// <param name="options">The request parameters to pass along to the client.</param>
/// <param name="configuration">Per-request configurable settings.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <typeparam name="T">The return type.</typeparam>
/// <returns>A task eventually representing the response data, decorated with <see cref="ApiResponse{T}"/></returns>
Task<ApiResponse<T>> OptionsAsync<T>(String path, RequestOptions options, IReadableConfiguration configuration = null);
Task<ApiResponse<T>> OptionsAsync<T>(String path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Executes a non-blocking call to some <paramref name="path"/> using the PATCH http verb.
@ -88,9 +94,10 @@ namespace Org.OpenAPITools.Client
/// <param name="path">The relative path to invoke.</param>
/// <param name="options">The request parameters to pass along to the client.</param>
/// <param name="configuration">Per-request configurable settings.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <typeparam name="T">The return type.</typeparam>
/// <returns>A task eventually representing the response data, decorated with <see cref="ApiResponse{T}"/></returns>
Task<ApiResponse<T>> PatchAsync<T>(String path, RequestOptions options, IReadableConfiguration configuration = null);
Task<ApiResponse<T>> PatchAsync<T>(String path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
}
}