Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,28 @@ partial void ProcessCreateAnimationTaskResponseContent(
/// <exception cref="global::Meshy.ApiException"></exception>
public async global::System.Threading.Tasks.Task<global::Meshy.CreateTaskResponse> CreateAnimationTaskAsync(

global::Meshy.AnimationRequest request,
global::Meshy.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
var __response = await CreateAnimationTaskAsResponseAsync(

request: request,
requestOptions: requestOptions,
cancellationToken: cancellationToken
).ConfigureAwait(false);

return __response.Body;
}
/// <summary>
/// Create an Animation task
/// </summary>
/// <param name="request"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Meshy.ApiException"></exception>
public async global::System.Threading.Tasks.Task<global::Meshy.AutoSDKHttpResponse<global::Meshy.CreateTaskResponse>> CreateAnimationTaskAsResponseAsync(

global::Meshy.AnimationRequest request,
global::Meshy.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
Expand Down Expand Up @@ -84,6 +106,7 @@ partial void ProcessCreateAnimationTaskResponseContent(

global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{

var __pathBuilder = new global::Meshy.PathBuilder(
path: "/openapi/v1/animations",
baseUri: HttpClient.BaseAddress);
Expand Down Expand Up @@ -163,6 +186,8 @@ partial void ProcessCreateAnimationTaskResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
retryDelay: null,
retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
Expand All @@ -173,6 +198,11 @@ partial void ProcessCreateAnimationTaskResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
var __retryDelay = global::Meshy.AutoSDKRequestOptionsSupport.GetRetryDelay(
clientOptions: Options,
requestOptions: requestOptions,
response: null,
attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Meshy.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
Expand All @@ -190,6 +220,8 @@ partial void ProcessCreateAnimationTaskResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
Expand All @@ -199,8 +231,7 @@ partial void ProcessCreateAnimationTaskResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Meshy.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
clientOptions: Options,
requestOptions: requestOptions,
retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
Expand All @@ -209,6 +240,11 @@ partial void ProcessCreateAnimationTaskResponseContent(
__attempt < __maxAttempts &&
global::Meshy.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
var __retryDelay = global::Meshy.AutoSDKRequestOptionsSupport.GetRetryDelay(
clientOptions: Options,
requestOptions: requestOptions,
response: __response,
attempt: __attempt);
await global::Meshy.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Meshy.AutoSDKRequestOptionsSupport.CreateHookContext(
Expand All @@ -225,14 +261,15 @@ partial void ProcessCreateAnimationTaskResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
retryDelay: __retryDelay,
retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Meshy.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
clientOptions: Options,
requestOptions: requestOptions,
retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
Expand Down Expand Up @@ -272,6 +309,8 @@ partial void ProcessCreateAnimationTaskResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
retryDelay: null,
retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
Expand All @@ -292,6 +331,8 @@ partial void ProcessCreateAnimationTaskResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
retryDelay: null,
retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
//
Expand Down Expand Up @@ -481,9 +522,13 @@ partial void ProcessCreateAnimationTaskResponseContent(
{
__response.EnsureSuccessStatusCode();

return
global::Meshy.CreateTaskResponse.FromJson(__content, JsonSerializerContext) ??
var __value = global::Meshy.CreateTaskResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
return new global::Meshy.AutoSDKHttpResponse<global::Meshy.CreateTaskResponse>(
statusCode: __response.StatusCode,
headers: global::Meshy.AutoSDKHttpResponse.CreateHeaders(__response),
requestUri: __response.RequestMessage?.RequestUri,
body: __value);
}
catch (global::System.Exception __ex)
{
Expand Down Expand Up @@ -511,9 +556,13 @@ partial void ProcessCreateAnimationTaskResponseContent(
#endif
).ConfigureAwait(false);

return
await global::Meshy.CreateTaskResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
var __value = await global::Meshy.CreateTaskResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
return new global::Meshy.AutoSDKHttpResponse<global::Meshy.CreateTaskResponse>(
statusCode: __response.StatusCode,
headers: global::Meshy.AutoSDKHttpResponse.CreateHeaders(__response),
requestUri: __response.RequestMessage?.RequestUri,
body: __value);
}
catch (global::System.Exception __ex)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,24 @@ partial void ProcessDeleteAnimationTaskResponse(
string id,
global::Meshy.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
await DeleteAnimationTaskAsResponseAsync(
id: id,
requestOptions: requestOptions,
cancellationToken: cancellationToken
).ConfigureAwait(false);
}
/// <summary>
/// Delete an Animation task
/// </summary>
/// <param name="id"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Meshy.ApiException"></exception>
public async global::System.Threading.Tasks.Task<global::Meshy.AutoSDKHttpResponse> DeleteAnimationTaskAsResponseAsync(
string id,
global::Meshy.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
Expand Down Expand Up @@ -76,6 +94,7 @@ partial void ProcessDeleteAnimationTaskResponse(

global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{

var __pathBuilder = new global::Meshy.PathBuilder(
path: $"/openapi/v1/animations/{id}",
baseUri: HttpClient.BaseAddress);
Expand Down Expand Up @@ -149,6 +168,8 @@ partial void ProcessDeleteAnimationTaskResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
retryDelay: null,
retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
Expand All @@ -159,6 +180,11 @@ partial void ProcessDeleteAnimationTaskResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
var __retryDelay = global::Meshy.AutoSDKRequestOptionsSupport.GetRetryDelay(
clientOptions: Options,
requestOptions: requestOptions,
response: null,
attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Meshy.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
Expand All @@ -176,6 +202,8 @@ partial void ProcessDeleteAnimationTaskResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
Expand All @@ -185,8 +213,7 @@ partial void ProcessDeleteAnimationTaskResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Meshy.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
clientOptions: Options,
requestOptions: requestOptions,
retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
Expand All @@ -195,6 +222,11 @@ partial void ProcessDeleteAnimationTaskResponse(
__attempt < __maxAttempts &&
global::Meshy.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
var __retryDelay = global::Meshy.AutoSDKRequestOptionsSupport.GetRetryDelay(
clientOptions: Options,
requestOptions: requestOptions,
response: __response,
attempt: __attempt);
await global::Meshy.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Meshy.AutoSDKRequestOptionsSupport.CreateHookContext(
Expand All @@ -211,14 +243,15 @@ partial void ProcessDeleteAnimationTaskResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
retryDelay: __retryDelay,
retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Meshy.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
clientOptions: Options,
requestOptions: requestOptions,
retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
Expand Down Expand Up @@ -258,6 +291,8 @@ partial void ProcessDeleteAnimationTaskResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
retryDelay: null,
retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
Expand All @@ -278,6 +313,8 @@ partial void ProcessDeleteAnimationTaskResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
retryDelay: null,
retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}

Expand All @@ -298,6 +335,10 @@ partial void ProcessDeleteAnimationTaskResponse(
{
__response.EnsureSuccessStatusCode();

return new global::Meshy.AutoSDKHttpResponse(
statusCode: __response.StatusCode,
headers: global::Meshy.AutoSDKHttpResponse.CreateHeaders(__response),
requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
Expand All @@ -319,6 +360,10 @@ partial void ProcessDeleteAnimationTaskResponse(
try
{
__response.EnsureSuccessStatusCode();
return new global::Meshy.AutoSDKHttpResponse(
statusCode: __response.StatusCode,
headers: global::Meshy.AutoSDKHttpResponse.CreateHeaders(__response),
requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
Expand Down
Loading