diff --git a/src/libs/Topaz/Generated/Topaz.AcceptRequestClient.AcceptVideoRequest.g.cs b/src/libs/Topaz/Generated/Topaz.AcceptRequestClient.AcceptVideoRequest.g.cs
index 92b144f..d786ba3 100644
--- a/src/libs/Topaz/Generated/Topaz.AcceptRequestClient.AcceptVideoRequest.g.cs
+++ b/src/libs/Topaz/Generated/Topaz.AcceptRequestClient.AcceptVideoRequest.g.cs
@@ -68,6 +68,42 @@ partial void ProcessAcceptVideoRequestResponseContent(
global::System.Guid requestId,
global::Topaz.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await AcceptVideoRequestAsResponseAsync(
+ requestId: requestId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Accept and Upload Video Request
+ /// Calling this endpoint reserves the estimated credits and returns signed URL(s) for **multi-part upload**.
+ /// ### Video uploads
+ /// The Video API uses multi-part upload to receive the video file for processing. You can use a simple byte-division function to create segments for the API to receive.
+ /// For example, if you have a 900MB video file and the system returns 3 upload URLs. You would then:
+ /// - Upload bytes 0-300,000,000 via HTTP PUT to `urls[0]`
+ /// - Upload bytes 300,000,001-600,000,000 via HTTP PUT to `urls[1]`
+ /// - Upload bytes 600,000,001-900,000,000 via HTTP PUT to `urls[2]`
+ /// If one of the uploads fail, you may reuse the same URL to retry - the action overwrites any partially uploaded data.
+ /// A successful response from the PUT request returns an `ETag` value in the header for each segment. Retain the part number and ETag pair for the next step (PATCH /video/{requestId}/complete-upload/).
+ /// ## Response body
+ /// | **Property** | **Type** | **Description** |
+ /// |---------------|------------|-----------------------------------------------------|
+ /// | **uploadId** | String | Upload ID for multi-part upload |
+ /// | **urls** | Array | URLs for multi-part uploads |
+ ///
+ ///
+ /// Example: c1f96dc2-c448-00e6-82ed-14ecb6403c62
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> AcceptVideoRequestAsResponseAsync(
+ global::System.Guid requestId,
+ global::Topaz.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -97,6 +133,7 @@ partial void ProcessAcceptVideoRequestResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Topaz.PathBuilder(
path: $"/video/{requestId}/accept",
baseUri: HttpClient.BaseAddress);
@@ -170,6 +207,8 @@ partial void ProcessAcceptVideoRequestResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -180,6 +219,11 @@ partial void ProcessAcceptVideoRequestResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Topaz.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Topaz.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -197,6 +241,8 @@ partial void ProcessAcceptVideoRequestResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -206,8 +252,7 @@ partial void ProcessAcceptVideoRequestResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Topaz.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -216,6 +261,11 @@ partial void ProcessAcceptVideoRequestResponseContent(
__attempt < __maxAttempts &&
global::Topaz.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Topaz.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Topaz.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Topaz.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -232,14 +282,15 @@ partial void ProcessAcceptVideoRequestResponseContent(
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::Topaz.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -279,6 +330,8 @@ partial void ProcessAcceptVideoRequestResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -299,6 +352,8 @@ partial void ProcessAcceptVideoRequestResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Bad request
@@ -589,9 +644,13 @@ partial void ProcessAcceptVideoRequestResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Topaz.AcceptResponse.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Topaz.AcceptResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Topaz.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Topaz.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -619,9 +678,13 @@ partial void ProcessAcceptVideoRequestResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Topaz.AcceptResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Topaz.AcceptResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Topaz.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Topaz.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Topaz/Generated/Topaz.AcceptRequestClient.g.cs b/src/libs/Topaz/Generated/Topaz.AcceptRequestClient.g.cs
index cd2fb39..6bf3435 100644
--- a/src/libs/Topaz/Generated/Topaz.AcceptRequestClient.g.cs
+++ b/src/libs/Topaz/Generated/Topaz.AcceptRequestClient.g.cs
@@ -73,10 +73,10 @@ public AcceptRequestClient(
/// Client-wide request defaults such as headers, query parameters, retries, and timeout.
/// Dispose the HttpClient when the instance is disposed. True by default.
public AcceptRequestClient(
- global::System.Net.Http.HttpClient? httpClient = null,
- global::System.Uri? baseUri = null,
- global::System.Collections.Generic.List? authorizations = null,
- global::Topaz.AutoSDKClientOptions? options = null,
+ global::System.Net.Http.HttpClient? httpClient,
+ global::System.Uri? baseUri,
+ global::System.Collections.Generic.List? authorizations,
+ global::Topaz.AutoSDKClientOptions? options,
bool disposeHttpClient = true)
{
diff --git a/src/libs/Topaz/Generated/Topaz.AutoSDKHttpResponse.g.cs b/src/libs/Topaz/Generated/Topaz.AutoSDKHttpResponse.g.cs
index eec14cd..ac0df3e 100644
--- a/src/libs/Topaz/Generated/Topaz.AutoSDKHttpResponse.g.cs
+++ b/src/libs/Topaz/Generated/Topaz.AutoSDKHttpResponse.g.cs
@@ -14,9 +14,24 @@ public partial class AutoSDKHttpResponse
public AutoSDKHttpResponse(
global::System.Net.HttpStatusCode statusCode,
global::System.Collections.Generic.Dictionary> headers)
+ : this(
+ statusCode: statusCode,
+ headers: headers,
+ requestUri: null)
+ {
+ }
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public AutoSDKHttpResponse(
+ global::System.Net.HttpStatusCode statusCode,
+ global::System.Collections.Generic.Dictionary> headers,
+ global::System.Uri? requestUri)
{
StatusCode = statusCode;
Headers = headers ?? throw new global::System.ArgumentNullException(nameof(headers));
+ RequestUri = requestUri;
}
///
@@ -27,6 +42,10 @@ public AutoSDKHttpResponse(
/// Gets the response headers.
///
public global::System.Collections.Generic.Dictionary> Headers { get; }
+ ///
+ /// Gets the final request URI associated with the response.
+ ///
+ public global::System.Uri? RequestUri { get; }
internal static global::System.Collections.Generic.Dictionary> CreateHeaders(
global::System.Net.Http.HttpResponseMessage response)
@@ -73,7 +92,23 @@ public AutoSDKHttpResponse(
global::System.Net.HttpStatusCode statusCode,
global::System.Collections.Generic.Dictionary> headers,
T body)
- : base(statusCode, headers)
+ : this(
+ statusCode: statusCode,
+ headers: headers,
+ requestUri: null,
+ body: body)
+ {
+ }
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public AutoSDKHttpResponse(
+ global::System.Net.HttpStatusCode statusCode,
+ global::System.Collections.Generic.Dictionary> headers,
+ global::System.Uri? requestUri,
+ T body)
+ : base(statusCode, headers, requestUri)
{
Body = body;
}
diff --git a/src/libs/Topaz/Generated/Topaz.CancelClient.CancelTask.g.cs b/src/libs/Topaz/Generated/Topaz.CancelClient.CancelTask.g.cs
index 1ae7c3a..70fe7bf 100644
--- a/src/libs/Topaz/Generated/Topaz.CancelClient.CancelTask.g.cs
+++ b/src/libs/Topaz/Generated/Topaz.CancelClient.CancelTask.g.cs
@@ -48,6 +48,25 @@ partial void ProcessCancelTaskResponse(
global::System.Guid processId,
global::Topaz.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await CancelTaskAsResponseAsync(
+ processId: processId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Cancel
+ /// Cancel a pending image processing job. If the job has already completed, or if it is not in a cancellable state, this request will fail with a conflict error. Use this to prevent unnecessary costs for jobs started in error.
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task CancelTaskAsResponseAsync(
+ global::System.Guid processId,
+ global::Topaz.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -77,6 +96,7 @@ partial void ProcessCancelTaskResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Topaz.PathBuilder(
path: $"/image/v1/cancel/{processId}",
baseUri: HttpClient.BaseAddress);
@@ -150,6 +170,8 @@ partial void ProcessCancelTaskResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -160,6 +182,11 @@ partial void ProcessCancelTaskResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Topaz.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Topaz.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -177,6 +204,8 @@ partial void ProcessCancelTaskResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -186,8 +215,7 @@ partial void ProcessCancelTaskResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Topaz.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -196,6 +224,11 @@ partial void ProcessCancelTaskResponse(
__attempt < __maxAttempts &&
global::Topaz.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Topaz.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Topaz.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Topaz.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -212,14 +245,15 @@ partial void ProcessCancelTaskResponse(
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::Topaz.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -259,6 +293,8 @@ partial void ProcessCancelTaskResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -279,6 +315,8 @@ partial void ProcessCancelTaskResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request contains malformed data in the body, path, or query parameters.
@@ -565,6 +603,10 @@ partial void ProcessCancelTaskResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Topaz.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Topaz.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -586,6 +628,10 @@ partial void ProcessCancelTaskResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Topaz.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Topaz.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Topaz/Generated/Topaz.CancelClient.g.cs b/src/libs/Topaz/Generated/Topaz.CancelClient.g.cs
index 99bacd2..0839224 100644
--- a/src/libs/Topaz/Generated/Topaz.CancelClient.g.cs
+++ b/src/libs/Topaz/Generated/Topaz.CancelClient.g.cs
@@ -73,10 +73,10 @@ public CancelClient(
/// Client-wide request defaults such as headers, query parameters, retries, and timeout.
/// Dispose the HttpClient when the instance is disposed. True by default.
public CancelClient(
- global::System.Net.Http.HttpClient? httpClient = null,
- global::System.Uri? baseUri = null,
- global::System.Collections.Generic.List? authorizations = null,
- global::Topaz.AutoSDKClientOptions? options = null,
+ global::System.Net.Http.HttpClient? httpClient,
+ global::System.Uri? baseUri,
+ global::System.Collections.Generic.List? authorizations,
+ global::Topaz.AutoSDKClientOptions? options,
bool disposeHttpClient = true)
{
diff --git a/src/libs/Topaz/Generated/Topaz.CancelRequestClient.CancelVideoRequest.g.cs b/src/libs/Topaz/Generated/Topaz.CancelRequestClient.CancelVideoRequest.g.cs
index d4bb9b9..1ad5c64 100644
--- a/src/libs/Topaz/Generated/Topaz.CancelRequestClient.CancelVideoRequest.g.cs
+++ b/src/libs/Topaz/Generated/Topaz.CancelRequestClient.CancelVideoRequest.g.cs
@@ -57,6 +57,31 @@ partial void ProcessCancelVideoRequestResponseContent(
global::System.Guid requestId,
global::Topaz.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await CancelVideoRequestAsResponseAsync(
+ requestId: requestId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Cancel Video Request
+ /// Cancel a video enhancement request.
+ /// If the request is canceled before any processing starts, then all reserved credits are refunded.
+ /// If the request is canceled during processing, then a partial refund is issued based on the progress. For example, if the request is 50% complete, then approximately 50% of the reserved credits are refunded.
+ ///
+ ///
+ /// Example: c1f96dc2-c448-00e6-82ed-14ecb6403c62
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> CancelVideoRequestAsResponseAsync(
+ global::System.Guid requestId,
+ global::Topaz.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -86,6 +111,7 @@ partial void ProcessCancelVideoRequestResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Topaz.PathBuilder(
path: $"/video/{requestId}",
baseUri: HttpClient.BaseAddress);
@@ -159,6 +185,8 @@ partial void ProcessCancelVideoRequestResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -169,6 +197,11 @@ partial void ProcessCancelVideoRequestResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Topaz.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Topaz.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -186,6 +219,8 @@ partial void ProcessCancelVideoRequestResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -195,8 +230,7 @@ partial void ProcessCancelVideoRequestResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Topaz.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -205,6 +239,11 @@ partial void ProcessCancelVideoRequestResponseContent(
__attempt < __maxAttempts &&
global::Topaz.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Topaz.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Topaz.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Topaz.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -221,14 +260,15 @@ partial void ProcessCancelVideoRequestResponseContent(
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::Topaz.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -268,6 +308,8 @@ partial void ProcessCancelVideoRequestResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -288,6 +330,8 @@ partial void ProcessCancelVideoRequestResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Bad request
@@ -502,9 +546,13 @@ partial void ProcessCancelVideoRequestResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Topaz.CancelVideoRequestResponse.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Topaz.CancelVideoRequestResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Topaz.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Topaz.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -532,9 +580,13 @@ partial void ProcessCancelVideoRequestResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Topaz.CancelVideoRequestResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Topaz.CancelVideoRequestResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Topaz.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Topaz.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Topaz/Generated/Topaz.CancelRequestClient.g.cs b/src/libs/Topaz/Generated/Topaz.CancelRequestClient.g.cs
index 8d84916..684ddd0 100644
--- a/src/libs/Topaz/Generated/Topaz.CancelRequestClient.g.cs
+++ b/src/libs/Topaz/Generated/Topaz.CancelRequestClient.g.cs
@@ -73,10 +73,10 @@ public CancelRequestClient(
/// Client-wide request defaults such as headers, query parameters, retries, and timeout.
/// Dispose the HttpClient when the instance is disposed. True by default.
public CancelRequestClient(
- global::System.Net.Http.HttpClient? httpClient = null,
- global::System.Uri? baseUri = null,
- global::System.Collections.Generic.List? authorizations = null,
- global::Topaz.AutoSDKClientOptions? options = null,
+ global::System.Net.Http.HttpClient? httpClient,
+ global::System.Uri? baseUri,
+ global::System.Collections.Generic.List? authorizations,
+ global::Topaz.AutoSDKClientOptions? options,
bool disposeHttpClient = true)
{
diff --git a/src/libs/Topaz/Generated/Topaz.CompleteUploadClient.CompleteVideoUpload.g.cs b/src/libs/Topaz/Generated/Topaz.CompleteUploadClient.CompleteVideoUpload.g.cs
index 060d5a4..2a54475 100644
--- a/src/libs/Topaz/Generated/Topaz.CompleteUploadClient.CompleteVideoUpload.g.cs
+++ b/src/libs/Topaz/Generated/Topaz.CompleteUploadClient.CompleteVideoUpload.g.cs
@@ -64,6 +64,41 @@ partial void ProcessCompleteVideoUploadResponseContent(
public async global::System.Threading.Tasks.Task CompleteVideoUploadAsync(
global::System.Guid requestId,
+ global::Topaz.CompleteVideoUploadRequest request,
+ global::Topaz.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await CompleteVideoUploadAsResponseAsync(
+ requestId: requestId,
+
+ request: request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Complete Video Upload
+ /// Send metadata of the multi-part uploads to complete the upload and begin processing the video.
+ /// Optionally include the MD5 hash of the source video file to validate successful upload before processing.
+ /// ## Request body
+ /// | **Property** | **Type** | **Description** |
+ /// |-----------------|------------------|---------------------------------------------------------------------------------------------------------|
+ /// | **uploadResults** | Array | An array of part number and ETag pairs of the uploaded parts. ETags are returned by S3 upon upload of the part. |
+ /// | **uploadResults.*.partNum** | Integer | Part number of the uploaded part, starting from 1 |
+ /// | **uploadResults.*.eTag** | String | eTag value returned by S3 upon upload of the part
+ ///
+ ///
+ /// Example: c1f96dc2-c448-00e6-82ed-14ecb6403c62
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> CompleteVideoUploadAsResponseAsync(
+ global::System.Guid requestId,
+
global::Topaz.CompleteVideoUploadRequest request,
global::Topaz.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
@@ -99,6 +134,7 @@ partial void ProcessCompleteVideoUploadResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Topaz.PathBuilder(
path: $"/video/{requestId}/complete-upload/",
baseUri: HttpClient.BaseAddress);
@@ -179,6 +215,8 @@ partial void ProcessCompleteVideoUploadResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -189,6 +227,11 @@ partial void ProcessCompleteVideoUploadResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Topaz.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Topaz.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -206,6 +249,8 @@ partial void ProcessCompleteVideoUploadResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -215,8 +260,7 @@ partial void ProcessCompleteVideoUploadResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Topaz.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -225,6 +269,11 @@ partial void ProcessCompleteVideoUploadResponseContent(
__attempt < __maxAttempts &&
global::Topaz.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Topaz.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Topaz.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Topaz.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -241,14 +290,15 @@ partial void ProcessCompleteVideoUploadResponseContent(
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::Topaz.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -288,6 +338,8 @@ partial void ProcessCompleteVideoUploadResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -308,6 +360,8 @@ partial void ProcessCompleteVideoUploadResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Bad request
@@ -522,9 +576,13 @@ partial void ProcessCompleteVideoUploadResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Topaz.CompleteVideoUploadResponse.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Topaz.CompleteVideoUploadResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Topaz.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Topaz.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -552,9 +610,13 @@ partial void ProcessCompleteVideoUploadResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Topaz.CompleteVideoUploadResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Topaz.CompleteVideoUploadResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Topaz.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Topaz.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Topaz/Generated/Topaz.CompleteUploadClient.g.cs b/src/libs/Topaz/Generated/Topaz.CompleteUploadClient.g.cs
index b3069c4..6516d5e 100644
--- a/src/libs/Topaz/Generated/Topaz.CompleteUploadClient.g.cs
+++ b/src/libs/Topaz/Generated/Topaz.CompleteUploadClient.g.cs
@@ -73,10 +73,10 @@ public CompleteUploadClient(
/// Client-wide request defaults such as headers, query parameters, retries, and timeout.
/// Dispose the HttpClient when the instance is disposed. True by default.
public CompleteUploadClient(
- global::System.Net.Http.HttpClient? httpClient = null,
- global::System.Uri? baseUri = null,
- global::System.Collections.Generic.List? authorizations = null,
- global::Topaz.AutoSDKClientOptions? options = null,
+ global::System.Net.Http.HttpClient? httpClient,
+ global::System.Uri? baseUri,
+ global::System.Collections.Generic.List? authorizations,
+ global::Topaz.AutoSDKClientOptions? options,
bool disposeHttpClient = true)
{
diff --git a/src/libs/Topaz/Generated/Topaz.CreateExpressRequestClient.CreateExpressVideoRequest.g.cs b/src/libs/Topaz/Generated/Topaz.CreateExpressRequestClient.CreateExpressVideoRequest.g.cs
index 10a0193..57c5a7b 100644
--- a/src/libs/Topaz/Generated/Topaz.CreateExpressRequestClient.CreateExpressVideoRequest.g.cs
+++ b/src/libs/Topaz/Generated/Topaz.CreateExpressRequestClient.CreateExpressVideoRequest.g.cs
@@ -60,6 +60,38 @@ partial void ProcessCreateExpressVideoRequestResponseContent(
///
public async global::System.Threading.Tasks.Task CreateExpressVideoRequestAsync(
+ global::Topaz.CreateExpressVideoRequestRequest request,
+ global::Topaz.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await CreateExpressVideoRequestAsResponseAsync(
+
+ request: request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Create Express Video Request
+ /// Simplified interface for creating new video enhancement requests.
+ /// This endpoint skips the need to gather video information and uses a single-URL upload rather than multi-part upload. Calling the accept and complete-upload endpoints are also no longer necessary.
+ /// This endpoint does not return the cost estimates. Once the system receives and analyzes the source video file, cost estimates will appear in the response of the status endpoint. The lower bound value will be billed.
+ /// The endpoint returns a direct upload URL to our cloud storage for you to HTTP PUT the video file to.
+ /// ## Response body
+ /// | **Property** | **Type** | **Description** |
+ /// |----------------|----------|----------------------------|
+ /// | **requestId** | UUID | Unique request identifier |
+ /// | **uploadId** | String | Upload identifier |
+ /// | **uploadUrls** | Array | URL(s) for uploading video |
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> CreateExpressVideoRequestAsResponseAsync(
+
global::Topaz.CreateExpressVideoRequestRequest request,
global::Topaz.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
@@ -94,6 +126,7 @@ partial void ProcessCreateExpressVideoRequestResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Topaz.PathBuilder(
path: "/video/express",
baseUri: HttpClient.BaseAddress);
@@ -173,6 +206,8 @@ partial void ProcessCreateExpressVideoRequestResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -183,6 +218,11 @@ partial void ProcessCreateExpressVideoRequestResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Topaz.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Topaz.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -200,6 +240,8 @@ partial void ProcessCreateExpressVideoRequestResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -209,8 +251,7 @@ partial void ProcessCreateExpressVideoRequestResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Topaz.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -219,6 +260,11 @@ partial void ProcessCreateExpressVideoRequestResponseContent(
__attempt < __maxAttempts &&
global::Topaz.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Topaz.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Topaz.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Topaz.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -235,14 +281,15 @@ partial void ProcessCreateExpressVideoRequestResponseContent(
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::Topaz.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -282,6 +329,8 @@ partial void ProcessCreateExpressVideoRequestResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -302,6 +351,8 @@ partial void ProcessCreateExpressVideoRequestResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Bad request
@@ -478,9 +529,13 @@ partial void ProcessCreateExpressVideoRequestResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Topaz.CreateExpressResponse.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Topaz.CreateExpressResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Topaz.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Topaz.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -508,9 +563,13 @@ partial void ProcessCreateExpressVideoRequestResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Topaz.CreateExpressResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Topaz.CreateExpressResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Topaz.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Topaz.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Topaz/Generated/Topaz.CreateExpressRequestClient.g.cs b/src/libs/Topaz/Generated/Topaz.CreateExpressRequestClient.g.cs
index 79b4650..1085c51 100644
--- a/src/libs/Topaz/Generated/Topaz.CreateExpressRequestClient.g.cs
+++ b/src/libs/Topaz/Generated/Topaz.CreateExpressRequestClient.g.cs
@@ -73,10 +73,10 @@ public CreateExpressRequestClient(
/// Client-wide request defaults such as headers, query parameters, retries, and timeout.
/// Dispose the HttpClient when the instance is disposed. True by default.
public CreateExpressRequestClient(
- global::System.Net.Http.HttpClient? httpClient = null,
- global::System.Uri? baseUri = null,
- global::System.Collections.Generic.List? authorizations = null,
- global::Topaz.AutoSDKClientOptions? options = null,
+ global::System.Net.Http.HttpClient? httpClient,
+ global::System.Uri? baseUri,
+ global::System.Collections.Generic.List? authorizations,
+ global::Topaz.AutoSDKClientOptions? options,
bool disposeHttpClient = true)
{
diff --git a/src/libs/Topaz/Generated/Topaz.CreateRequestClient.CreateVideoRequest.g.cs b/src/libs/Topaz/Generated/Topaz.CreateRequestClient.CreateVideoRequest.g.cs
index 2f6564b..86dd29f 100644
--- a/src/libs/Topaz/Generated/Topaz.CreateRequestClient.CreateVideoRequest.g.cs
+++ b/src/libs/Topaz/Generated/Topaz.CreateRequestClient.CreateVideoRequest.g.cs
@@ -68,6 +68,46 @@ partial void ProcessCreateVideoRequestResponseContent(
///
public async global::System.Threading.Tasks.Task CreateVideoRequestAsync(
+ global::Topaz.CreateVideoRequestRequest request,
+ global::Topaz.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await CreateVideoRequestAsResponseAsync(
+
+ request: request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Create Video Request
+ /// Create a new video enhancement request.
+ /// Send information about the video and desired enhancements then receive cost and time estimates.
+ /// Calling this endpoint does NOT consume credits.
+ /// Calling this endpoint does NOT start processing.
+ /// Estimations are based on values provided, and the calculation is rerun once the system receives the source video. If the second estimate is significantly different than the initial values, the request is failed and the credits are fully refunded.
+ /// The lower bound value of the cost estimate is billed.
+ /// Time estimates are in development and may not be accurate.
+ /// ## Response body
+ /// | **Property** | **Type** | **Description** |
+ /// |---------------|----------|-------------------------------------|
+ /// | **requestId** | UUID | Unique request identifier |
+ /// | **estimates** | Object | Refer to **RequestEstimates** below |
+ /// #### RequestEstimates
+ /// `cost` and `time` are arrays with two integers each, representing lower and upper bounds of the estimate.
+ /// | **Property** | **Type** | **Description** |
+ /// |--------------|----------|-------------------------|
+ /// | **cost** | Array | Cost range (in credits) |
+ /// | **time** | Array | Time range (in seconds) |
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> CreateVideoRequestAsResponseAsync(
+
global::Topaz.CreateVideoRequestRequest request,
global::Topaz.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
@@ -102,6 +142,7 @@ partial void ProcessCreateVideoRequestResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Topaz.PathBuilder(
path: "/video/",
baseUri: HttpClient.BaseAddress);
@@ -181,6 +222,8 @@ partial void ProcessCreateVideoRequestResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -191,6 +234,11 @@ partial void ProcessCreateVideoRequestResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Topaz.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Topaz.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -208,6 +256,8 @@ partial void ProcessCreateVideoRequestResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -217,8 +267,7 @@ partial void ProcessCreateVideoRequestResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Topaz.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -227,6 +276,11 @@ partial void ProcessCreateVideoRequestResponseContent(
__attempt < __maxAttempts &&
global::Topaz.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Topaz.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Topaz.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Topaz.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -243,14 +297,15 @@ partial void ProcessCreateVideoRequestResponseContent(
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::Topaz.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -290,6 +345,8 @@ partial void ProcessCreateVideoRequestResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -310,6 +367,8 @@ partial void ProcessCreateVideoRequestResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Bad request
@@ -486,9 +545,13 @@ partial void ProcessCreateVideoRequestResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Topaz.CreateResponse.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Topaz.CreateResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Topaz.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Topaz.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -516,9 +579,13 @@ partial void ProcessCreateVideoRequestResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Topaz.CreateResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Topaz.CreateResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Topaz.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Topaz.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Topaz/Generated/Topaz.CreateRequestClient.g.cs b/src/libs/Topaz/Generated/Topaz.CreateRequestClient.g.cs
index 939b894..d504804 100644
--- a/src/libs/Topaz/Generated/Topaz.CreateRequestClient.g.cs
+++ b/src/libs/Topaz/Generated/Topaz.CreateRequestClient.g.cs
@@ -73,10 +73,10 @@ public CreateRequestClient(
/// Client-wide request defaults such as headers, query parameters, retries, and timeout.
/// Dispose the HttpClient when the instance is disposed. True by default.
public CreateRequestClient(
- global::System.Net.Http.HttpClient? httpClient = null,
- global::System.Uri? baseUri = null,
- global::System.Collections.Generic.List? authorizations = null,
- global::Topaz.AutoSDKClientOptions? options = null,
+ global::System.Net.Http.HttpClient? httpClient,
+ global::System.Uri? baseUri,
+ global::System.Collections.Generic.List? authorizations,
+ global::Topaz.AutoSDKClientOptions? options,
bool disposeHttpClient = true)
{
diff --git a/src/libs/Topaz/Generated/Topaz.DeleteFilesClient.DeleteVideoFiles.g.cs b/src/libs/Topaz/Generated/Topaz.DeleteFilesClient.DeleteVideoFiles.g.cs
index 7b0e1af..056085f 100644
--- a/src/libs/Topaz/Generated/Topaz.DeleteFilesClient.DeleteVideoFiles.g.cs
+++ b/src/libs/Topaz/Generated/Topaz.DeleteFilesClient.DeleteVideoFiles.g.cs
@@ -51,6 +51,28 @@ partial void ProcessDeleteVideoFilesResponse(
global::System.Guid requestId,
global::Topaz.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await DeleteVideoFilesAsResponseAsync(
+ requestId: requestId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Delete Video Files
+ /// This endpoint will delete your source and enhanced video files associated with the request from Topaz Labs storage, if any exists.
+ /// Note: All videos are automatically deleted after 7 days unless you request a shorter TTL.
+ ///
+ ///
+ /// Example: c1f96dc2-c448-00e6-82ed-14ecb6403c62
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task DeleteVideoFilesAsResponseAsync(
+ global::System.Guid requestId,
+ global::Topaz.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -80,6 +102,7 @@ partial void ProcessDeleteVideoFilesResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Topaz.PathBuilder(
path: $"/video/{requestId}/media",
baseUri: HttpClient.BaseAddress);
@@ -153,6 +176,8 @@ partial void ProcessDeleteVideoFilesResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -163,6 +188,11 @@ partial void ProcessDeleteVideoFilesResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Topaz.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Topaz.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -180,6 +210,8 @@ partial void ProcessDeleteVideoFilesResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -189,8 +221,7 @@ partial void ProcessDeleteVideoFilesResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Topaz.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -199,6 +230,11 @@ partial void ProcessDeleteVideoFilesResponse(
__attempt < __maxAttempts &&
global::Topaz.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Topaz.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Topaz.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Topaz.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -215,14 +251,15 @@ partial void ProcessDeleteVideoFilesResponse(
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::Topaz.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -262,6 +299,8 @@ partial void ProcessDeleteVideoFilesResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -282,6 +321,8 @@ partial void ProcessDeleteVideoFilesResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Bad request
@@ -492,6 +533,10 @@ partial void ProcessDeleteVideoFilesResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Topaz.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Topaz.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -513,6 +558,10 @@ partial void ProcessDeleteVideoFilesResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Topaz.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Topaz.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Topaz/Generated/Topaz.DeleteFilesClient.g.cs b/src/libs/Topaz/Generated/Topaz.DeleteFilesClient.g.cs
index b53dd5e..4765ca6 100644
--- a/src/libs/Topaz/Generated/Topaz.DeleteFilesClient.g.cs
+++ b/src/libs/Topaz/Generated/Topaz.DeleteFilesClient.g.cs
@@ -73,10 +73,10 @@ public DeleteFilesClient(
/// Client-wide request defaults such as headers, query parameters, retries, and timeout.
/// Dispose the HttpClient when the instance is disposed. True by default.
public DeleteFilesClient(
- global::System.Net.Http.HttpClient? httpClient = null,
- global::System.Uri? baseUri = null,
- global::System.Collections.Generic.List? authorizations = null,
- global::Topaz.AutoSDKClientOptions? options = null,
+ global::System.Net.Http.HttpClient? httpClient,
+ global::System.Uri? baseUri,
+ global::System.Collections.Generic.List? authorizations,
+ global::Topaz.AutoSDKClientOptions? options,
bool disposeHttpClient = true)
{
diff --git a/src/libs/Topaz/Generated/Topaz.DenoiseClient.PostDenoise.g.cs b/src/libs/Topaz/Generated/Topaz.DenoiseClient.PostDenoise.g.cs
index 8978179..8830941 100644
--- a/src/libs/Topaz/Generated/Topaz.DenoiseClient.PostDenoise.g.cs
+++ b/src/libs/Topaz/Generated/Topaz.DenoiseClient.PostDenoise.g.cs
@@ -114,10 +114,11 @@ partial void ProcessPostDenoiseResponseContent(
var __maxAttempts = global::Topaz.AutoSDKRequestOptionsSupport.GetMaxAttempts(
clientOptions: Options,
requestOptions: requestOptions,
- supportsRetry: true);
+ supportsRetry: false);
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Topaz.PathBuilder(
path: "/image/v1/denoise/async",
baseUri: HttpClient.BaseAddress);
@@ -150,6 +151,7 @@ partial void ProcessPostDenoiseResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
+
var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent();
if (request.Image != default)
{
@@ -157,43 +159,51 @@ partial void ProcessPostDenoiseResponseContent(
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent(request.Image ?? string.Empty),
name: "\"image\"");
- }
+
+ }
if (request.SourceId != default)
{
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent(request.SourceId ?? string.Empty),
name: "\"source_id\"");
- }
+
+ }
if (request.SourceUrl != default)
{
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent(request.SourceUrl ?? string.Empty),
name: "\"source_url\"");
- }
+
+ }
if (request.Model != default)
{
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent((request.Model).HasValue ? (request.Model).GetValueOrDefault().ToValueString() : string.Empty),
name: "\"model\"");
- }
+
+ }
if (request.OutputFormat != default)
{
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent((request.OutputFormat).HasValue ? (request.OutputFormat).GetValueOrDefault().ToValueString() : string.Empty),
name: "\"output_format\"");
- }
+
+ }
if (request.WebhookUrl != default)
{
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent(request.WebhookUrl ?? string.Empty),
name: "\"webhook_url\"");
+
}
+
__httpRequest.Content = __httpRequestContent;
+
global::Topaz.AutoSDKRequestOptionsSupport.ApplyHeaders(
request: __httpRequest,
clientHeaders: Options.Headers,
@@ -235,6 +245,8 @@ partial void ProcessPostDenoiseResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -245,6 +257,11 @@ partial void ProcessPostDenoiseResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Topaz.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Topaz.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -262,6 +279,8 @@ partial void ProcessPostDenoiseResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -271,8 +290,7 @@ partial void ProcessPostDenoiseResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Topaz.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -281,6 +299,11 @@ partial void ProcessPostDenoiseResponseContent(
__attempt < __maxAttempts &&
global::Topaz.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Topaz.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Topaz.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Topaz.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -297,14 +320,15 @@ partial void ProcessPostDenoiseResponseContent(
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::Topaz.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -344,6 +368,8 @@ partial void ProcessPostDenoiseResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -364,6 +390,8 @@ partial void ProcessPostDenoiseResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request contains malformed data in the body, path, or query parameters.
@@ -811,6 +839,7 @@ partial void ProcessPostDenoiseResponseContent(
return new global::Topaz.AutoSDKHttpResponse(
statusCode: __response.StatusCode,
headers: global::Topaz.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
body: __value);
}
catch (global::System.Exception __ex)
@@ -844,6 +873,7 @@ partial void ProcessPostDenoiseResponseContent(
return new global::Topaz.AutoSDKHttpResponse(
statusCode: __response.StatusCode,
headers: global::Topaz.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
body: __value);
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Topaz/Generated/Topaz.DenoiseClient.g.cs b/src/libs/Topaz/Generated/Topaz.DenoiseClient.g.cs
index e201f4c..5c92a19 100644
--- a/src/libs/Topaz/Generated/Topaz.DenoiseClient.g.cs
+++ b/src/libs/Topaz/Generated/Topaz.DenoiseClient.g.cs
@@ -78,10 +78,10 @@ public DenoiseClient(
/// Client-wide request defaults such as headers, query parameters, retries, and timeout.
/// Dispose the HttpClient when the instance is disposed. True by default.
public DenoiseClient(
- global::System.Net.Http.HttpClient? httpClient = null,
- global::System.Uri? baseUri = null,
- global::System.Collections.Generic.List? authorizations = null,
- global::Topaz.AutoSDKClientOptions? options = null,
+ global::System.Net.Http.HttpClient? httpClient,
+ global::System.Uri? baseUri,
+ global::System.Collections.Generic.List? authorizations,
+ global::Topaz.AutoSDKClientOptions? options,
bool disposeHttpClient = true)
{
diff --git a/src/libs/Topaz/Generated/Topaz.DownloadClient.GetDownloadInput.g.cs b/src/libs/Topaz/Generated/Topaz.DownloadClient.GetDownloadInput.g.cs
index 45fd873..01dbf41 100644
--- a/src/libs/Topaz/Generated/Topaz.DownloadClient.GetDownloadInput.g.cs
+++ b/src/libs/Topaz/Generated/Topaz.DownloadClient.GetDownloadInput.g.cs
@@ -53,6 +53,27 @@ partial void ProcessGetDownloadInputResponseContent(
global::System.Guid processId,
global::Topaz.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await GetDownloadInputAsResponseAsync(
+ processId: processId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Download Input
+ /// A presigned download link to the input image is provided in the response, as well as an expiration time (in Unix time). Input images are stored for **7 days** after the image has been uploaded.
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> GetDownloadInputAsResponseAsync(
+ global::System.Guid processId,
+ global::Topaz.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -82,6 +103,7 @@ partial void ProcessGetDownloadInputResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Topaz.PathBuilder(
path: $"/image/v1/download/input/{processId}",
baseUri: HttpClient.BaseAddress);
@@ -155,6 +177,8 @@ partial void ProcessGetDownloadInputResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -165,6 +189,11 @@ partial void ProcessGetDownloadInputResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Topaz.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Topaz.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -182,6 +211,8 @@ partial void ProcessGetDownloadInputResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -191,8 +222,7 @@ partial void ProcessGetDownloadInputResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Topaz.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -201,6 +231,11 @@ partial void ProcessGetDownloadInputResponseContent(
__attempt < __maxAttempts &&
global::Topaz.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Topaz.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Topaz.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Topaz.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -217,14 +252,15 @@ partial void ProcessGetDownloadInputResponseContent(
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::Topaz.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -264,6 +300,8 @@ partial void ProcessGetDownloadInputResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -284,6 +322,8 @@ partial void ProcessGetDownloadInputResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request contains malformed data in the body, path, or query parameters.
@@ -536,9 +576,13 @@ partial void ProcessGetDownloadInputResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Topaz.DownloadResponse.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Topaz.DownloadResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Topaz.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Topaz.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -566,9 +610,13 @@ partial void ProcessGetDownloadInputResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Topaz.DownloadResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Topaz.DownloadResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Topaz.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Topaz.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Topaz/Generated/Topaz.DownloadClient.GetDownloadOutput.g.cs b/src/libs/Topaz/Generated/Topaz.DownloadClient.GetDownloadOutput.g.cs
index 3830298..bffed66 100644
--- a/src/libs/Topaz/Generated/Topaz.DownloadClient.GetDownloadOutput.g.cs
+++ b/src/libs/Topaz/Generated/Topaz.DownloadClient.GetDownloadOutput.g.cs
@@ -53,6 +53,27 @@ partial void ProcessGetDownloadOutputResponseContent(
global::System.Guid processId,
global::Topaz.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await GetDownloadOutputAsResponseAsync(
+ processId: processId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Download Output
+ /// A presigned download link to the image is provided in the response, as well as an expiration time (in Unix time). If the image is not ready, this request will fail with a conflict error. Images are stored for **7 days** after the image has been processed.
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> GetDownloadOutputAsResponseAsync(
+ global::System.Guid processId,
+ global::Topaz.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -82,6 +103,7 @@ partial void ProcessGetDownloadOutputResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Topaz.PathBuilder(
path: $"/image/v1/download/{processId}",
baseUri: HttpClient.BaseAddress);
@@ -155,6 +177,8 @@ partial void ProcessGetDownloadOutputResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -165,6 +189,11 @@ partial void ProcessGetDownloadOutputResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Topaz.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Topaz.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -182,6 +211,8 @@ partial void ProcessGetDownloadOutputResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -191,8 +222,7 @@ partial void ProcessGetDownloadOutputResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Topaz.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -201,6 +231,11 @@ partial void ProcessGetDownloadOutputResponseContent(
__attempt < __maxAttempts &&
global::Topaz.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Topaz.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Topaz.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Topaz.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -217,14 +252,15 @@ partial void ProcessGetDownloadOutputResponseContent(
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::Topaz.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -264,6 +300,8 @@ partial void ProcessGetDownloadOutputResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -284,6 +322,8 @@ partial void ProcessGetDownloadOutputResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request contains malformed data in the body, path, or query parameters.
@@ -574,9 +614,13 @@ partial void ProcessGetDownloadOutputResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Topaz.DownloadResponse.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Topaz.DownloadResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Topaz.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Topaz.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -604,9 +648,13 @@ partial void ProcessGetDownloadOutputResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Topaz.DownloadResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Topaz.DownloadResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Topaz.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Topaz.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Topaz/Generated/Topaz.DownloadClient.g.cs b/src/libs/Topaz/Generated/Topaz.DownloadClient.g.cs
index e85dc0e..eabccdd 100644
--- a/src/libs/Topaz/Generated/Topaz.DownloadClient.g.cs
+++ b/src/libs/Topaz/Generated/Topaz.DownloadClient.g.cs
@@ -73,10 +73,10 @@ public DownloadClient(
/// Client-wide request defaults such as headers, query parameters, retries, and timeout.
/// Dispose the HttpClient when the instance is disposed. True by default.
public DownloadClient(
- global::System.Net.Http.HttpClient? httpClient = null,
- global::System.Uri? baseUri = null,
- global::System.Collections.Generic.List? authorizations = null,
- global::Topaz.AutoSDKClientOptions? options = null,
+ global::System.Net.Http.HttpClient? httpClient,
+ global::System.Uri? baseUri,
+ global::System.Collections.Generic.List? authorizations,
+ global::Topaz.AutoSDKClientOptions? options,
bool disposeHttpClient = true)
{
diff --git a/src/libs/Topaz/Generated/Topaz.EnhanceClient.PostEnhance.g.cs b/src/libs/Topaz/Generated/Topaz.EnhanceClient.PostEnhance.g.cs
index f94fc01..a3e8635 100644
--- a/src/libs/Topaz/Generated/Topaz.EnhanceClient.PostEnhance.g.cs
+++ b/src/libs/Topaz/Generated/Topaz.EnhanceClient.PostEnhance.g.cs
@@ -114,10 +114,11 @@ partial void ProcessPostEnhanceResponseContent(
var __maxAttempts = global::Topaz.AutoSDKRequestOptionsSupport.GetMaxAttempts(
clientOptions: Options,
requestOptions: requestOptions,
- supportsRetry: true);
+ supportsRetry: false);
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Topaz.PathBuilder(
path: "/image/v1/enhance/async",
baseUri: HttpClient.BaseAddress);
@@ -150,6 +151,7 @@ partial void ProcessPostEnhanceResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
+
var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent();
if (request.Image != default)
{
@@ -157,64 +159,75 @@ partial void ProcessPostEnhanceResponseContent(
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent(request.Image ?? string.Empty),
name: "\"image\"");
- }
+
+ }
if (request.SourceId != default)
{
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent(request.SourceId ?? string.Empty),
name: "\"source_id\"");
- }
+
+ }
if (request.SourceUrl != default)
{
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent(request.SourceUrl ?? string.Empty),
name: "\"source_url\"");
- }
+
+ }
if (request.Model != default)
{
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent((request.Model).HasValue ? (request.Model).GetValueOrDefault().ToValueString() : string.Empty),
name: "\"model\"");
- }
+
+ }
if (request.OutputHeight != default)
{
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent(global::System.Convert.ToString(request.OutputHeight, global::System.Globalization.CultureInfo.InvariantCulture) ?? string.Empty),
name: "\"output_height\"");
- }
+
+ }
if (request.OutputWidth != default)
{
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent(global::System.Convert.ToString(request.OutputWidth, global::System.Globalization.CultureInfo.InvariantCulture) ?? string.Empty),
name: "\"output_width\"");
- }
+
+ }
if (request.CropToFill != default)
{
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent((global::System.Convert.ToString(request.CropToFill, global::System.Globalization.CultureInfo.InvariantCulture) ?? string.Empty).ToLowerInvariant()),
name: "\"crop_to_fill\"");
- }
+
+ }
if (request.OutputFormat != default)
{
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent((request.OutputFormat).HasValue ? (request.OutputFormat).GetValueOrDefault().ToValueString() : string.Empty),
name: "\"output_format\"");
- }
+
+ }
if (request.WebhookUrl != default)
{
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent(request.WebhookUrl ?? string.Empty),
name: "\"webhook_url\"");
+
}
+
__httpRequest.Content = __httpRequestContent;
+
global::Topaz.AutoSDKRequestOptionsSupport.ApplyHeaders(
request: __httpRequest,
clientHeaders: Options.Headers,
@@ -256,6 +269,8 @@ partial void ProcessPostEnhanceResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -266,6 +281,11 @@ partial void ProcessPostEnhanceResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Topaz.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Topaz.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -283,6 +303,8 @@ partial void ProcessPostEnhanceResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -292,8 +314,7 @@ partial void ProcessPostEnhanceResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Topaz.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -302,6 +323,11 @@ partial void ProcessPostEnhanceResponseContent(
__attempt < __maxAttempts &&
global::Topaz.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Topaz.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Topaz.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Topaz.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -318,14 +344,15 @@ partial void ProcessPostEnhanceResponseContent(
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::Topaz.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -365,6 +392,8 @@ partial void ProcessPostEnhanceResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -385,6 +414,8 @@ partial void ProcessPostEnhanceResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request contains malformed data in the body, path, or query parameters.
@@ -832,6 +863,7 @@ partial void ProcessPostEnhanceResponseContent(
return new global::Topaz.AutoSDKHttpResponse(
statusCode: __response.StatusCode,
headers: global::Topaz.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
body: __value);
}
catch (global::System.Exception __ex)
@@ -865,6 +897,7 @@ partial void ProcessPostEnhanceResponseContent(
return new global::Topaz.AutoSDKHttpResponse(
statusCode: __response.StatusCode,
headers: global::Topaz.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
body: __value);
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Topaz/Generated/Topaz.EnhanceClient.PostEnhanceGen.g.cs b/src/libs/Topaz/Generated/Topaz.EnhanceClient.PostEnhanceGen.g.cs
index cc1f073..a1d3ce0 100644
--- a/src/libs/Topaz/Generated/Topaz.EnhanceClient.PostEnhanceGen.g.cs
+++ b/src/libs/Topaz/Generated/Topaz.EnhanceClient.PostEnhanceGen.g.cs
@@ -114,10 +114,11 @@ partial void ProcessPostEnhanceGenResponseContent(
var __maxAttempts = global::Topaz.AutoSDKRequestOptionsSupport.GetMaxAttempts(
clientOptions: Options,
requestOptions: requestOptions,
- supportsRetry: true);
+ supportsRetry: false);
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Topaz.PathBuilder(
path: "/image/v1/enhance-gen/async",
baseUri: HttpClient.BaseAddress);
@@ -150,6 +151,7 @@ partial void ProcessPostEnhanceGenResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
+
var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent();
if (request.Image != default)
{
@@ -157,64 +159,75 @@ partial void ProcessPostEnhanceGenResponseContent(
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent(request.Image ?? string.Empty),
name: "\"image\"");
- }
+
+ }
if (request.SourceId != default)
{
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent(request.SourceId ?? string.Empty),
name: "\"source_id\"");
- }
+
+ }
if (request.SourceUrl != default)
{
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent(request.SourceUrl ?? string.Empty),
name: "\"source_url\"");
- }
+
+ }
if (request.Model != default)
{
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent((request.Model).HasValue ? (request.Model).GetValueOrDefault().ToValueString() : string.Empty),
name: "\"model\"");
- }
+
+ }
if (request.OutputHeight != default)
{
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent(global::System.Convert.ToString(request.OutputHeight, global::System.Globalization.CultureInfo.InvariantCulture) ?? string.Empty),
name: "\"output_height\"");
- }
+
+ }
if (request.OutputWidth != default)
{
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent(global::System.Convert.ToString(request.OutputWidth, global::System.Globalization.CultureInfo.InvariantCulture) ?? string.Empty),
name: "\"output_width\"");
- }
+
+ }
if (request.CropToFill != default)
{
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent((global::System.Convert.ToString(request.CropToFill, global::System.Globalization.CultureInfo.InvariantCulture) ?? string.Empty).ToLowerInvariant()),
name: "\"crop_to_fill\"");
- }
+
+ }
if (request.OutputFormat != default)
{
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent((request.OutputFormat).HasValue ? (request.OutputFormat).GetValueOrDefault().ToValueString() : string.Empty),
name: "\"output_format\"");
- }
+
+ }
if (request.WebhookUrl != default)
{
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent(request.WebhookUrl ?? string.Empty),
name: "\"webhook_url\"");
+
}
+
__httpRequest.Content = __httpRequestContent;
+
global::Topaz.AutoSDKRequestOptionsSupport.ApplyHeaders(
request: __httpRequest,
clientHeaders: Options.Headers,
@@ -256,6 +269,8 @@ partial void ProcessPostEnhanceGenResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -266,6 +281,11 @@ partial void ProcessPostEnhanceGenResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Topaz.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Topaz.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -283,6 +303,8 @@ partial void ProcessPostEnhanceGenResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -292,8 +314,7 @@ partial void ProcessPostEnhanceGenResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Topaz.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -302,6 +323,11 @@ partial void ProcessPostEnhanceGenResponseContent(
__attempt < __maxAttempts &&
global::Topaz.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Topaz.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Topaz.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Topaz.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -318,14 +344,15 @@ partial void ProcessPostEnhanceGenResponseContent(
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::Topaz.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -365,6 +392,8 @@ partial void ProcessPostEnhanceGenResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -385,6 +414,8 @@ partial void ProcessPostEnhanceGenResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request contains malformed data in the body, path, or query parameters.
@@ -832,6 +863,7 @@ partial void ProcessPostEnhanceGenResponseContent(
return new global::Topaz.AutoSDKHttpResponse(
statusCode: __response.StatusCode,
headers: global::Topaz.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
body: __value);
}
catch (global::System.Exception __ex)
@@ -865,6 +897,7 @@ partial void ProcessPostEnhanceGenResponseContent(
return new global::Topaz.AutoSDKHttpResponse(
statusCode: __response.StatusCode,
headers: global::Topaz.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
body: __value);
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Topaz/Generated/Topaz.EnhanceClient.g.cs b/src/libs/Topaz/Generated/Topaz.EnhanceClient.g.cs
index 4a17479..668dca4 100644
--- a/src/libs/Topaz/Generated/Topaz.EnhanceClient.g.cs
+++ b/src/libs/Topaz/Generated/Topaz.EnhanceClient.g.cs
@@ -81,10 +81,10 @@ public EnhanceClient(
/// Client-wide request defaults such as headers, query parameters, retries, and timeout.
/// Dispose the HttpClient when the instance is disposed. True by default.
public EnhanceClient(
- global::System.Net.Http.HttpClient? httpClient = null,
- global::System.Uri? baseUri = null,
- global::System.Collections.Generic.List? authorizations = null,
- global::Topaz.AutoSDKClientOptions? options = null,
+ global::System.Net.Http.HttpClient? httpClient,
+ global::System.Uri? baseUri,
+ global::System.Collections.Generic.List? authorizations,
+ global::Topaz.AutoSDKClientOptions? options,
bool disposeHttpClient = true)
{
diff --git a/src/libs/Topaz/Generated/Topaz.EstimateClient.PostEstimate.g.cs b/src/libs/Topaz/Generated/Topaz.EstimateClient.PostEstimate.g.cs
index 14595fe..8cfe159 100644
--- a/src/libs/Topaz/Generated/Topaz.EstimateClient.PostEstimate.g.cs
+++ b/src/libs/Topaz/Generated/Topaz.EstimateClient.PostEstimate.g.cs
@@ -51,6 +51,29 @@ partial void ProcessPostEstimateResponseContent(
///
public async global::System.Threading.Tasks.Task PostEstimateAsync(
+ global::Topaz.EstimateGANRequest request,
+ global::Topaz.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await PostEstimateAsResponseAsync(
+
+ request: request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Estimate
+ /// Validates the request against our standard models and returns the estimated time taken to complete a given processing job and the credits that would be consumed for that job.
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> PostEstimateAsResponseAsync(
+
global::Topaz.EstimateGANRequest request,
global::Topaz.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
@@ -81,10 +104,11 @@ partial void ProcessPostEstimateResponseContent(
var __maxAttempts = global::Topaz.AutoSDKRequestOptionsSupport.GetMaxAttempts(
clientOptions: Options,
requestOptions: requestOptions,
- supportsRetry: true);
+ supportsRetry: false);
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Topaz.PathBuilder(
path: "/image/v1/estimate",
baseUri: HttpClient.BaseAddress);
@@ -117,6 +141,7 @@ partial void ProcessPostEstimateResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
+
var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent();
if (request.Category != default)
{
@@ -124,49 +149,59 @@ partial void ProcessPostEstimateResponseContent(
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent((request.Category).HasValue ? (request.Category).GetValueOrDefault().ToValueString() : string.Empty),
name: "\"category\"");
- }
+
+ }
if (request.Model != default)
{
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent((request.Model).HasValue ? (request.Model).GetValueOrDefault().ToValueString() : string.Empty),
name: "\"model\"");
+
}
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent(global::System.Convert.ToString(request.InputHeight, global::System.Globalization.CultureInfo.InvariantCulture) ?? string.Empty),
name: "\"input_height\"");
+
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent(global::System.Convert.ToString(request.InputWidth, global::System.Globalization.CultureInfo.InvariantCulture) ?? string.Empty),
name: "\"input_width\"");
+
if (request.OutputHeight != default)
{
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent(global::System.Convert.ToString(request.OutputHeight, global::System.Globalization.CultureInfo.InvariantCulture) ?? string.Empty),
name: "\"output_height\"");
- }
+
+ }
if (request.OutputWidth != default)
{
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent(global::System.Convert.ToString(request.OutputWidth, global::System.Globalization.CultureInfo.InvariantCulture) ?? string.Empty),
name: "\"output_width\"");
- }
+
+ }
if (request.CropToFill != default)
{
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent((global::System.Convert.ToString(request.CropToFill, global::System.Globalization.CultureInfo.InvariantCulture) ?? string.Empty).ToLowerInvariant()),
name: "\"crop_to_fill\"");
- }
+
+ }
if (request.OutputFormat != default)
{
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent((request.OutputFormat).HasValue ? (request.OutputFormat).GetValueOrDefault().ToValueString() : string.Empty),
name: "\"output_format\"");
+
}
+
__httpRequest.Content = __httpRequestContent;
+
global::Topaz.AutoSDKRequestOptionsSupport.ApplyHeaders(
request: __httpRequest,
clientHeaders: Options.Headers,
@@ -208,6 +243,8 @@ partial void ProcessPostEstimateResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -218,6 +255,11 @@ partial void ProcessPostEstimateResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Topaz.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Topaz.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -235,6 +277,8 @@ partial void ProcessPostEstimateResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -244,8 +288,7 @@ partial void ProcessPostEstimateResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Topaz.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -254,6 +297,11 @@ partial void ProcessPostEstimateResponseContent(
__attempt < __maxAttempts &&
global::Topaz.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Topaz.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Topaz.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Topaz.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -270,14 +318,15 @@ partial void ProcessPostEstimateResponseContent(
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::Topaz.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -317,6 +366,8 @@ partial void ProcessPostEstimateResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -337,6 +388,8 @@ partial void ProcessPostEstimateResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request contains malformed data in the body, path, or query parameters.
@@ -551,9 +604,13 @@ partial void ProcessPostEstimateResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Topaz.EstimationResponse.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Topaz.EstimationResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Topaz.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Topaz.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -581,9 +638,13 @@ partial void ProcessPostEstimateResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Topaz.EstimationResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Topaz.EstimationResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Topaz.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Topaz.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Topaz/Generated/Topaz.EstimateClient.PostEstimateBulk.g.cs b/src/libs/Topaz/Generated/Topaz.EstimateClient.PostEstimateBulk.g.cs
index 69120f0..2cd4924 100644
--- a/src/libs/Topaz/Generated/Topaz.EstimateClient.PostEstimateBulk.g.cs
+++ b/src/libs/Topaz/Generated/Topaz.EstimateClient.PostEstimateBulk.g.cs
@@ -51,6 +51,29 @@ partial void ProcessPostEstimateBulkResponseContent(
///
public async global::System.Threading.Tasks.Task>> PostEstimateBulkAsync(
+ global::System.Collections.Generic.IList request,
+ global::Topaz.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await PostEstimateBulkAsResponseAsync(
+
+ request: request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Estimate Bulk
+ /// Validates a list of requests and returns the estimated time taken to complete a given processing job and the credits that would be consumed for each job.
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task>>> PostEstimateBulkAsResponseAsync(
+
global::System.Collections.Generic.IList request,
global::Topaz.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
@@ -85,6 +108,7 @@ partial void ProcessPostEstimateBulkResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Topaz.PathBuilder(
path: "/image/v1/estimate-bulk",
baseUri: HttpClient.BaseAddress);
@@ -164,6 +188,8 @@ partial void ProcessPostEstimateBulkResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -174,6 +200,11 @@ partial void ProcessPostEstimateBulkResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Topaz.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Topaz.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -191,6 +222,8 @@ partial void ProcessPostEstimateBulkResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -200,8 +233,7 @@ partial void ProcessPostEstimateBulkResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Topaz.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -210,6 +242,11 @@ partial void ProcessPostEstimateBulkResponseContent(
__attempt < __maxAttempts &&
global::Topaz.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Topaz.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Topaz.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Topaz.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -226,14 +263,15 @@ partial void ProcessPostEstimateBulkResponseContent(
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::Topaz.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -273,6 +311,8 @@ partial void ProcessPostEstimateBulkResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -293,6 +333,8 @@ partial void ProcessPostEstimateBulkResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request contains malformed data in the body, path, or query parameters.
@@ -507,9 +549,13 @@ partial void ProcessPostEstimateBulkResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- (global::System.Collections.Generic.IList>?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList>), JsonSerializerContext) ??
+ var __value = (global::System.Collections.Generic.IList>?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList>), JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Topaz.AutoSDKHttpResponse>>(
+ statusCode: __response.StatusCode,
+ headers: global::Topaz.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -537,9 +583,13 @@ partial void ProcessPostEstimateBulkResponseContent(
#endif
).ConfigureAwait(false);
- return
- (global::System.Collections.Generic.IList>?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList>), JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = (global::System.Collections.Generic.IList>?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList>), JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Topaz.AutoSDKHttpResponse>>(
+ statusCode: __response.StatusCode,
+ headers: global::Topaz.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Topaz/Generated/Topaz.EstimateClient.PostEstimateGen.g.cs b/src/libs/Topaz/Generated/Topaz.EstimateClient.PostEstimateGen.g.cs
index 5cbe5ea..f1ecb78 100644
--- a/src/libs/Topaz/Generated/Topaz.EstimateClient.PostEstimateGen.g.cs
+++ b/src/libs/Topaz/Generated/Topaz.EstimateClient.PostEstimateGen.g.cs
@@ -51,6 +51,29 @@ partial void ProcessPostEstimateGenResponseContent(
///
public async global::System.Threading.Tasks.Task PostEstimateGenAsync(
+ global::Topaz.EstimateGenRequest request,
+ global::Topaz.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await PostEstimateGenAsResponseAsync(
+
+ request: request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Estimate Generative
+ /// Validates the request against our generative models and returns the estimated time taken to complete a given processing job and the credits that would be consumed for that job.
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> PostEstimateGenAsResponseAsync(
+
global::Topaz.EstimateGenRequest request,
global::Topaz.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
@@ -81,10 +104,11 @@ partial void ProcessPostEstimateGenResponseContent(
var __maxAttempts = global::Topaz.AutoSDKRequestOptionsSupport.GetMaxAttempts(
clientOptions: Options,
requestOptions: requestOptions,
- supportsRetry: true);
+ supportsRetry: false);
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Topaz.PathBuilder(
path: "/image/v1/estimate-gen",
baseUri: HttpClient.BaseAddress);
@@ -117,6 +141,7 @@ partial void ProcessPostEstimateGenResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
+
var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent();
if (request.Category != default)
{
@@ -124,49 +149,59 @@ partial void ProcessPostEstimateGenResponseContent(
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent((request.Category).HasValue ? (request.Category).GetValueOrDefault().ToValueString() : string.Empty),
name: "\"category\"");
- }
+
+ }
if (request.Model != default)
{
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent((request.Model).HasValue ? (request.Model).GetValueOrDefault().ToValueString() : string.Empty),
name: "\"model\"");
+
}
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent(global::System.Convert.ToString(request.InputHeight, global::System.Globalization.CultureInfo.InvariantCulture) ?? string.Empty),
name: "\"input_height\"");
+
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent(global::System.Convert.ToString(request.InputWidth, global::System.Globalization.CultureInfo.InvariantCulture) ?? string.Empty),
name: "\"input_width\"");
+
if (request.OutputHeight != default)
{
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent(global::System.Convert.ToString(request.OutputHeight, global::System.Globalization.CultureInfo.InvariantCulture) ?? string.Empty),
name: "\"output_height\"");
- }
+
+ }
if (request.OutputWidth != default)
{
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent(global::System.Convert.ToString(request.OutputWidth, global::System.Globalization.CultureInfo.InvariantCulture) ?? string.Empty),
name: "\"output_width\"");
- }
+
+ }
if (request.CropToFill != default)
{
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent((global::System.Convert.ToString(request.CropToFill, global::System.Globalization.CultureInfo.InvariantCulture) ?? string.Empty).ToLowerInvariant()),
name: "\"crop_to_fill\"");
- }
+
+ }
if (request.OutputFormat != default)
{
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent((request.OutputFormat).HasValue ? (request.OutputFormat).GetValueOrDefault().ToValueString() : string.Empty),
name: "\"output_format\"");
+
}
+
__httpRequest.Content = __httpRequestContent;
+
global::Topaz.AutoSDKRequestOptionsSupport.ApplyHeaders(
request: __httpRequest,
clientHeaders: Options.Headers,
@@ -208,6 +243,8 @@ partial void ProcessPostEstimateGenResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -218,6 +255,11 @@ partial void ProcessPostEstimateGenResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Topaz.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Topaz.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -235,6 +277,8 @@ partial void ProcessPostEstimateGenResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -244,8 +288,7 @@ partial void ProcessPostEstimateGenResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Topaz.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -254,6 +297,11 @@ partial void ProcessPostEstimateGenResponseContent(
__attempt < __maxAttempts &&
global::Topaz.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Topaz.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Topaz.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Topaz.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -270,14 +318,15 @@ partial void ProcessPostEstimateGenResponseContent(
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::Topaz.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -317,6 +366,8 @@ partial void ProcessPostEstimateGenResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -337,6 +388,8 @@ partial void ProcessPostEstimateGenResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request contains malformed data in the body, path, or query parameters.
@@ -551,9 +604,13 @@ partial void ProcessPostEstimateGenResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Topaz.EstimationResponse.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Topaz.EstimationResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Topaz.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Topaz.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -581,9 +638,13 @@ partial void ProcessPostEstimateGenResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Topaz.EstimationResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Topaz.EstimationResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Topaz.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Topaz.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Topaz/Generated/Topaz.EstimateClient.g.cs b/src/libs/Topaz/Generated/Topaz.EstimateClient.g.cs
index 281dc07..c4301dc 100644
--- a/src/libs/Topaz/Generated/Topaz.EstimateClient.g.cs
+++ b/src/libs/Topaz/Generated/Topaz.EstimateClient.g.cs
@@ -73,10 +73,10 @@ public EstimateClient(
/// Client-wide request defaults such as headers, query parameters, retries, and timeout.
/// Dispose the HttpClient when the instance is disposed. True by default.
public EstimateClient(
- global::System.Net.Http.HttpClient? httpClient = null,
- global::System.Uri? baseUri = null,
- global::System.Collections.Generic.List? authorizations = null,
- global::Topaz.AutoSDKClientOptions? options = null,
+ global::System.Net.Http.HttpClient? httpClient,
+ global::System.Uri? baseUri,
+ global::System.Collections.Generic.List? authorizations,
+ global::Topaz.AutoSDKClientOptions? options,
bool disposeHttpClient = true)
{
diff --git a/src/libs/Topaz/Generated/Topaz.GetRequestHistoryClient.GetHistory.g.cs b/src/libs/Topaz/Generated/Topaz.GetRequestHistoryClient.GetHistory.g.cs
index 1ad33e5..2e25d77 100644
--- a/src/libs/Topaz/Generated/Topaz.GetRequestHistoryClient.GetHistory.g.cs
+++ b/src/libs/Topaz/Generated/Topaz.GetRequestHistoryClient.GetHistory.g.cs
@@ -49,6 +49,24 @@ partial void ProcessGetHistoryResponseContent(
public async global::System.Threading.Tasks.Task GetHistoryAsync(
global::Topaz.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await GetHistoryAsResponseAsync(
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Get My Request History
+ /// This endpoint will return your processing history.
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> GetHistoryAsResponseAsync(
+ global::Topaz.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -77,6 +95,7 @@ partial void ProcessGetHistoryResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Topaz.PathBuilder(
path: "/video/history",
baseUri: HttpClient.BaseAddress);
@@ -149,6 +168,8 @@ partial void ProcessGetHistoryResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -159,6 +180,11 @@ partial void ProcessGetHistoryResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Topaz.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Topaz.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -176,6 +202,8 @@ partial void ProcessGetHistoryResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -185,8 +213,7 @@ partial void ProcessGetHistoryResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Topaz.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -195,6 +222,11 @@ partial void ProcessGetHistoryResponseContent(
__attempt < __maxAttempts &&
global::Topaz.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Topaz.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Topaz.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Topaz.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -211,14 +243,15 @@ partial void ProcessGetHistoryResponseContent(
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::Topaz.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -258,6 +291,8 @@ partial void ProcessGetHistoryResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -278,6 +313,8 @@ partial void ProcessGetHistoryResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Unauthorized
@@ -416,9 +453,13 @@ partial void ProcessGetHistoryResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Topaz.GetHistoryResponse.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Topaz.GetHistoryResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Topaz.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Topaz.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -446,9 +487,13 @@ partial void ProcessGetHistoryResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Topaz.GetHistoryResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Topaz.GetHistoryResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Topaz.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Topaz.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Topaz/Generated/Topaz.GetRequestHistoryClient.g.cs b/src/libs/Topaz/Generated/Topaz.GetRequestHistoryClient.g.cs
index 527cd09..710e4ce 100644
--- a/src/libs/Topaz/Generated/Topaz.GetRequestHistoryClient.g.cs
+++ b/src/libs/Topaz/Generated/Topaz.GetRequestHistoryClient.g.cs
@@ -73,10 +73,10 @@ public GetRequestHistoryClient(
/// Client-wide request defaults such as headers, query parameters, retries, and timeout.
/// Dispose the HttpClient when the instance is disposed. True by default.
public GetRequestHistoryClient(
- global::System.Net.Http.HttpClient? httpClient = null,
- global::System.Uri? baseUri = null,
- global::System.Collections.Generic.List? authorizations = null,
- global::Topaz.AutoSDKClientOptions? options = null,
+ global::System.Net.Http.HttpClient? httpClient,
+ global::System.Uri? baseUri,
+ global::System.Collections.Generic.List? authorizations,
+ global::Topaz.AutoSDKClientOptions? options,
bool disposeHttpClient = true)
{
diff --git a/src/libs/Topaz/Generated/Topaz.GetRequestMetricsClient.GetVideoRequestMetrics.g.cs b/src/libs/Topaz/Generated/Topaz.GetRequestMetricsClient.GetVideoRequestMetrics.g.cs
index 9baa154..42e5d86 100644
--- a/src/libs/Topaz/Generated/Topaz.GetRequestMetricsClient.GetVideoRequestMetrics.g.cs
+++ b/src/libs/Topaz/Generated/Topaz.GetRequestMetricsClient.GetVideoRequestMetrics.g.cs
@@ -81,6 +81,55 @@ partial void ProcessGetVideoRequestMetricsResponseContent(
global::System.Guid requestId,
global::Topaz.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await GetVideoRequestMetricsAsResponseAsync(
+ requestId: requestId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Get Video Request Metrics
+ /// Get metrics for the request
+ /// ## Response body
+ /// | **Property** | **Type** | **Description** |
+ /// |---------------------|----------|-----------------------------------------------------|
+ /// | **minutesInState** | Object | Minutes spent in various processing states |
+ /// | **minutesInState.pendingSourceUpload** | Number | - |
+ /// | **minutesInState.initializing** | Number | - |
+ /// | **minutesInState.preprocessing** | Number | - |
+ /// | **minutesInState.processing** | Number | - |
+ /// | **minutesInState.postprocessing** | Number | - |
+ /// | **minutesToEnhance**| Number | Time to complete enhancement after source upload |
+ /// | **inputFrames** | Integer | Number of input frames |
+ /// | **outputFrames** | Integer | Number of output frames |
+ /// | **inputSize** | String | Size of input video |
+ /// | **outputSize** | String | Size of output video |
+ /// | **chunks** | Array | Refer to **VideoChunkMetrics** below |
+ /// ---
+ /// #### VideoChunkMetrics
+ /// | **Property** | **Type** | **Description** |
+ /// |---------------------|------------|--------------------------------------------------|
+ /// | **chunkIndex** | Integer | Index of the chunk |
+ /// | **tasks** | Array | List of processing tasks for the chunk |
+ /// | **tasks.*.minutesProcessing** | Number | Duration of processing in minutes |
+ /// | **tasks.*.inputFrames** | Integer | Number of input frames |
+ /// | **tasks.*.outputFrames** | Integer | Number of output frames |
+ /// | **tasks.*.inputSize** | String | Size of the input file |
+ /// | **tasks.*.outputSize** | String | Size of the output file |
+ ///
+ ///
+ /// Example: c1f96dc2-c448-00e6-82ed-14ecb6403c62
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> GetVideoRequestMetricsAsResponseAsync(
+ global::System.Guid requestId,
+ global::Topaz.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -110,6 +159,7 @@ partial void ProcessGetVideoRequestMetricsResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Topaz.PathBuilder(
path: $"/video/{requestId}/metrics",
baseUri: HttpClient.BaseAddress);
@@ -183,6 +233,8 @@ partial void ProcessGetVideoRequestMetricsResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -193,6 +245,11 @@ partial void ProcessGetVideoRequestMetricsResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Topaz.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Topaz.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -210,6 +267,8 @@ partial void ProcessGetVideoRequestMetricsResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -219,8 +278,7 @@ partial void ProcessGetVideoRequestMetricsResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Topaz.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -229,6 +287,11 @@ partial void ProcessGetVideoRequestMetricsResponseContent(
__attempt < __maxAttempts &&
global::Topaz.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Topaz.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Topaz.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Topaz.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -245,14 +308,15 @@ partial void ProcessGetVideoRequestMetricsResponseContent(
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::Topaz.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -292,6 +356,8 @@ partial void ProcessGetVideoRequestMetricsResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -312,6 +378,8 @@ partial void ProcessGetVideoRequestMetricsResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Unauthorized
@@ -488,9 +556,13 @@ partial void ProcessGetVideoRequestMetricsResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Topaz.MetricsResponse.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Topaz.MetricsResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Topaz.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Topaz.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -518,9 +590,13 @@ partial void ProcessGetVideoRequestMetricsResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Topaz.MetricsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Topaz.MetricsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Topaz.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Topaz.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Topaz/Generated/Topaz.GetRequestMetricsClient.g.cs b/src/libs/Topaz/Generated/Topaz.GetRequestMetricsClient.g.cs
index 92a8651..3747611 100644
--- a/src/libs/Topaz/Generated/Topaz.GetRequestMetricsClient.g.cs
+++ b/src/libs/Topaz/Generated/Topaz.GetRequestMetricsClient.g.cs
@@ -73,10 +73,10 @@ public GetRequestMetricsClient(
/// Client-wide request defaults such as headers, query parameters, retries, and timeout.
/// Dispose the HttpClient when the instance is disposed. True by default.
public GetRequestMetricsClient(
- global::System.Net.Http.HttpClient? httpClient = null,
- global::System.Uri? baseUri = null,
- global::System.Collections.Generic.List? authorizations = null,
- global::Topaz.AutoSDKClientOptions? options = null,
+ global::System.Net.Http.HttpClient? httpClient,
+ global::System.Uri? baseUri,
+ global::System.Collections.Generic.List? authorizations,
+ global::Topaz.AutoSDKClientOptions? options,
bool disposeHttpClient = true)
{
diff --git a/src/libs/Topaz/Generated/Topaz.GetRequestStatusClient.GetVideoRequestStatus.g.cs b/src/libs/Topaz/Generated/Topaz.GetRequestStatusClient.GetVideoRequestStatus.g.cs
index 4ddbffc..186c92d 100644
--- a/src/libs/Topaz/Generated/Topaz.GetRequestStatusClient.GetVideoRequestStatus.g.cs
+++ b/src/libs/Topaz/Generated/Topaz.GetRequestStatusClient.GetVideoRequestStatus.g.cs
@@ -94,6 +94,68 @@ partial void ProcessGetVideoRequestStatusResponseContent(
global::System.Guid requestId,
global::Topaz.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await GetVideoRequestStatusAsResponseAsync(
+ requestId: requestId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Get Video Request Status
+ /// Get status of the request.
+ /// If processing is complete, the response will include a signed URL to access the enhanced video.
+ /// Make sure to download and save the video within the TTL provided in the response (24 hours by default). New URLs with new TTL can be generated by calling this endpoint, but we retain your data for only a limited number of days. The video will be permanently deleted from our system afterwards.
+ /// ## Response body
+ /// | **Property** | **Type** | **Description** |
+ /// |---------------------|----------|-----------------------------------------------------|
+ /// | **status** | String | Current processing status |
+ /// | **progress** | Number | Total request progress (percentage) |
+ /// | **estimates** | Object | Refer to **RequestEstimates** |
+ /// | **outputSize** | String | Size of output video |
+ /// | **averageFps** | Number | Average FPS of processing nodes |
+ /// | **combinedFps** | Number | Combined FPS of all nodes |
+ /// | **processingJobs** | Array | Refer to **VideoProcessingStatIntermediate** below |
+ /// | **download** | Object | Refer to **EnhancedDownloadSignedUrlResponse** below |
+ /// ---
+ /// #### RequestEstimates
+ /// `cost` and `time` are arrays with two integers each, representing lower and upper bounds of the estimate.
+ /// | **Property** | **Type** | **Description** |
+ /// |---------------|----------|-----------------------------------------------------|
+ /// | **cost** | Array | Cost range (in credits) |
+ /// | **time** | Array | Time range (in seconds) |
+ /// ---
+ /// #### VideoProcessingStatIntermediate
+ /// | **Property** | **Type** | **Description** |
+ /// |---------------------|----------|-----------------------------------------------------|
+ /// | **chunkId** | UUID | Unique chunk identifier |
+ /// | **chunkIndex** | Integer | Index of the chunk |
+ /// | **taskIndex** | Integer | Task index for chunk processing |
+ /// | **status** | String | Status (queued, processing, complete, etc.) |
+ /// | **gpuUtilization** | Integer | GPU utilization in percentage |
+ /// | **gpuMemoryUtilization** | Integer | GPU memory usage percentage |
+ /// | **fps** | Number | Processing speed of the node |
+ /// | **progress** | Number | Processing progress (percentage) |
+ /// ---
+ /// #### EnhancedDownloadSignedUrlResponse
+ /// | **Property** | **Type** | **Description** |
+ /// |----------------|-----------|---------------------------------|
+ /// | **url** | String | Signed download URL for the enhanced file |
+ /// | **expiresIn** | Integer | TTL in milliseconds |
+ /// | **expiresAt** | Integer | Time in milliseconds since UTC epoch |
+ ///
+ ///
+ /// Example: c1f96dc2-c448-00e6-82ed-14ecb6403c62
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> GetVideoRequestStatusAsResponseAsync(
+ global::System.Guid requestId,
+ global::Topaz.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -123,6 +185,7 @@ partial void ProcessGetVideoRequestStatusResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Topaz.PathBuilder(
path: $"/video/{requestId}/status",
baseUri: HttpClient.BaseAddress);
@@ -196,6 +259,8 @@ partial void ProcessGetVideoRequestStatusResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -206,6 +271,11 @@ partial void ProcessGetVideoRequestStatusResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Topaz.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Topaz.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -223,6 +293,8 @@ partial void ProcessGetVideoRequestStatusResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -232,8 +304,7 @@ partial void ProcessGetVideoRequestStatusResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Topaz.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -242,6 +313,11 @@ partial void ProcessGetVideoRequestStatusResponseContent(
__attempt < __maxAttempts &&
global::Topaz.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Topaz.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Topaz.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Topaz.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -258,14 +334,15 @@ partial void ProcessGetVideoRequestStatusResponseContent(
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::Topaz.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -305,6 +382,8 @@ partial void ProcessGetVideoRequestStatusResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -325,6 +404,8 @@ partial void ProcessGetVideoRequestStatusResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Unauthorized
@@ -501,9 +582,13 @@ partial void ProcessGetVideoRequestStatusResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Topaz.VideoStatusResponse.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Topaz.VideoStatusResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Topaz.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Topaz.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -531,9 +616,13 @@ partial void ProcessGetVideoRequestStatusResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Topaz.VideoStatusResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Topaz.VideoStatusResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Topaz.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Topaz.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Topaz/Generated/Topaz.GetRequestStatusClient.g.cs b/src/libs/Topaz/Generated/Topaz.GetRequestStatusClient.g.cs
index ce15d8a..48153f4 100644
--- a/src/libs/Topaz/Generated/Topaz.GetRequestStatusClient.g.cs
+++ b/src/libs/Topaz/Generated/Topaz.GetRequestStatusClient.g.cs
@@ -73,10 +73,10 @@ public GetRequestStatusClient(
/// Client-wide request defaults such as headers, query parameters, retries, and timeout.
/// Dispose the HttpClient when the instance is disposed. True by default.
public GetRequestStatusClient(
- global::System.Net.Http.HttpClient? httpClient = null,
- global::System.Uri? baseUri = null,
- global::System.Collections.Generic.List? authorizations = null,
- global::Topaz.AutoSDKClientOptions? options = null,
+ global::System.Net.Http.HttpClient? httpClient,
+ global::System.Uri? baseUri,
+ global::System.Collections.Generic.List? authorizations,
+ global::Topaz.AutoSDKClientOptions? options,
bool disposeHttpClient = true)
{
diff --git a/src/libs/Topaz/Generated/Topaz.IAcceptRequestClient.AcceptVideoRequest.g.cs b/src/libs/Topaz/Generated/Topaz.IAcceptRequestClient.AcceptVideoRequest.g.cs
index 446e7f9..acfbbcf 100644
--- a/src/libs/Topaz/Generated/Topaz.IAcceptRequestClient.AcceptVideoRequest.g.cs
+++ b/src/libs/Topaz/Generated/Topaz.IAcceptRequestClient.AcceptVideoRequest.g.cs
@@ -31,5 +31,32 @@ public partial interface IAcceptRequestClient
global::System.Guid requestId,
global::Topaz.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Accept and Upload Video Request
+ /// Calling this endpoint reserves the estimated credits and returns signed URL(s) for **multi-part upload**.
+ /// ### Video uploads
+ /// The Video API uses multi-part upload to receive the video file for processing. You can use a simple byte-division function to create segments for the API to receive.
+ /// For example, if you have a 900MB video file and the system returns 3 upload URLs. You would then:
+ /// - Upload bytes 0-300,000,000 via HTTP PUT to `urls[0]`
+ /// - Upload bytes 300,000,001-600,000,000 via HTTP PUT to `urls[1]`
+ /// - Upload bytes 600,000,001-900,000,000 via HTTP PUT to `urls[2]`
+ /// If one of the uploads fail, you may reuse the same URL to retry - the action overwrites any partially uploaded data.
+ /// A successful response from the PUT request returns an `ETag` value in the header for each segment. Retain the part number and ETag pair for the next step (PATCH /video/{requestId}/complete-upload/).
+ /// ## Response body
+ /// | **Property** | **Type** | **Description** |
+ /// |---------------|------------|-----------------------------------------------------|
+ /// | **uploadId** | String | Upload ID for multi-part upload |
+ /// | **urls** | Array | URLs for multi-part uploads |
+ ///
+ ///
+ /// Example: c1f96dc2-c448-00e6-82ed-14ecb6403c62
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> AcceptVideoRequestAsResponseAsync(
+ global::System.Guid requestId,
+ global::Topaz.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
}
}
\ No newline at end of file
diff --git a/src/libs/Topaz/Generated/Topaz.ICancelClient.CancelTask.g.cs b/src/libs/Topaz/Generated/Topaz.ICancelClient.CancelTask.g.cs
index d5a77d2..d5c1c6f 100644
--- a/src/libs/Topaz/Generated/Topaz.ICancelClient.CancelTask.g.cs
+++ b/src/libs/Topaz/Generated/Topaz.ICancelClient.CancelTask.g.cs
@@ -16,5 +16,17 @@ public partial interface ICancelClient
global::System.Guid processId,
global::Topaz.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Cancel
+ /// Cancel a pending image processing job. If the job has already completed, or if it is not in a cancellable state, this request will fail with a conflict error. Use this to prevent unnecessary costs for jobs started in error.
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task CancelTaskAsResponseAsync(
+ global::System.Guid processId,
+ global::Topaz.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
}
}
\ No newline at end of file
diff --git a/src/libs/Topaz/Generated/Topaz.ICancelRequestClient.CancelVideoRequest.g.cs b/src/libs/Topaz/Generated/Topaz.ICancelRequestClient.CancelVideoRequest.g.cs
index 02c9a14..2199f9b 100644
--- a/src/libs/Topaz/Generated/Topaz.ICancelRequestClient.CancelVideoRequest.g.cs
+++ b/src/libs/Topaz/Generated/Topaz.ICancelRequestClient.CancelVideoRequest.g.cs
@@ -20,5 +20,21 @@ public partial interface ICancelRequestClient
global::System.Guid requestId,
global::Topaz.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Cancel Video Request
+ /// Cancel a video enhancement request.
+ /// If the request is canceled before any processing starts, then all reserved credits are refunded.
+ /// If the request is canceled during processing, then a partial refund is issued based on the progress. For example, if the request is 50% complete, then approximately 50% of the reserved credits are refunded.
+ ///
+ ///
+ /// Example: c1f96dc2-c448-00e6-82ed-14ecb6403c62
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> CancelVideoRequestAsResponseAsync(
+ global::System.Guid requestId,
+ global::Topaz.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
}
}
\ No newline at end of file
diff --git a/src/libs/Topaz/Generated/Topaz.ICompleteUploadClient.CompleteVideoUpload.g.cs b/src/libs/Topaz/Generated/Topaz.ICompleteUploadClient.CompleteVideoUpload.g.cs
index 2a40be0..af21902 100644
--- a/src/libs/Topaz/Generated/Topaz.ICompleteUploadClient.CompleteVideoUpload.g.cs
+++ b/src/libs/Topaz/Generated/Topaz.ICompleteUploadClient.CompleteVideoUpload.g.cs
@@ -42,6 +42,30 @@ public partial interface ICompleteUploadClient
///
/// Example: c1f96dc2-c448-00e6-82ed-14ecb6403c62
///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> CompleteVideoUploadAsResponseAsync(
+ global::System.Guid requestId,
+
+ global::Topaz.CompleteVideoUploadRequest request,
+ global::Topaz.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Complete Video Upload
+ /// Send metadata of the multi-part uploads to complete the upload and begin processing the video.
+ /// Optionally include the MD5 hash of the source video file to validate successful upload before processing.
+ /// ## Request body
+ /// | **Property** | **Type** | **Description** |
+ /// |-----------------|------------------|---------------------------------------------------------------------------------------------------------|
+ /// | **uploadResults** | Array | An array of part number and ETag pairs of the uploaded parts. ETags are returned by S3 upon upload of the part. |
+ /// | **uploadResults.*.partNum** | Integer | Part number of the uploaded part, starting from 1 |
+ /// | **uploadResults.*.eTag** | String | eTag value returned by S3 upon upload of the part
+ ///
+ ///
+ /// Example: c1f96dc2-c448-00e6-82ed-14ecb6403c62
+ ///
///
/// MD5 hash of the source video file in hex
/// Example: 4d186321c1a7f0f354b297e8914ab240
diff --git a/src/libs/Topaz/Generated/Topaz.ICreateExpressRequestClient.CreateExpressVideoRequest.g.cs b/src/libs/Topaz/Generated/Topaz.ICreateExpressRequestClient.CreateExpressVideoRequest.g.cs
index ff4cfde..f1561a4 100644
--- a/src/libs/Topaz/Generated/Topaz.ICreateExpressRequestClient.CreateExpressVideoRequest.g.cs
+++ b/src/libs/Topaz/Generated/Topaz.ICreateExpressRequestClient.CreateExpressVideoRequest.g.cs
@@ -39,6 +39,28 @@ public partial interface ICreateExpressRequestClient
/// | **uploadId** | String | Upload identifier |
/// | **uploadUrls** | Array | URL(s) for uploading video |
///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> CreateExpressVideoRequestAsResponseAsync(
+
+ global::Topaz.CreateExpressVideoRequestRequest request,
+ global::Topaz.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Create Express Video Request
+ /// Simplified interface for creating new video enhancement requests.
+ /// This endpoint skips the need to gather video information and uses a single-URL upload rather than multi-part upload. Calling the accept and complete-upload endpoints are also no longer necessary.
+ /// This endpoint does not return the cost estimates. Once the system receives and analyzes the source video file, cost estimates will appear in the response of the status endpoint. The lower bound value will be billed.
+ /// The endpoint returns a direct upload URL to our cloud storage for you to HTTP PUT the video file to.
+ /// ## Response body
+ /// | **Property** | **Type** | **Description** |
+ /// |----------------|----------|----------------------------|
+ /// | **requestId** | UUID | Unique request identifier |
+ /// | **uploadId** | String | Upload identifier |
+ /// | **uploadUrls** | Array | URL(s) for uploading video |
+ ///
///
/// Source details for the video
///
diff --git a/src/libs/Topaz/Generated/Topaz.ICreateRequestClient.CreateVideoRequest.g.cs b/src/libs/Topaz/Generated/Topaz.ICreateRequestClient.CreateVideoRequest.g.cs
index 5326e37..c005855 100644
--- a/src/libs/Topaz/Generated/Topaz.ICreateRequestClient.CreateVideoRequest.g.cs
+++ b/src/libs/Topaz/Generated/Topaz.ICreateRequestClient.CreateVideoRequest.g.cs
@@ -55,6 +55,36 @@ public partial interface ICreateRequestClient
/// | **cost** | Array | Cost range (in credits) |
/// | **time** | Array | Time range (in seconds) |
///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> CreateVideoRequestAsResponseAsync(
+
+ global::Topaz.CreateVideoRequestRequest request,
+ global::Topaz.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Create Video Request
+ /// Create a new video enhancement request.
+ /// Send information about the video and desired enhancements then receive cost and time estimates.
+ /// Calling this endpoint does NOT consume credits.
+ /// Calling this endpoint does NOT start processing.
+ /// Estimations are based on values provided, and the calculation is rerun once the system receives the source video. If the second estimate is significantly different than the initial values, the request is failed and the credits are fully refunded.
+ /// The lower bound value of the cost estimate is billed.
+ /// Time estimates are in development and may not be accurate.
+ /// ## Response body
+ /// | **Property** | **Type** | **Description** |
+ /// |---------------|----------|-------------------------------------|
+ /// | **requestId** | UUID | Unique request identifier |
+ /// | **estimates** | Object | Refer to **RequestEstimates** below |
+ /// #### RequestEstimates
+ /// `cost` and `time` are arrays with two integers each, representing lower and upper bounds of the estimate.
+ /// | **Property** | **Type** | **Description** |
+ /// |--------------|----------|-------------------------|
+ /// | **cost** | Array | Cost range (in credits) |
+ /// | **time** | Array | Time range (in seconds) |
+ ///
///
/// Source details for the video
///
diff --git a/src/libs/Topaz/Generated/Topaz.IDeleteFilesClient.DeleteVideoFiles.g.cs b/src/libs/Topaz/Generated/Topaz.IDeleteFilesClient.DeleteVideoFiles.g.cs
index 5ea1f46..e42ee51 100644
--- a/src/libs/Topaz/Generated/Topaz.IDeleteFilesClient.DeleteVideoFiles.g.cs
+++ b/src/libs/Topaz/Generated/Topaz.IDeleteFilesClient.DeleteVideoFiles.g.cs
@@ -19,5 +19,20 @@ public partial interface IDeleteFilesClient
global::System.Guid requestId,
global::Topaz.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Delete Video Files
+ /// This endpoint will delete your source and enhanced video files associated with the request from Topaz Labs storage, if any exists.
+ /// Note: All videos are automatically deleted after 7 days unless you request a shorter TTL.
+ ///
+ ///
+ /// Example: c1f96dc2-c448-00e6-82ed-14ecb6403c62
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task DeleteVideoFilesAsResponseAsync(
+ global::System.Guid requestId,
+ global::Topaz.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
}
}
\ No newline at end of file
diff --git a/src/libs/Topaz/Generated/Topaz.IDownloadClient.GetDownloadInput.g.cs b/src/libs/Topaz/Generated/Topaz.IDownloadClient.GetDownloadInput.g.cs
index a62feac..b417e86 100644
--- a/src/libs/Topaz/Generated/Topaz.IDownloadClient.GetDownloadInput.g.cs
+++ b/src/libs/Topaz/Generated/Topaz.IDownloadClient.GetDownloadInput.g.cs
@@ -16,5 +16,17 @@ public partial interface IDownloadClient
global::System.Guid processId,
global::Topaz.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Download Input
+ /// A presigned download link to the input image is provided in the response, as well as an expiration time (in Unix time). Input images are stored for **7 days** after the image has been uploaded.
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> GetDownloadInputAsResponseAsync(
+ global::System.Guid processId,
+ global::Topaz.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
}
}
\ No newline at end of file
diff --git a/src/libs/Topaz/Generated/Topaz.IDownloadClient.GetDownloadOutput.g.cs b/src/libs/Topaz/Generated/Topaz.IDownloadClient.GetDownloadOutput.g.cs
index 7b9f902..f764510 100644
--- a/src/libs/Topaz/Generated/Topaz.IDownloadClient.GetDownloadOutput.g.cs
+++ b/src/libs/Topaz/Generated/Topaz.IDownloadClient.GetDownloadOutput.g.cs
@@ -16,5 +16,17 @@ public partial interface IDownloadClient
global::System.Guid processId,
global::Topaz.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Download Output
+ /// A presigned download link to the image is provided in the response, as well as an expiration time (in Unix time). If the image is not ready, this request will fail with a conflict error. Images are stored for **7 days** after the image has been processed.
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> GetDownloadOutputAsResponseAsync(
+ global::System.Guid processId,
+ global::Topaz.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
}
}
\ No newline at end of file
diff --git a/src/libs/Topaz/Generated/Topaz.IEstimateClient.PostEstimate.g.cs b/src/libs/Topaz/Generated/Topaz.IEstimateClient.PostEstimate.g.cs
index 65d8c21..bbd6850 100644
--- a/src/libs/Topaz/Generated/Topaz.IEstimateClient.PostEstimate.g.cs
+++ b/src/libs/Topaz/Generated/Topaz.IEstimateClient.PostEstimate.g.cs
@@ -21,6 +21,19 @@ public partial interface IEstimateClient
/// Estimate
/// Validates the request against our standard models and returns the estimated time taken to complete a given processing job and the credits that would be consumed for that job.
///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> PostEstimateAsResponseAsync(
+
+ global::Topaz.EstimateGANRequest request,
+ global::Topaz.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Estimate
+ /// Validates the request against our standard models and returns the estimated time taken to complete a given processing job and the credits that would be consumed for that job.
+ ///
///
/// Indicates which category of model is being used.
/// Default Value: Enhance
diff --git a/src/libs/Topaz/Generated/Topaz.IEstimateClient.PostEstimateBulk.g.cs b/src/libs/Topaz/Generated/Topaz.IEstimateClient.PostEstimateBulk.g.cs
index 36dc2ed..5dcab0f 100644
--- a/src/libs/Topaz/Generated/Topaz.IEstimateClient.PostEstimateBulk.g.cs
+++ b/src/libs/Topaz/Generated/Topaz.IEstimateClient.PostEstimateBulk.g.cs
@@ -14,6 +14,19 @@ public partial interface IEstimateClient
///
global::System.Threading.Tasks.Task>> PostEstimateBulkAsync(
+ global::System.Collections.Generic.IList request,
+ global::Topaz.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Estimate Bulk
+ /// Validates a list of requests and returns the estimated time taken to complete a given processing job and the credits that would be consumed for each job.
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task>>> PostEstimateBulkAsResponseAsync(
+
global::System.Collections.Generic.IList request,
global::Topaz.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
diff --git a/src/libs/Topaz/Generated/Topaz.IEstimateClient.PostEstimateGen.g.cs b/src/libs/Topaz/Generated/Topaz.IEstimateClient.PostEstimateGen.g.cs
index aa19084..4ae0bea 100644
--- a/src/libs/Topaz/Generated/Topaz.IEstimateClient.PostEstimateGen.g.cs
+++ b/src/libs/Topaz/Generated/Topaz.IEstimateClient.PostEstimateGen.g.cs
@@ -21,6 +21,19 @@ public partial interface IEstimateClient
/// Estimate Generative
/// Validates the request against our generative models and returns the estimated time taken to complete a given processing job and the credits that would be consumed for that job.
///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> PostEstimateGenAsResponseAsync(
+
+ global::Topaz.EstimateGenRequest request,
+ global::Topaz.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Estimate Generative
+ /// Validates the request against our generative models and returns the estimated time taken to complete a given processing job and the credits that would be consumed for that job.
+ ///
///
/// Indicates which category of model is being used.
/// Default Value: Enhance
diff --git a/src/libs/Topaz/Generated/Topaz.IGetRequestHistoryClient.GetHistory.g.cs b/src/libs/Topaz/Generated/Topaz.IGetRequestHistoryClient.GetHistory.g.cs
index b8a93b2..30a033a 100644
--- a/src/libs/Topaz/Generated/Topaz.IGetRequestHistoryClient.GetHistory.g.cs
+++ b/src/libs/Topaz/Generated/Topaz.IGetRequestHistoryClient.GetHistory.g.cs
@@ -14,5 +14,15 @@ public partial interface IGetRequestHistoryClient
global::System.Threading.Tasks.Task GetHistoryAsync(
global::Topaz.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Get My Request History
+ /// This endpoint will return your processing history.
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> GetHistoryAsResponseAsync(
+ global::Topaz.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
}
}
\ No newline at end of file
diff --git a/src/libs/Topaz/Generated/Topaz.IGetRequestMetricsClient.GetVideoRequestMetrics.g.cs b/src/libs/Topaz/Generated/Topaz.IGetRequestMetricsClient.GetVideoRequestMetrics.g.cs
index 367c6e4..801af55 100644
--- a/src/libs/Topaz/Generated/Topaz.IGetRequestMetricsClient.GetVideoRequestMetrics.g.cs
+++ b/src/libs/Topaz/Generated/Topaz.IGetRequestMetricsClient.GetVideoRequestMetrics.g.cs
@@ -44,5 +44,45 @@ public partial interface IGetRequestMetricsClient
global::System.Guid requestId,
global::Topaz.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Get Video Request Metrics
+ /// Get metrics for the request
+ /// ## Response body
+ /// | **Property** | **Type** | **Description** |
+ /// |---------------------|----------|-----------------------------------------------------|
+ /// | **minutesInState** | Object | Minutes spent in various processing states |
+ /// | **minutesInState.pendingSourceUpload** | Number | - |
+ /// | **minutesInState.initializing** | Number | - |
+ /// | **minutesInState.preprocessing** | Number | - |
+ /// | **minutesInState.processing** | Number | - |
+ /// | **minutesInState.postprocessing** | Number | - |
+ /// | **minutesToEnhance**| Number | Time to complete enhancement after source upload |
+ /// | **inputFrames** | Integer | Number of input frames |
+ /// | **outputFrames** | Integer | Number of output frames |
+ /// | **inputSize** | String | Size of input video |
+ /// | **outputSize** | String | Size of output video |
+ /// | **chunks** | Array | Refer to **VideoChunkMetrics** below |
+ /// ---
+ /// #### VideoChunkMetrics
+ /// | **Property** | **Type** | **Description** |
+ /// |---------------------|------------|--------------------------------------------------|
+ /// | **chunkIndex** | Integer | Index of the chunk |
+ /// | **tasks** | Array | List of processing tasks for the chunk |
+ /// | **tasks.*.minutesProcessing** | Number | Duration of processing in minutes |
+ /// | **tasks.*.inputFrames** | Integer | Number of input frames |
+ /// | **tasks.*.outputFrames** | Integer | Number of output frames |
+ /// | **tasks.*.inputSize** | String | Size of the input file |
+ /// | **tasks.*.outputSize** | String | Size of the output file |
+ ///
+ ///
+ /// Example: c1f96dc2-c448-00e6-82ed-14ecb6403c62
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> GetVideoRequestMetricsAsResponseAsync(
+ global::System.Guid requestId,
+ global::Topaz.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
}
}
\ No newline at end of file
diff --git a/src/libs/Topaz/Generated/Topaz.IGetRequestStatusClient.GetVideoRequestStatus.g.cs b/src/libs/Topaz/Generated/Topaz.IGetRequestStatusClient.GetVideoRequestStatus.g.cs
index e8683e7..afa7537 100644
--- a/src/libs/Topaz/Generated/Topaz.IGetRequestStatusClient.GetVideoRequestStatus.g.cs
+++ b/src/libs/Topaz/Generated/Topaz.IGetRequestStatusClient.GetVideoRequestStatus.g.cs
@@ -57,5 +57,58 @@ public partial interface IGetRequestStatusClient
global::System.Guid requestId,
global::Topaz.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Get Video Request Status
+ /// Get status of the request.
+ /// If processing is complete, the response will include a signed URL to access the enhanced video.
+ /// Make sure to download and save the video within the TTL provided in the response (24 hours by default). New URLs with new TTL can be generated by calling this endpoint, but we retain your data for only a limited number of days. The video will be permanently deleted from our system afterwards.
+ /// ## Response body
+ /// | **Property** | **Type** | **Description** |
+ /// |---------------------|----------|-----------------------------------------------------|
+ /// | **status** | String | Current processing status |
+ /// | **progress** | Number | Total request progress (percentage) |
+ /// | **estimates** | Object | Refer to **RequestEstimates** |
+ /// | **outputSize** | String | Size of output video |
+ /// | **averageFps** | Number | Average FPS of processing nodes |
+ /// | **combinedFps** | Number | Combined FPS of all nodes |
+ /// | **processingJobs** | Array | Refer to **VideoProcessingStatIntermediate** below |
+ /// | **download** | Object | Refer to **EnhancedDownloadSignedUrlResponse** below |
+ /// ---
+ /// #### RequestEstimates
+ /// `cost` and `time` are arrays with two integers each, representing lower and upper bounds of the estimate.
+ /// | **Property** | **Type** | **Description** |
+ /// |---------------|----------|-----------------------------------------------------|
+ /// | **cost** | Array | Cost range (in credits) |
+ /// | **time** | Array | Time range (in seconds) |
+ /// ---
+ /// #### VideoProcessingStatIntermediate
+ /// | **Property** | **Type** | **Description** |
+ /// |---------------------|----------|-----------------------------------------------------|
+ /// | **chunkId** | UUID | Unique chunk identifier |
+ /// | **chunkIndex** | Integer | Index of the chunk |
+ /// | **taskIndex** | Integer | Task index for chunk processing |
+ /// | **status** | String | Status (queued, processing, complete, etc.) |
+ /// | **gpuUtilization** | Integer | GPU utilization in percentage |
+ /// | **gpuMemoryUtilization** | Integer | GPU memory usage percentage |
+ /// | **fps** | Number | Processing speed of the node |
+ /// | **progress** | Number | Processing progress (percentage) |
+ /// ---
+ /// #### EnhancedDownloadSignedUrlResponse
+ /// | **Property** | **Type** | **Description** |
+ /// |----------------|-----------|---------------------------------|
+ /// | **url** | String | Signed download URL for the enhanced file |
+ /// | **expiresIn** | Integer | TTL in milliseconds |
+ /// | **expiresAt** | Integer | Time in milliseconds since UTC epoch |
+ ///
+ ///
+ /// Example: c1f96dc2-c448-00e6-82ed-14ecb6403c62
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> GetVideoRequestStatusAsResponseAsync(
+ global::System.Guid requestId,
+ global::Topaz.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
}
}
\ No newline at end of file
diff --git a/src/libs/Topaz/Generated/Topaz.IImageStatusClient.DeleteAllStatuses.g.cs b/src/libs/Topaz/Generated/Topaz.IImageStatusClient.DeleteAllStatuses.g.cs
index 9b4a7c2..7e8f212 100644
--- a/src/libs/Topaz/Generated/Topaz.IImageStatusClient.DeleteAllStatuses.g.cs
+++ b/src/libs/Topaz/Generated/Topaz.IImageStatusClient.DeleteAllStatuses.g.cs
@@ -14,5 +14,15 @@ public partial interface IImageStatusClient
global::System.Threading.Tasks.Task DeleteAllStatusesAsync(
global::Topaz.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Delete All Statuses
+ /// Remove all image processing job statuses. This operation can be used to delete the statuses of finished jobs, cleaning up the response of `Get All Statuses`, for example.
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> DeleteAllStatusesAsResponseAsync(
+ global::Topaz.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
}
}
\ No newline at end of file
diff --git a/src/libs/Topaz/Generated/Topaz.IImageStatusClient.DeleteStatus.g.cs b/src/libs/Topaz/Generated/Topaz.IImageStatusClient.DeleteStatus.g.cs
index 8e76a6e..c4eea1f 100644
--- a/src/libs/Topaz/Generated/Topaz.IImageStatusClient.DeleteStatus.g.cs
+++ b/src/libs/Topaz/Generated/Topaz.IImageStatusClient.DeleteStatus.g.cs
@@ -16,5 +16,17 @@ public partial interface IImageStatusClient
global::System.Guid processId,
global::Topaz.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Delete Status
+ /// Remove an image processing job status by its `process_id`. This operation can be used to delete the statuses of finished jobs, cleaning up the response of `GET Status`, for example.
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task DeleteStatusAsResponseAsync(
+ global::System.Guid processId,
+ global::Topaz.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
}
}
\ No newline at end of file
diff --git a/src/libs/Topaz/Generated/Topaz.IImageStatusClient.GetAllStatuses.g.cs b/src/libs/Topaz/Generated/Topaz.IImageStatusClient.GetAllStatuses.g.cs
index 0bc4251..978f850 100644
--- a/src/libs/Topaz/Generated/Topaz.IImageStatusClient.GetAllStatuses.g.cs
+++ b/src/libs/Topaz/Generated/Topaz.IImageStatusClient.GetAllStatuses.g.cs
@@ -31,5 +31,32 @@ public partial interface IImageStatusClient
string? cursor = default,
global::Topaz.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Get All Statuses
+ /// Retrieve the status of all image processing jobs.
+ /// **Pagination (Highly Recommended):**
+ /// For better performance and to handle large numbers of statuses, pagination is highly recommended. Enable pagination by setting `paginated=true`. When pagination is enabled:
+ /// - Use the `limit` parameter to control the number of results per page (default: 50, maximum: 100)
+ /// - Use the `cursor` parameter to retrieve subsequent pages
+ /// - The response will include pagination metadata with `next_cursor` and `has_next_page` fields
+ /// **Non-Paginated Response:**
+ /// When `paginated=false` (default) or omitted, the endpoint returns all statuses **up to 7 days old** as a simple array. This may be slow or fail for accounts with many statuses.
+ ///
+ ///
+ /// Default Value: false
+ ///
+ ///
+ /// Default Value: 50
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task, global::Topaz.PaginatedStatusesResponse>>> GetAllStatusesAsResponseAsync(
+ bool? paginated = default,
+ int? limit = default,
+ string? cursor = default,
+ global::Topaz.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
}
}
\ No newline at end of file
diff --git a/src/libs/Topaz/Generated/Topaz.IImageStatusClient.GetStatus.g.cs b/src/libs/Topaz/Generated/Topaz.IImageStatusClient.GetStatus.g.cs
index ce4d246..8895f7c 100644
--- a/src/libs/Topaz/Generated/Topaz.IImageStatusClient.GetStatus.g.cs
+++ b/src/libs/Topaz/Generated/Topaz.IImageStatusClient.GetStatus.g.cs
@@ -16,5 +16,17 @@ public partial interface IImageStatusClient
global::System.Guid processId,
global::Topaz.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Get Status
+ /// Use this endpoint to retrieve status information for your image processing jobs.
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> GetStatusAsResponseAsync(
+ global::System.Guid processId,
+ global::Topaz.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
}
}
\ No newline at end of file
diff --git a/src/libs/Topaz/Generated/Topaz.IVideoStatusClient.GetSystemStatus.g.cs b/src/libs/Topaz/Generated/Topaz.IVideoStatusClient.GetSystemStatus.g.cs
index a5f74ed..a74e606 100644
--- a/src/libs/Topaz/Generated/Topaz.IVideoStatusClient.GetSystemStatus.g.cs
+++ b/src/libs/Topaz/Generated/Topaz.IVideoStatusClient.GetSystemStatus.g.cs
@@ -20,5 +20,21 @@ public partial interface IVideoStatusClient
global::System.Threading.Tasks.Task GetSystemStatusAsync(
global::Topaz.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Get System Status
+ /// Get status of the video cloud
+ /// ## Response body
+ /// | **Property** | **Type** | **Description** |
+ /// |-------------------------|----------|----------------------------|
+ /// | **isAvailable** | Boolean | System availability status |
+ /// | **availabilityMessage** | String | Availability message |
+ /// | **supportedModels** | Array | List of supported AI models in their shortened format (apo-8 for Apollo v8) |
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> GetSystemStatusAsResponseAsync(
+ global::Topaz.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
}
}
\ No newline at end of file
diff --git a/src/libs/Topaz/Generated/Topaz.ImageStatusClient.DeleteAllStatuses.g.cs b/src/libs/Topaz/Generated/Topaz.ImageStatusClient.DeleteAllStatuses.g.cs
index 00488ec..6f905ab 100644
--- a/src/libs/Topaz/Generated/Topaz.ImageStatusClient.DeleteAllStatuses.g.cs
+++ b/src/libs/Topaz/Generated/Topaz.ImageStatusClient.DeleteAllStatuses.g.cs
@@ -49,6 +49,24 @@ partial void ProcessDeleteAllStatusesResponseContent(
public async global::System.Threading.Tasks.Task DeleteAllStatusesAsync(
global::Topaz.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await DeleteAllStatusesAsResponseAsync(
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Delete All Statuses
+ /// Remove all image processing job statuses. This operation can be used to delete the statuses of finished jobs, cleaning up the response of `Get All Statuses`, for example.
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> DeleteAllStatusesAsResponseAsync(
+ global::Topaz.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -77,6 +95,7 @@ partial void ProcessDeleteAllStatusesResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Topaz.PathBuilder(
path: "/image/v1/status",
baseUri: HttpClient.BaseAddress);
@@ -149,6 +168,8 @@ partial void ProcessDeleteAllStatusesResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -159,6 +180,11 @@ partial void ProcessDeleteAllStatusesResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Topaz.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Topaz.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -176,6 +202,8 @@ partial void ProcessDeleteAllStatusesResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -185,8 +213,7 @@ partial void ProcessDeleteAllStatusesResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Topaz.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -195,6 +222,11 @@ partial void ProcessDeleteAllStatusesResponseContent(
__attempt < __maxAttempts &&
global::Topaz.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Topaz.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Topaz.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Topaz.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -211,14 +243,15 @@ partial void ProcessDeleteAllStatusesResponseContent(
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::Topaz.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -258,6 +291,8 @@ partial void ProcessDeleteAllStatusesResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -278,6 +313,8 @@ partial void ProcessDeleteAllStatusesResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Authentication is required and has failed or has not yet been provided.
@@ -454,9 +491,13 @@ partial void ProcessDeleteAllStatusesResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Topaz.DeleteAllStatusesResponse.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Topaz.DeleteAllStatusesResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Topaz.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Topaz.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -484,9 +525,13 @@ partial void ProcessDeleteAllStatusesResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Topaz.DeleteAllStatusesResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Topaz.DeleteAllStatusesResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Topaz.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Topaz.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Topaz/Generated/Topaz.ImageStatusClient.DeleteStatus.g.cs b/src/libs/Topaz/Generated/Topaz.ImageStatusClient.DeleteStatus.g.cs
index 80a28b1..4895f75 100644
--- a/src/libs/Topaz/Generated/Topaz.ImageStatusClient.DeleteStatus.g.cs
+++ b/src/libs/Topaz/Generated/Topaz.ImageStatusClient.DeleteStatus.g.cs
@@ -48,6 +48,25 @@ partial void ProcessDeleteStatusResponse(
global::System.Guid processId,
global::Topaz.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await DeleteStatusAsResponseAsync(
+ processId: processId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Delete Status
+ /// Remove an image processing job status by its `process_id`. This operation can be used to delete the statuses of finished jobs, cleaning up the response of `GET Status`, for example.
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task DeleteStatusAsResponseAsync(
+ global::System.Guid processId,
+ global::Topaz.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -77,6 +96,7 @@ partial void ProcessDeleteStatusResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Topaz.PathBuilder(
path: $"/image/v1/status/{processId}",
baseUri: HttpClient.BaseAddress);
@@ -150,6 +170,8 @@ partial void ProcessDeleteStatusResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -160,6 +182,11 @@ partial void ProcessDeleteStatusResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Topaz.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Topaz.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -177,6 +204,8 @@ partial void ProcessDeleteStatusResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -186,8 +215,7 @@ partial void ProcessDeleteStatusResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Topaz.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -196,6 +224,11 @@ partial void ProcessDeleteStatusResponse(
__attempt < __maxAttempts &&
global::Topaz.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Topaz.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Topaz.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Topaz.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -212,14 +245,15 @@ partial void ProcessDeleteStatusResponse(
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::Topaz.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -259,6 +293,8 @@ partial void ProcessDeleteStatusResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -279,6 +315,8 @@ partial void ProcessDeleteStatusResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request contains malformed data in the body, path, or query parameters.
@@ -565,6 +603,10 @@ partial void ProcessDeleteStatusResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Topaz.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Topaz.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -586,6 +628,10 @@ partial void ProcessDeleteStatusResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Topaz.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Topaz.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Topaz/Generated/Topaz.ImageStatusClient.GetAllStatuses.g.cs b/src/libs/Topaz/Generated/Topaz.ImageStatusClient.GetAllStatuses.g.cs
index af1535d..19ffa65 100644
--- a/src/libs/Topaz/Generated/Topaz.ImageStatusClient.GetAllStatuses.g.cs
+++ b/src/libs/Topaz/Generated/Topaz.ImageStatusClient.GetAllStatuses.g.cs
@@ -72,6 +72,44 @@ partial void ProcessGetAllStatusesResponseContent(
string? cursor = default,
global::Topaz.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await GetAllStatusesAsResponseAsync(
+ paginated: paginated,
+ limit: limit,
+ cursor: cursor,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Get All Statuses
+ /// Retrieve the status of all image processing jobs.
+ /// **Pagination (Highly Recommended):**
+ /// For better performance and to handle large numbers of statuses, pagination is highly recommended. Enable pagination by setting `paginated=true`. When pagination is enabled:
+ /// - Use the `limit` parameter to control the number of results per page (default: 50, maximum: 100)
+ /// - Use the `cursor` parameter to retrieve subsequent pages
+ /// - The response will include pagination metadata with `next_cursor` and `has_next_page` fields
+ /// **Non-Paginated Response:**
+ /// When `paginated=false` (default) or omitted, the endpoint returns all statuses **up to 7 days old** as a simple array. This may be slow or fail for accounts with many statuses.
+ ///
+ ///
+ /// Default Value: false
+ ///
+ ///
+ /// Default Value: 50
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task, global::Topaz.PaginatedStatusesResponse>>> GetAllStatusesAsResponseAsync(
+ bool? paginated = default,
+ int? limit = default,
+ string? cursor = default,
+ global::Topaz.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -103,13 +141,14 @@ partial void ProcessGetAllStatusesResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Topaz.PathBuilder(
path: "/image/v1/status",
- baseUri: HttpClient.BaseAddress);
+ baseUri: HttpClient.BaseAddress);
__pathBuilder
.AddOptionalParameter("paginated", paginated?.ToString().ToLowerInvariant())
.AddOptionalParameter("limit", limit?.ToString())
- .AddOptionalParameter("cursor", cursor)
+ .AddOptionalParameter("cursor", cursor)
;
var __path = __pathBuilder.ToString();
__path = global::Topaz.AutoSDKRequestOptionsSupport.AppendQueryParameters(
@@ -183,6 +222,8 @@ partial void ProcessGetAllStatusesResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -193,6 +234,11 @@ partial void ProcessGetAllStatusesResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Topaz.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Topaz.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -210,6 +256,8 @@ partial void ProcessGetAllStatusesResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -219,8 +267,7 @@ partial void ProcessGetAllStatusesResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Topaz.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -229,6 +276,11 @@ partial void ProcessGetAllStatusesResponseContent(
__attempt < __maxAttempts &&
global::Topaz.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Topaz.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Topaz.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Topaz.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -245,14 +297,15 @@ partial void ProcessGetAllStatusesResponseContent(
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::Topaz.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -292,6 +345,8 @@ partial void ProcessGetAllStatusesResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -312,6 +367,8 @@ partial void ProcessGetAllStatusesResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request contains malformed data in the body, path, or query parameters.
@@ -526,9 +583,13 @@ partial void ProcessGetAllStatusesResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Topaz.OneOf, global::Topaz.PaginatedStatusesResponse>.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Topaz.OneOf, global::Topaz.PaginatedStatusesResponse>.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Topaz.AutoSDKHttpResponse, global::Topaz.PaginatedStatusesResponse>>(
+ statusCode: __response.StatusCode,
+ headers: global::Topaz.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -556,9 +617,13 @@ partial void ProcessGetAllStatusesResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Topaz.OneOf, global::Topaz.PaginatedStatusesResponse>.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Topaz.OneOf, global::Topaz.PaginatedStatusesResponse>.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Topaz.AutoSDKHttpResponse, global::Topaz.PaginatedStatusesResponse>>(
+ statusCode: __response.StatusCode,
+ headers: global::Topaz.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Topaz/Generated/Topaz.ImageStatusClient.GetStatus.g.cs b/src/libs/Topaz/Generated/Topaz.ImageStatusClient.GetStatus.g.cs
index 005b8ca..81b0d09 100644
--- a/src/libs/Topaz/Generated/Topaz.ImageStatusClient.GetStatus.g.cs
+++ b/src/libs/Topaz/Generated/Topaz.ImageStatusClient.GetStatus.g.cs
@@ -53,6 +53,27 @@ partial void ProcessGetStatusResponseContent(
global::System.Guid processId,
global::Topaz.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await GetStatusAsResponseAsync(
+ processId: processId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Get Status
+ /// Use this endpoint to retrieve status information for your image processing jobs.
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> GetStatusAsResponseAsync(
+ global::System.Guid processId,
+ global::Topaz.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -82,6 +103,7 @@ partial void ProcessGetStatusResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Topaz.PathBuilder(
path: $"/image/v1/status/{processId}",
baseUri: HttpClient.BaseAddress);
@@ -155,6 +177,8 @@ partial void ProcessGetStatusResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -165,6 +189,11 @@ partial void ProcessGetStatusResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Topaz.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Topaz.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -182,6 +211,8 @@ partial void ProcessGetStatusResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -191,8 +222,7 @@ partial void ProcessGetStatusResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Topaz.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -201,6 +231,11 @@ partial void ProcessGetStatusResponseContent(
__attempt < __maxAttempts &&
global::Topaz.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Topaz.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Topaz.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Topaz.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -217,14 +252,15 @@ partial void ProcessGetStatusResponseContent(
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::Topaz.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -264,6 +300,8 @@ partial void ProcessGetStatusResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -284,6 +322,8 @@ partial void ProcessGetStatusResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request contains malformed data in the body, path, or query parameters.
@@ -536,9 +576,13 @@ partial void ProcessGetStatusResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Topaz.StatusResponse.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Topaz.StatusResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Topaz.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Topaz.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -566,9 +610,13 @@ partial void ProcessGetStatusResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Topaz.StatusResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Topaz.StatusResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Topaz.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Topaz.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Topaz/Generated/Topaz.ImageStatusClient.g.cs b/src/libs/Topaz/Generated/Topaz.ImageStatusClient.g.cs
index 7ff6623..d6553a0 100644
--- a/src/libs/Topaz/Generated/Topaz.ImageStatusClient.g.cs
+++ b/src/libs/Topaz/Generated/Topaz.ImageStatusClient.g.cs
@@ -74,10 +74,10 @@ public ImageStatusClient(
/// Client-wide request defaults such as headers, query parameters, retries, and timeout.
/// Dispose the HttpClient when the instance is disposed. True by default.
public ImageStatusClient(
- global::System.Net.Http.HttpClient? httpClient = null,
- global::System.Uri? baseUri = null,
- global::System.Collections.Generic.List? authorizations = null,
- global::Topaz.AutoSDKClientOptions? options = null,
+ global::System.Net.Http.HttpClient? httpClient,
+ global::System.Uri? baseUri,
+ global::System.Collections.Generic.List? authorizations,
+ global::Topaz.AutoSDKClientOptions? options,
bool disposeHttpClient = true)
{
diff --git a/src/libs/Topaz/Generated/Topaz.LightingClient.PostLighting.g.cs b/src/libs/Topaz/Generated/Topaz.LightingClient.PostLighting.g.cs
index 1ae6630..d3983fc 100644
--- a/src/libs/Topaz/Generated/Topaz.LightingClient.PostLighting.g.cs
+++ b/src/libs/Topaz/Generated/Topaz.LightingClient.PostLighting.g.cs
@@ -116,10 +116,11 @@ partial void ProcessPostLightingResponseContent(
var __maxAttempts = global::Topaz.AutoSDKRequestOptionsSupport.GetMaxAttempts(
clientOptions: Options,
requestOptions: requestOptions,
- supportsRetry: true);
+ supportsRetry: false);
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Topaz.PathBuilder(
path: "/image/v1/lighting/async",
baseUri: HttpClient.BaseAddress);
@@ -152,6 +153,7 @@ partial void ProcessPostLightingResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
+
var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent();
if (request.Image != default)
{
@@ -159,43 +161,51 @@ partial void ProcessPostLightingResponseContent(
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent(request.Image ?? string.Empty),
name: "\"image\"");
- }
+
+ }
if (request.SourceId != default)
{
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent(request.SourceId ?? string.Empty),
name: "\"source_id\"");
- }
+
+ }
if (request.SourceUrl != default)
{
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent(request.SourceUrl ?? string.Empty),
name: "\"source_url\"");
- }
+
+ }
if (request.Model != default)
{
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent((request.Model).HasValue ? (request.Model).GetValueOrDefault().ToValueString() : string.Empty),
name: "\"model\"");
- }
+
+ }
if (request.OutputFormat != default)
{
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent((request.OutputFormat).HasValue ? (request.OutputFormat).GetValueOrDefault().ToValueString() : string.Empty),
name: "\"output_format\"");
- }
+
+ }
if (request.WebhookUrl != default)
{
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent(request.WebhookUrl ?? string.Empty),
name: "\"webhook_url\"");
+
}
+
__httpRequest.Content = __httpRequestContent;
+
global::Topaz.AutoSDKRequestOptionsSupport.ApplyHeaders(
request: __httpRequest,
clientHeaders: Options.Headers,
@@ -237,6 +247,8 @@ partial void ProcessPostLightingResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -247,6 +259,11 @@ partial void ProcessPostLightingResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Topaz.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Topaz.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -264,6 +281,8 @@ partial void ProcessPostLightingResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -273,8 +292,7 @@ partial void ProcessPostLightingResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Topaz.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -283,6 +301,11 @@ partial void ProcessPostLightingResponseContent(
__attempt < __maxAttempts &&
global::Topaz.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Topaz.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Topaz.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Topaz.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -299,14 +322,15 @@ partial void ProcessPostLightingResponseContent(
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::Topaz.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -346,6 +370,8 @@ partial void ProcessPostLightingResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -366,6 +392,8 @@ partial void ProcessPostLightingResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request contains malformed data in the body, path, or query parameters.
@@ -813,6 +841,7 @@ partial void ProcessPostLightingResponseContent(
return new global::Topaz.AutoSDKHttpResponse(
statusCode: __response.StatusCode,
headers: global::Topaz.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
body: __value);
}
catch (global::System.Exception __ex)
@@ -846,6 +875,7 @@ partial void ProcessPostLightingResponseContent(
return new global::Topaz.AutoSDKHttpResponse(
statusCode: __response.StatusCode,
headers: global::Topaz.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
body: __value);
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Topaz/Generated/Topaz.LightingClient.g.cs b/src/libs/Topaz/Generated/Topaz.LightingClient.g.cs
index 11939b3..83108b8 100644
--- a/src/libs/Topaz/Generated/Topaz.LightingClient.g.cs
+++ b/src/libs/Topaz/Generated/Topaz.LightingClient.g.cs
@@ -78,10 +78,10 @@ public LightingClient(
/// Client-wide request defaults such as headers, query parameters, retries, and timeout.
/// Dispose the HttpClient when the instance is disposed. True by default.
public LightingClient(
- global::System.Net.Http.HttpClient? httpClient = null,
- global::System.Uri? baseUri = null,
- global::System.Collections.Generic.List? authorizations = null,
- global::Topaz.AutoSDKClientOptions? options = null,
+ global::System.Net.Http.HttpClient? httpClient,
+ global::System.Uri? baseUri,
+ global::System.Collections.Generic.List? authorizations,
+ global::Topaz.AutoSDKClientOptions? options,
bool disposeHttpClient = true)
{
diff --git a/src/libs/Topaz/Generated/Topaz.MattingClient.PostMatting.g.cs b/src/libs/Topaz/Generated/Topaz.MattingClient.PostMatting.g.cs
index 9e3ec5f..a910abb 100644
--- a/src/libs/Topaz/Generated/Topaz.MattingClient.PostMatting.g.cs
+++ b/src/libs/Topaz/Generated/Topaz.MattingClient.PostMatting.g.cs
@@ -114,10 +114,11 @@ partial void ProcessPostMattingResponseContent(
var __maxAttempts = global::Topaz.AutoSDKRequestOptionsSupport.GetMaxAttempts(
clientOptions: Options,
requestOptions: requestOptions,
- supportsRetry: true);
+ supportsRetry: false);
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Topaz.PathBuilder(
path: "/image/v1/matting/async",
baseUri: HttpClient.BaseAddress);
@@ -150,6 +151,7 @@ partial void ProcessPostMattingResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
+
var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent();
if (request.Image != default)
{
@@ -157,43 +159,51 @@ partial void ProcessPostMattingResponseContent(
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent(request.Image ?? string.Empty),
name: "\"image\"");
- }
+
+ }
if (request.SourceId != default)
{
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent(request.SourceId ?? string.Empty),
name: "\"source_id\"");
- }
+
+ }
if (request.SourceUrl != default)
{
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent(request.SourceUrl ?? string.Empty),
name: "\"source_url\"");
- }
+
+ }
if (request.Model != default)
{
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent((request.Model).HasValue ? (request.Model).GetValueOrDefault().ToValueString() : string.Empty),
name: "\"model\"");
- }
+
+ }
if (request.OutputFormat != default)
{
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent((request.OutputFormat).HasValue ? (request.OutputFormat).GetValueOrDefault().ToValueString() : string.Empty),
name: "\"output_format\"");
- }
+
+ }
if (request.WebhookUrl != default)
{
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent(request.WebhookUrl ?? string.Empty),
name: "\"webhook_url\"");
+
}
+
__httpRequest.Content = __httpRequestContent;
+
global::Topaz.AutoSDKRequestOptionsSupport.ApplyHeaders(
request: __httpRequest,
clientHeaders: Options.Headers,
@@ -235,6 +245,8 @@ partial void ProcessPostMattingResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -245,6 +257,11 @@ partial void ProcessPostMattingResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Topaz.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Topaz.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -262,6 +279,8 @@ partial void ProcessPostMattingResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -271,8 +290,7 @@ partial void ProcessPostMattingResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Topaz.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -281,6 +299,11 @@ partial void ProcessPostMattingResponseContent(
__attempt < __maxAttempts &&
global::Topaz.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Topaz.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Topaz.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Topaz.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -297,14 +320,15 @@ partial void ProcessPostMattingResponseContent(
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::Topaz.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -344,6 +368,8 @@ partial void ProcessPostMattingResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -364,6 +390,8 @@ partial void ProcessPostMattingResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request contains malformed data in the body, path, or query parameters.
@@ -811,6 +839,7 @@ partial void ProcessPostMattingResponseContent(
return new global::Topaz.AutoSDKHttpResponse(
statusCode: __response.StatusCode,
headers: global::Topaz.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
body: __value);
}
catch (global::System.Exception __ex)
@@ -844,6 +873,7 @@ partial void ProcessPostMattingResponseContent(
return new global::Topaz.AutoSDKHttpResponse(
statusCode: __response.StatusCode,
headers: global::Topaz.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
body: __value);
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Topaz/Generated/Topaz.MattingClient.g.cs b/src/libs/Topaz/Generated/Topaz.MattingClient.g.cs
index 4dacfca..ea55e47 100644
--- a/src/libs/Topaz/Generated/Topaz.MattingClient.g.cs
+++ b/src/libs/Topaz/Generated/Topaz.MattingClient.g.cs
@@ -79,10 +79,10 @@ public MattingClient(
/// Client-wide request defaults such as headers, query parameters, retries, and timeout.
/// Dispose the HttpClient when the instance is disposed. True by default.
public MattingClient(
- global::System.Net.Http.HttpClient? httpClient = null,
- global::System.Uri? baseUri = null,
- global::System.Collections.Generic.List? authorizations = null,
- global::Topaz.AutoSDKClientOptions? options = null,
+ global::System.Net.Http.HttpClient? httpClient,
+ global::System.Uri? baseUri,
+ global::System.Collections.Generic.List? authorizations,
+ global::Topaz.AutoSDKClientOptions? options,
bool disposeHttpClient = true)
{
diff --git a/src/libs/Topaz/Generated/Topaz.OptionsSupport.g.cs b/src/libs/Topaz/Generated/Topaz.OptionsSupport.g.cs
index 0562c0d..e64be14 100644
--- a/src/libs/Topaz/Generated/Topaz.OptionsSupport.g.cs
+++ b/src/libs/Topaz/Generated/Topaz.OptionsSupport.g.cs
@@ -101,9 +101,45 @@ public sealed class AutoSDKRetryOptions
public int MaxAttempts { get; set; } = 1;
///
- /// Optional fixed delay between retry attempts.
+ /// Optional fixed delay between retry attempts. When set, this takes precedence over exponential backoff.
///
public global::System.TimeSpan? Delay { get; set; }
+
+ ///
+ /// Initial exponential backoff delay used when is not set.
+ ///
+ public global::System.TimeSpan InitialDelay { get; set; } = global::System.TimeSpan.FromSeconds(1);
+
+ ///
+ /// Maximum retry delay after applying retry headers, backoff, and jitter.
+ ///
+ public global::System.TimeSpan MaxDelay { get; set; } = global::System.TimeSpan.FromSeconds(30);
+
+ ///
+ /// Multiplier applied to exponential backoff after each failed attempt.
+ /// Values below 1 are normalized to 1.
+ ///
+ public double BackoffMultiplier { get; set; } = 2D;
+
+ ///
+ /// Randomizes computed backoff by plus or minus this ratio. Values are clamped to 0..1.
+ ///
+ public double JitterRatio { get; set; } = 0.2D;
+
+ ///
+ /// Whether Retry-After response headers should control retry delay when present.
+ ///
+ public bool UseRetryAfterHeader { get; set; } = true;
+
+ ///
+ /// Whether a rate-limit reset response header should control retry delay when present.
+ ///
+ public bool UseRateLimitResetHeader { get; set; }
+
+ ///
+ /// Optional provider-specific rate-limit reset header name. Values may be Unix seconds or an HTTP date.
+ ///
+ public string? RateLimitResetHeaderName { get; set; } = "X-RateLimit-Reset";
}
@@ -231,6 +267,16 @@ public sealed class AutoSDKHookContext
///
public bool WillRetry { get; set; }
+ ///
+ /// The computed retry delay when is true.
+ ///
+ public global::System.TimeSpan? RetryDelay { get; set; }
+
+ ///
+ /// A short retry reason such as exception or status:429.
+ ///
+ public string RetryReason { get; set; } = string.Empty;
+
///
/// The effective cancellation token for the current request attempt.
///
@@ -254,6 +300,8 @@ internal static class AutoSDKRequestOptionsSupport
int attempt,
int maxAttempts,
bool willRetry,
+ global::System.TimeSpan? retryDelay,
+ string retryReason,
global::System.Threading.CancellationToken cancellationToken)
{
return new global::Topaz.AutoSDKHookContext
@@ -271,6 +319,8 @@ internal static class AutoSDKRequestOptionsSupport
Attempt = attempt,
MaxAttempts = maxAttempts,
WillRetry = willRetry,
+ RetryDelay = retryDelay,
+ RetryReason = retryReason ?? string.Empty,
CancellationToken = cancellationToken,
};
}
@@ -338,19 +388,188 @@ internal static int GetMaxAttempts(
return maxAttempts < 1 ? 1 : maxAttempts;
}
- internal static async global::System.Threading.Tasks.Task DelayBeforeRetryAsync(
+ internal static global::System.TimeSpan GetRetryDelay(
global::Topaz.AutoSDKClientOptions clientOptions,
global::Topaz.AutoSDKRequestOptions? requestOptions,
+ global::System.Net.Http.HttpResponseMessage? response,
+ int attempt)
+ {
+ var retryOptions = requestOptions?.Retry ?? clientOptions.Retry ?? new global::Topaz.AutoSDKRetryOptions();
+
+ if (retryOptions.UseRetryAfterHeader &&
+ TryGetRetryAfterDelay(response, out var retryAfterDelay))
+ {
+ return ClampRetryDelay(retryAfterDelay, retryOptions);
+ }
+
+ if (retryOptions.UseRateLimitResetHeader &&
+ TryGetRateLimitResetDelay(response, retryOptions.RateLimitResetHeaderName, out var rateLimitResetDelay))
+ {
+ return ClampRetryDelay(rateLimitResetDelay, retryOptions);
+ }
+
+ if (retryOptions.Delay.HasValue)
+ {
+ return ClampRetryDelay(retryOptions.Delay.Value, retryOptions);
+ }
+
+ var initialDelay = retryOptions.InitialDelay;
+ if (initialDelay <= global::System.TimeSpan.Zero)
+ {
+ return global::System.TimeSpan.Zero;
+ }
+
+ var multiplier = retryOptions.BackoffMultiplier < 1D ? 1D : retryOptions.BackoffMultiplier;
+ var exponent = attempt <= 1 ? 0 : attempt - 1;
+ var delayMilliseconds = initialDelay.TotalMilliseconds * global::System.Math.Pow(multiplier, exponent);
+ if (double.IsNaN(delayMilliseconds) || double.IsInfinity(delayMilliseconds) || delayMilliseconds < 0D)
+ {
+ delayMilliseconds = 0D;
+ }
+
+ var delay = global::System.TimeSpan.FromMilliseconds(delayMilliseconds);
+ delay = ApplyJitter(delay, retryOptions.JitterRatio);
+ return ClampRetryDelay(delay, retryOptions);
+ }
+
+ internal static async global::System.Threading.Tasks.Task DelayBeforeRetryAsync(
+ global::System.TimeSpan retryDelay,
global::System.Threading.CancellationToken cancellationToken)
{
- var delay = requestOptions?.Retry?.Delay ??
- clientOptions.Retry?.Delay;
- if (!delay.HasValue || delay.Value <= global::System.TimeSpan.Zero)
+ if (retryDelay <= global::System.TimeSpan.Zero)
{
return;
}
- await global::System.Threading.Tasks.Task.Delay(delay.Value, cancellationToken).ConfigureAwait(false);
+ await global::System.Threading.Tasks.Task.Delay(retryDelay, cancellationToken).ConfigureAwait(false);
+ }
+
+ private static bool TryGetRetryAfterDelay(
+ global::System.Net.Http.HttpResponseMessage? response,
+ out global::System.TimeSpan delay)
+ {
+ delay = global::System.TimeSpan.Zero;
+ var retryAfter = response?.Headers.RetryAfter;
+ if (retryAfter == null)
+ {
+ return false;
+ }
+
+ if (retryAfter.Delta.HasValue)
+ {
+ delay = retryAfter.Delta.Value;
+ return delay > global::System.TimeSpan.Zero;
+ }
+
+ if (retryAfter.Date.HasValue)
+ {
+ delay = retryAfter.Date.Value - global::System.DateTimeOffset.UtcNow;
+ return delay > global::System.TimeSpan.Zero;
+ }
+
+ return false;
+ }
+
+ private static bool TryGetRateLimitResetDelay(
+ global::System.Net.Http.HttpResponseMessage? response,
+ string? headerName,
+ out global::System.TimeSpan delay)
+ {
+ delay = global::System.TimeSpan.Zero;
+ if (response == null || string.IsNullOrWhiteSpace(headerName))
+ {
+ return false;
+ }
+
+ if (!response.Headers.TryGetValues(headerName, out var values) &&
+ (response.Content?.Headers == null || !response.Content.Headers.TryGetValues(headerName, out values)))
+ {
+ return false;
+ }
+
+ var value = global::System.Linq.Enumerable.FirstOrDefault(values);
+ if (string.IsNullOrWhiteSpace(value))
+ {
+ return false;
+ }
+
+ value = value.Trim();
+ if (long.TryParse(
+ value,
+ global::System.Globalization.NumberStyles.Integer,
+ global::System.Globalization.CultureInfo.InvariantCulture,
+ out var unixSeconds))
+ {
+ delay = global::System.DateTimeOffset.FromUnixTimeSeconds(unixSeconds) - global::System.DateTimeOffset.UtcNow;
+ return delay > global::System.TimeSpan.Zero;
+ }
+
+ if (global::System.DateTimeOffset.TryParse(
+ value,
+ global::System.Globalization.CultureInfo.InvariantCulture,
+ global::System.Globalization.DateTimeStyles.AssumeUniversal | global::System.Globalization.DateTimeStyles.AdjustToUniversal,
+ out var resetAt))
+ {
+ delay = resetAt - global::System.DateTimeOffset.UtcNow;
+ return delay > global::System.TimeSpan.Zero;
+ }
+
+ return false;
+ }
+
+ private static global::System.TimeSpan ApplyJitter(
+ global::System.TimeSpan delay,
+ double jitterRatio)
+ {
+ if (delay <= global::System.TimeSpan.Zero || jitterRatio <= 0D)
+ {
+ return delay;
+ }
+
+ if (jitterRatio > 1D)
+ {
+ jitterRatio = 1D;
+ }
+
+ var sample = NextJitterSample();
+ var multiplier = 1D - jitterRatio + (sample * jitterRatio * 2D);
+ var milliseconds = delay.TotalMilliseconds * multiplier;
+ if (double.IsNaN(milliseconds) || double.IsInfinity(milliseconds) || milliseconds < 0D)
+ {
+ milliseconds = 0D;
+ }
+
+ return global::System.TimeSpan.FromMilliseconds(milliseconds);
+ }
+
+ private static double NextJitterSample()
+ {
+ var bytes = new byte[8];
+ using (var randomNumberGenerator = global::System.Security.Cryptography.RandomNumberGenerator.Create())
+ {
+ randomNumberGenerator.GetBytes(bytes);
+ }
+
+ var value = global::System.BitConverter.ToUInt64(bytes, 0);
+ return value / (double)ulong.MaxValue;
+ }
+
+ private static global::System.TimeSpan ClampRetryDelay(
+ global::System.TimeSpan delay,
+ global::Topaz.AutoSDKRetryOptions retryOptions)
+ {
+ if (delay <= global::System.TimeSpan.Zero)
+ {
+ return global::System.TimeSpan.Zero;
+ }
+
+ var maxDelay = retryOptions.MaxDelay;
+ if (maxDelay > global::System.TimeSpan.Zero && delay > maxDelay)
+ {
+ return maxDelay;
+ }
+
+ return delay;
}
internal static bool ShouldRetryStatusCode(
diff --git a/src/libs/Topaz/Generated/Topaz.RestoreClient.PostRestoreGen.g.cs b/src/libs/Topaz/Generated/Topaz.RestoreClient.PostRestoreGen.g.cs
index f72eed5..5d69a37 100644
--- a/src/libs/Topaz/Generated/Topaz.RestoreClient.PostRestoreGen.g.cs
+++ b/src/libs/Topaz/Generated/Topaz.RestoreClient.PostRestoreGen.g.cs
@@ -116,10 +116,11 @@ partial void ProcessPostRestoreGenResponseContent(
var __maxAttempts = global::Topaz.AutoSDKRequestOptionsSupport.GetMaxAttempts(
clientOptions: Options,
requestOptions: requestOptions,
- supportsRetry: true);
+ supportsRetry: false);
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Topaz.PathBuilder(
path: "/image/v1/restore-gen/async",
baseUri: HttpClient.BaseAddress);
@@ -152,6 +153,7 @@ partial void ProcessPostRestoreGenResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
+
var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent();
if (request.Image != default)
{
@@ -159,43 +161,51 @@ partial void ProcessPostRestoreGenResponseContent(
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent(request.Image ?? string.Empty),
name: "\"image\"");
- }
+
+ }
if (request.SourceId != default)
{
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent(request.SourceId ?? string.Empty),
name: "\"source_id\"");
- }
+
+ }
if (request.SourceUrl != default)
{
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent(request.SourceUrl ?? string.Empty),
name: "\"source_url\"");
- }
+
+ }
if (request.Model != default)
{
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent((request.Model).HasValue ? (request.Model).GetValueOrDefault().ToValueString() : string.Empty),
name: "\"model\"");
- }
+
+ }
if (request.OutputFormat != default)
{
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent((request.OutputFormat).HasValue ? (request.OutputFormat).GetValueOrDefault().ToValueString() : string.Empty),
name: "\"output_format\"");
- }
+
+ }
if (request.WebhookUrl != default)
{
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent(request.WebhookUrl ?? string.Empty),
name: "\"webhook_url\"");
+
}
+
__httpRequest.Content = __httpRequestContent;
+
global::Topaz.AutoSDKRequestOptionsSupport.ApplyHeaders(
request: __httpRequest,
clientHeaders: Options.Headers,
@@ -237,6 +247,8 @@ partial void ProcessPostRestoreGenResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -247,6 +259,11 @@ partial void ProcessPostRestoreGenResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Topaz.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Topaz.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -264,6 +281,8 @@ partial void ProcessPostRestoreGenResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -273,8 +292,7 @@ partial void ProcessPostRestoreGenResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Topaz.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -283,6 +301,11 @@ partial void ProcessPostRestoreGenResponseContent(
__attempt < __maxAttempts &&
global::Topaz.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Topaz.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Topaz.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Topaz.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -299,14 +322,15 @@ partial void ProcessPostRestoreGenResponseContent(
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::Topaz.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -346,6 +370,8 @@ partial void ProcessPostRestoreGenResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -366,6 +392,8 @@ partial void ProcessPostRestoreGenResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request contains malformed data in the body, path, or query parameters.
@@ -813,6 +841,7 @@ partial void ProcessPostRestoreGenResponseContent(
return new global::Topaz.AutoSDKHttpResponse(
statusCode: __response.StatusCode,
headers: global::Topaz.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
body: __value);
}
catch (global::System.Exception __ex)
@@ -846,6 +875,7 @@ partial void ProcessPostRestoreGenResponseContent(
return new global::Topaz.AutoSDKHttpResponse(
statusCode: __response.StatusCode,
headers: global::Topaz.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
body: __value);
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Topaz/Generated/Topaz.RestoreClient.g.cs b/src/libs/Topaz/Generated/Topaz.RestoreClient.g.cs
index 03c34c0..13f543d 100644
--- a/src/libs/Topaz/Generated/Topaz.RestoreClient.g.cs
+++ b/src/libs/Topaz/Generated/Topaz.RestoreClient.g.cs
@@ -78,10 +78,10 @@ public RestoreClient(
/// Client-wide request defaults such as headers, query parameters, retries, and timeout.
/// Dispose the HttpClient when the instance is disposed. True by default.
public RestoreClient(
- global::System.Net.Http.HttpClient? httpClient = null,
- global::System.Uri? baseUri = null,
- global::System.Collections.Generic.List? authorizations = null,
- global::Topaz.AutoSDKClientOptions? options = null,
+ global::System.Net.Http.HttpClient? httpClient,
+ global::System.Uri? baseUri,
+ global::System.Collections.Generic.List? authorizations,
+ global::Topaz.AutoSDKClientOptions? options,
bool disposeHttpClient = true)
{
diff --git a/src/libs/Topaz/Generated/Topaz.SharpenClient.PostSharpen.g.cs b/src/libs/Topaz/Generated/Topaz.SharpenClient.PostSharpen.g.cs
index b2779dc..a5b839a 100644
--- a/src/libs/Topaz/Generated/Topaz.SharpenClient.PostSharpen.g.cs
+++ b/src/libs/Topaz/Generated/Topaz.SharpenClient.PostSharpen.g.cs
@@ -114,10 +114,11 @@ partial void ProcessPostSharpenResponseContent(
var __maxAttempts = global::Topaz.AutoSDKRequestOptionsSupport.GetMaxAttempts(
clientOptions: Options,
requestOptions: requestOptions,
- supportsRetry: true);
+ supportsRetry: false);
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Topaz.PathBuilder(
path: "/image/v1/sharpen/async",
baseUri: HttpClient.BaseAddress);
@@ -150,6 +151,7 @@ partial void ProcessPostSharpenResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
+
var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent();
if (request.Image != default)
{
@@ -157,43 +159,51 @@ partial void ProcessPostSharpenResponseContent(
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent(request.Image ?? string.Empty),
name: "\"image\"");
- }
+
+ }
if (request.SourceId != default)
{
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent(request.SourceId ?? string.Empty),
name: "\"source_id\"");
- }
+
+ }
if (request.SourceUrl != default)
{
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent(request.SourceUrl ?? string.Empty),
name: "\"source_url\"");
- }
+
+ }
if (request.Model != default)
{
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent((request.Model).HasValue ? (request.Model).GetValueOrDefault().ToValueString() : string.Empty),
name: "\"model\"");
- }
+
+ }
if (request.OutputFormat != default)
{
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent((request.OutputFormat).HasValue ? (request.OutputFormat).GetValueOrDefault().ToValueString() : string.Empty),
name: "\"output_format\"");
- }
+
+ }
if (request.WebhookUrl != default)
{
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent(request.WebhookUrl ?? string.Empty),
name: "\"webhook_url\"");
+
}
+
__httpRequest.Content = __httpRequestContent;
+
global::Topaz.AutoSDKRequestOptionsSupport.ApplyHeaders(
request: __httpRequest,
clientHeaders: Options.Headers,
@@ -235,6 +245,8 @@ partial void ProcessPostSharpenResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -245,6 +257,11 @@ partial void ProcessPostSharpenResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Topaz.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Topaz.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -262,6 +279,8 @@ partial void ProcessPostSharpenResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -271,8 +290,7 @@ partial void ProcessPostSharpenResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Topaz.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -281,6 +299,11 @@ partial void ProcessPostSharpenResponseContent(
__attempt < __maxAttempts &&
global::Topaz.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Topaz.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Topaz.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Topaz.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -297,14 +320,15 @@ partial void ProcessPostSharpenResponseContent(
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::Topaz.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -344,6 +368,8 @@ partial void ProcessPostSharpenResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -364,6 +390,8 @@ partial void ProcessPostSharpenResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request contains malformed data in the body, path, or query parameters.
@@ -811,6 +839,7 @@ partial void ProcessPostSharpenResponseContent(
return new global::Topaz.AutoSDKHttpResponse(
statusCode: __response.StatusCode,
headers: global::Topaz.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
body: __value);
}
catch (global::System.Exception __ex)
@@ -844,6 +873,7 @@ partial void ProcessPostSharpenResponseContent(
return new global::Topaz.AutoSDKHttpResponse(
statusCode: __response.StatusCode,
headers: global::Topaz.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
body: __value);
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Topaz/Generated/Topaz.SharpenClient.PostSharpenGen.g.cs b/src/libs/Topaz/Generated/Topaz.SharpenClient.PostSharpenGen.g.cs
index 252bbe7..ebb58f7 100644
--- a/src/libs/Topaz/Generated/Topaz.SharpenClient.PostSharpenGen.g.cs
+++ b/src/libs/Topaz/Generated/Topaz.SharpenClient.PostSharpenGen.g.cs
@@ -114,10 +114,11 @@ partial void ProcessPostSharpenGenResponseContent(
var __maxAttempts = global::Topaz.AutoSDKRequestOptionsSupport.GetMaxAttempts(
clientOptions: Options,
requestOptions: requestOptions,
- supportsRetry: true);
+ supportsRetry: false);
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Topaz.PathBuilder(
path: "/image/v1/sharpen-gen/async",
baseUri: HttpClient.BaseAddress);
@@ -150,6 +151,7 @@ partial void ProcessPostSharpenGenResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
+
var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent();
if (request.Image != default)
{
@@ -157,43 +159,51 @@ partial void ProcessPostSharpenGenResponseContent(
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent(request.Image ?? string.Empty),
name: "\"image\"");
- }
+
+ }
if (request.SourceId != default)
{
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent(request.SourceId ?? string.Empty),
name: "\"source_id\"");
- }
+
+ }
if (request.SourceUrl != default)
{
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent(request.SourceUrl ?? string.Empty),
name: "\"source_url\"");
- }
+
+ }
if (request.Model != default)
{
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent((request.Model).HasValue ? (request.Model).GetValueOrDefault().ToValueString() : string.Empty),
name: "\"model\"");
- }
+
+ }
if (request.OutputFormat != default)
{
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent((request.OutputFormat).HasValue ? (request.OutputFormat).GetValueOrDefault().ToValueString() : string.Empty),
name: "\"output_format\"");
- }
+
+ }
if (request.WebhookUrl != default)
{
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent(request.WebhookUrl ?? string.Empty),
name: "\"webhook_url\"");
+
}
+
__httpRequest.Content = __httpRequestContent;
+
global::Topaz.AutoSDKRequestOptionsSupport.ApplyHeaders(
request: __httpRequest,
clientHeaders: Options.Headers,
@@ -235,6 +245,8 @@ partial void ProcessPostSharpenGenResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -245,6 +257,11 @@ partial void ProcessPostSharpenGenResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Topaz.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Topaz.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -262,6 +279,8 @@ partial void ProcessPostSharpenGenResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -271,8 +290,7 @@ partial void ProcessPostSharpenGenResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Topaz.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -281,6 +299,11 @@ partial void ProcessPostSharpenGenResponseContent(
__attempt < __maxAttempts &&
global::Topaz.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Topaz.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Topaz.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Topaz.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -297,14 +320,15 @@ partial void ProcessPostSharpenGenResponseContent(
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::Topaz.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -344,6 +368,8 @@ partial void ProcessPostSharpenGenResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -364,6 +390,8 @@ partial void ProcessPostSharpenGenResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request contains malformed data in the body, path, or query parameters.
@@ -811,6 +839,7 @@ partial void ProcessPostSharpenGenResponseContent(
return new global::Topaz.AutoSDKHttpResponse(
statusCode: __response.StatusCode,
headers: global::Topaz.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
body: __value);
}
catch (global::System.Exception __ex)
@@ -844,6 +873,7 @@ partial void ProcessPostSharpenGenResponseContent(
return new global::Topaz.AutoSDKHttpResponse(
statusCode: __response.StatusCode,
headers: global::Topaz.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
body: __value);
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Topaz/Generated/Topaz.SharpenClient.g.cs b/src/libs/Topaz/Generated/Topaz.SharpenClient.g.cs
index 347a179..e74b837 100644
--- a/src/libs/Topaz/Generated/Topaz.SharpenClient.g.cs
+++ b/src/libs/Topaz/Generated/Topaz.SharpenClient.g.cs
@@ -78,10 +78,10 @@ public SharpenClient(
/// Client-wide request defaults such as headers, query parameters, retries, and timeout.
/// Dispose the HttpClient when the instance is disposed. True by default.
public SharpenClient(
- global::System.Net.Http.HttpClient? httpClient = null,
- global::System.Uri? baseUri = null,
- global::System.Collections.Generic.List? authorizations = null,
- global::Topaz.AutoSDKClientOptions? options = null,
+ global::System.Net.Http.HttpClient? httpClient,
+ global::System.Uri? baseUri,
+ global::System.Collections.Generic.List? authorizations,
+ global::Topaz.AutoSDKClientOptions? options,
bool disposeHttpClient = true)
{
diff --git a/src/libs/Topaz/Generated/Topaz.ToolClient.PostTool.g.cs b/src/libs/Topaz/Generated/Topaz.ToolClient.PostTool.g.cs
index 73057d8..f5613b2 100644
--- a/src/libs/Topaz/Generated/Topaz.ToolClient.PostTool.g.cs
+++ b/src/libs/Topaz/Generated/Topaz.ToolClient.PostTool.g.cs
@@ -114,10 +114,11 @@ partial void ProcessPostToolResponseContent(
var __maxAttempts = global::Topaz.AutoSDKRequestOptionsSupport.GetMaxAttempts(
clientOptions: Options,
requestOptions: requestOptions,
- supportsRetry: true);
+ supportsRetry: false);
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Topaz.PathBuilder(
path: "/image/v1/tool/async",
baseUri: HttpClient.BaseAddress);
@@ -150,6 +151,7 @@ partial void ProcessPostToolResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
+
var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent();
if (request.Image != default)
{
@@ -157,64 +159,75 @@ partial void ProcessPostToolResponseContent(
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent(request.Image ?? string.Empty),
name: "\"image\"");
- }
+
+ }
if (request.SourceId != default)
{
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent(request.SourceId ?? string.Empty),
name: "\"source_id\"");
- }
+
+ }
if (request.SourceUrl != default)
{
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent(request.SourceUrl ?? string.Empty),
name: "\"source_url\"");
- }
+
+ }
if (request.Model != default)
{
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent((request.Model).HasValue ? (request.Model).GetValueOrDefault().ToValueString() : string.Empty),
name: "\"model\"");
- }
+
+ }
if (request.OutputHeight != default)
{
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent(global::System.Convert.ToString(request.OutputHeight, global::System.Globalization.CultureInfo.InvariantCulture) ?? string.Empty),
name: "\"output_height\"");
- }
+
+ }
if (request.OutputWidth != default)
{
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent(global::System.Convert.ToString(request.OutputWidth, global::System.Globalization.CultureInfo.InvariantCulture) ?? string.Empty),
name: "\"output_width\"");
- }
+
+ }
if (request.CropToFill != default)
{
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent((global::System.Convert.ToString(request.CropToFill, global::System.Globalization.CultureInfo.InvariantCulture) ?? string.Empty).ToLowerInvariant()),
name: "\"crop_to_fill\"");
- }
+
+ }
if (request.OutputFormat != default)
{
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent((request.OutputFormat).HasValue ? (request.OutputFormat).GetValueOrDefault().ToValueString() : string.Empty),
name: "\"output_format\"");
- }
+
+ }
if (request.WebhookUrl != default)
{
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent(request.WebhookUrl ?? string.Empty),
name: "\"webhook_url\"");
+
}
+
__httpRequest.Content = __httpRequestContent;
+
global::Topaz.AutoSDKRequestOptionsSupport.ApplyHeaders(
request: __httpRequest,
clientHeaders: Options.Headers,
@@ -256,6 +269,8 @@ partial void ProcessPostToolResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -266,6 +281,11 @@ partial void ProcessPostToolResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Topaz.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Topaz.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -283,6 +303,8 @@ partial void ProcessPostToolResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -292,8 +314,7 @@ partial void ProcessPostToolResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Topaz.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -302,6 +323,11 @@ partial void ProcessPostToolResponseContent(
__attempt < __maxAttempts &&
global::Topaz.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Topaz.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Topaz.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Topaz.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -318,14 +344,15 @@ partial void ProcessPostToolResponseContent(
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::Topaz.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -365,6 +392,8 @@ partial void ProcessPostToolResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -385,6 +414,8 @@ partial void ProcessPostToolResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request contains malformed data in the body, path, or query parameters.
@@ -832,6 +863,7 @@ partial void ProcessPostToolResponseContent(
return new global::Topaz.AutoSDKHttpResponse(
statusCode: __response.StatusCode,
headers: global::Topaz.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
body: __value);
}
catch (global::System.Exception __ex)
@@ -865,6 +897,7 @@ partial void ProcessPostToolResponseContent(
return new global::Topaz.AutoSDKHttpResponse(
statusCode: __response.StatusCode,
headers: global::Topaz.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
body: __value);
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Topaz/Generated/Topaz.ToolClient.g.cs b/src/libs/Topaz/Generated/Topaz.ToolClient.g.cs
index 7affea5..e13da2a 100644
--- a/src/libs/Topaz/Generated/Topaz.ToolClient.g.cs
+++ b/src/libs/Topaz/Generated/Topaz.ToolClient.g.cs
@@ -81,10 +81,10 @@ public ToolClient(
/// Client-wide request defaults such as headers, query parameters, retries, and timeout.
/// Dispose the HttpClient when the instance is disposed. True by default.
public ToolClient(
- global::System.Net.Http.HttpClient? httpClient = null,
- global::System.Uri? baseUri = null,
- global::System.Collections.Generic.List? authorizations = null,
- global::Topaz.AutoSDKClientOptions? options = null,
+ global::System.Net.Http.HttpClient? httpClient,
+ global::System.Uri? baseUri,
+ global::System.Collections.Generic.List? authorizations,
+ global::Topaz.AutoSDKClientOptions? options,
bool disposeHttpClient = true)
{
diff --git a/src/libs/Topaz/Generated/Topaz.TopazClient.g.cs b/src/libs/Topaz/Generated/Topaz.TopazClient.g.cs
index 3b9418f..ff33eb8 100644
--- a/src/libs/Topaz/Generated/Topaz.TopazClient.g.cs
+++ b/src/libs/Topaz/Generated/Topaz.TopazClient.g.cs
@@ -43,7 +43,7 @@ public sealed partial class TopazClient : global::Topaz.ITopazClient, global::Sy
///
/// This section allows you to accept the created request's cost and upload the source video.
///
- public AcceptRequestClient AcceptRequest => new AcceptRequestClient(HttpClient, authorizations: Authorizations, options: Options)
+ public AcceptRequestClient AcceptRequest => new AcceptRequestClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
@@ -52,7 +52,7 @@ public sealed partial class TopazClient : global::Topaz.ITopazClient, global::Sy
///
/// If an image processing job is no longer needed or was started in error, you can cancel it before it completes. The job must be in a cancellable state (e.g., not already completed or failed) for the request to be successful.
///
- public CancelClient Cancel => new CancelClient(HttpClient, authorizations: Authorizations, options: Options)
+ public CancelClient Cancel => new CancelClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
@@ -61,7 +61,7 @@ public sealed partial class TopazClient : global::Topaz.ITopazClient, global::Sy
///
/// This section allows you to cancel a request.
///
- public CancelRequestClient CancelRequest => new CancelRequestClient(HttpClient, authorizations: Authorizations, options: Options)
+ public CancelRequestClient CancelRequest => new CancelRequestClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
@@ -70,7 +70,7 @@ public sealed partial class TopazClient : global::Topaz.ITopazClient, global::Sy
///
/// This section allows you to complete the multi-part upload and start processing.
///
- public CompleteUploadClient CompleteUpload => new CompleteUploadClient(HttpClient, authorizations: Authorizations, options: Options)
+ public CompleteUploadClient CompleteUpload => new CompleteUploadClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
@@ -79,7 +79,7 @@ public sealed partial class TopazClient : global::Topaz.ITopazClient, global::Sy
///
/// This section allows you to create an express request.
///
- public CreateExpressRequestClient CreateExpressRequest => new CreateExpressRequestClient(HttpClient, authorizations: Authorizations, options: Options)
+ public CreateExpressRequestClient CreateExpressRequest => new CreateExpressRequestClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
@@ -88,7 +88,7 @@ public sealed partial class TopazClient : global::Topaz.ITopazClient, global::Sy
///
/// This section allows you to create a request and estimate costs.
///
- public CreateRequestClient CreateRequest => new CreateRequestClient(HttpClient, authorizations: Authorizations, options: Options)
+ public CreateRequestClient CreateRequest => new CreateRequestClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
@@ -97,7 +97,7 @@ public sealed partial class TopazClient : global::Topaz.ITopazClient, global::Sy
///
/// This section allows you to delete your source and enhanced files.
///
- public DeleteFilesClient DeleteFiles => new DeleteFilesClient(HttpClient, authorizations: Authorizations, options: Options)
+ public DeleteFilesClient DeleteFiles => new DeleteFilesClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
@@ -111,7 +111,7 @@ public sealed partial class TopazClient : global::Topaz.ITopazClient, global::Sy
/// - `output_format`
/// Please see the reference for further details. Check out the [available models](https://developer.topazlabs.com/image-api/available-models) to see which model options you have.
///
- public DenoiseClient Denoise => new DenoiseClient(HttpClient, authorizations: Authorizations, options: Options)
+ public DenoiseClient Denoise => new DenoiseClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
@@ -120,7 +120,7 @@ public sealed partial class TopazClient : global::Topaz.ITopazClient, global::Sy
///
/// Access presigned URLs for downloading input or processed images. These endpoints allow you to securely retrieve the input or the processed image with an expiring URL.
///
- public DownloadClient Download => new DownloadClient(HttpClient, authorizations: Authorizations, options: Options)
+ public DownloadClient Download => new DownloadClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
@@ -137,7 +137,7 @@ public sealed partial class TopazClient : global::Topaz.ITopazClient, global::Sy
/// - `crop_to_fill`
/// Please see the reference for further details. Check out the [available models](https://developer.topazlabs.com/image-api/available-models) to see which model options you have.
///
- public EnhanceClient Enhance => new EnhanceClient(HttpClient, authorizations: Authorizations, options: Options)
+ public EnhanceClient Enhance => new EnhanceClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
@@ -146,7 +146,7 @@ public sealed partial class TopazClient : global::Topaz.ITopazClient, global::Sy
///
/// Our estimates will allow you to predict the amount of time required and the number of credits that would be consumed in order to run a set of enhancements on a given image with certain input parameters.
///
- public EstimateClient Estimate => new EstimateClient(HttpClient, authorizations: Authorizations, options: Options)
+ public EstimateClient Estimate => new EstimateClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
@@ -155,7 +155,7 @@ public sealed partial class TopazClient : global::Topaz.ITopazClient, global::Sy
///
/// This section allows you to get your video request history.
///
- public GetRequestHistoryClient GetRequestHistory => new GetRequestHistoryClient(HttpClient, authorizations: Authorizations, options: Options)
+ public GetRequestHistoryClient GetRequestHistory => new GetRequestHistoryClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
@@ -164,7 +164,7 @@ public sealed partial class TopazClient : global::Topaz.ITopazClient, global::Sy
///
/// This section allows you to get the metrics for a request.
///
- public GetRequestMetricsClient GetRequestMetrics => new GetRequestMetricsClient(HttpClient, authorizations: Authorizations, options: Options)
+ public GetRequestMetricsClient GetRequestMetrics => new GetRequestMetricsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
@@ -173,7 +173,7 @@ public sealed partial class TopazClient : global::Topaz.ITopazClient, global::Sy
///
/// This section allows you to get the status of a request.
///
- public GetRequestStatusClient GetRequestStatus => new GetRequestStatusClient(HttpClient, authorizations: Authorizations, options: Options)
+ public GetRequestStatusClient GetRequestStatus => new GetRequestStatusClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
@@ -183,7 +183,7 @@ public sealed partial class TopazClient : global::Topaz.ITopazClient, global::Sy
/// Check and manage the statuses of your image processing jobs. Whether you are handling a single job or managing a queue of bulk image processing tasks, the Status endpoints allow you to monitor the progress and completion of your tasks.
/// This is particularly useful for long-running jobs, where you can track progress and retrieve details such as percentage completion, estimated finish time, and current state (e.g., pending, processing, completed).
///
- public ImageStatusClient ImageStatus => new ImageStatusClient(HttpClient, authorizations: Authorizations, options: Options)
+ public ImageStatusClient ImageStatus => new ImageStatusClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
@@ -197,7 +197,7 @@ public sealed partial class TopazClient : global::Topaz.ITopazClient, global::Sy
/// - `output_format`
/// Please see the reference for further details. Check out the [available models](https://developer.topazlabs.com/image-api/available-models) to see which model options you have.
///
- public LightingClient Lighting => new LightingClient(HttpClient, authorizations: Authorizations, options: Options)
+ public LightingClient Lighting => new LightingClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
@@ -212,7 +212,7 @@ public sealed partial class TopazClient : global::Topaz.ITopazClient, global::Sy
/// - `output_format`
/// Please see the reference for further details.
///
- public MattingClient Matting => new MattingClient(HttpClient, authorizations: Authorizations, options: Options)
+ public MattingClient Matting => new MattingClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
@@ -226,7 +226,7 @@ public sealed partial class TopazClient : global::Topaz.ITopazClient, global::Sy
/// - `output_format`
/// Please see the reference for further details. Check out the [available models](https://developer.topazlabs.com/image-api/available-models) to see which model options you have.
///
- public RestoreClient Restore => new RestoreClient(HttpClient, authorizations: Authorizations, options: Options)
+ public RestoreClient Restore => new RestoreClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
@@ -240,7 +240,7 @@ public sealed partial class TopazClient : global::Topaz.ITopazClient, global::Sy
/// - `output_format`
/// Please see the reference for further details. Check out the [available models](https://developer.topazlabs.com/image-api/available-models) to see which model options you have.
///
- public SharpenClient Sharpen => new SharpenClient(HttpClient, authorizations: Authorizations, options: Options)
+ public SharpenClient Sharpen => new SharpenClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
@@ -257,7 +257,7 @@ public sealed partial class TopazClient : global::Topaz.ITopazClient, global::Sy
/// - `crop_to_fill`
/// Please see the reference for further details.
///
- public ToolClient Tool => new ToolClient(HttpClient, authorizations: Authorizations, options: Options)
+ public ToolClient Tool => new ToolClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
@@ -266,7 +266,7 @@ public sealed partial class TopazClient : global::Topaz.ITopazClient, global::Sy
///
/// This section informs you about the system status.
///
- public VideoStatusClient VideoStatus => new VideoStatusClient(HttpClient, authorizations: Authorizations, options: Options)
+ public VideoStatusClient VideoStatus => new VideoStatusClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
@@ -305,10 +305,10 @@ public TopazClient(
/// Client-wide request defaults such as headers, query parameters, retries, and timeout.
/// Dispose the HttpClient when the instance is disposed. True by default.
public TopazClient(
- global::System.Net.Http.HttpClient? httpClient = null,
- global::System.Uri? baseUri = null,
- global::System.Collections.Generic.List? authorizations = null,
- global::Topaz.AutoSDKClientOptions? options = null,
+ global::System.Net.Http.HttpClient? httpClient,
+ global::System.Uri? baseUri,
+ global::System.Collections.Generic.List? authorizations,
+ global::Topaz.AutoSDKClientOptions? options,
bool disposeHttpClient = true)
{
diff --git a/src/libs/Topaz/Generated/Topaz.VideoStatusClient.GetSystemStatus.g.cs b/src/libs/Topaz/Generated/Topaz.VideoStatusClient.GetSystemStatus.g.cs
index 7e83ae0..b5d3ab6 100644
--- a/src/libs/Topaz/Generated/Topaz.VideoStatusClient.GetSystemStatus.g.cs
+++ b/src/libs/Topaz/Generated/Topaz.VideoStatusClient.GetSystemStatus.g.cs
@@ -55,6 +55,30 @@ partial void ProcessGetSystemStatusResponseContent(
public async global::System.Threading.Tasks.Task GetSystemStatusAsync(
global::Topaz.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await GetSystemStatusAsResponseAsync(
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Get System Status
+ /// Get status of the video cloud
+ /// ## Response body
+ /// | **Property** | **Type** | **Description** |
+ /// |-------------------------|----------|----------------------------|
+ /// | **isAvailable** | Boolean | System availability status |
+ /// | **availabilityMessage** | String | Availability message |
+ /// | **supportedModels** | Array | List of supported AI models in their shortened format (apo-8 for Apollo v8) |
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> GetSystemStatusAsResponseAsync(
+ global::Topaz.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -83,6 +107,7 @@ partial void ProcessGetSystemStatusResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Topaz.PathBuilder(
path: "/video/status",
baseUri: HttpClient.BaseAddress);
@@ -155,6 +180,8 @@ partial void ProcessGetSystemStatusResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -165,6 +192,11 @@ partial void ProcessGetSystemStatusResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Topaz.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Topaz.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -182,6 +214,8 @@ partial void ProcessGetSystemStatusResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -191,8 +225,7 @@ partial void ProcessGetSystemStatusResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Topaz.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -201,6 +234,11 @@ partial void ProcessGetSystemStatusResponseContent(
__attempt < __maxAttempts &&
global::Topaz.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Topaz.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Topaz.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Topaz.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -217,14 +255,15 @@ partial void ProcessGetSystemStatusResponseContent(
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::Topaz.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -264,6 +303,8 @@ partial void ProcessGetSystemStatusResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -284,6 +325,8 @@ partial void ProcessGetSystemStatusResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Internal server error
@@ -346,9 +389,13 @@ partial void ProcessGetSystemStatusResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Topaz.SystemStatusResponse.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Topaz.SystemStatusResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Topaz.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Topaz.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -376,9 +423,13 @@ partial void ProcessGetSystemStatusResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Topaz.SystemStatusResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Topaz.SystemStatusResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Topaz.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Topaz.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Topaz/Generated/Topaz.VideoStatusClient.g.cs b/src/libs/Topaz/Generated/Topaz.VideoStatusClient.g.cs
index ee4f35a..106064e 100644
--- a/src/libs/Topaz/Generated/Topaz.VideoStatusClient.g.cs
+++ b/src/libs/Topaz/Generated/Topaz.VideoStatusClient.g.cs
@@ -73,10 +73,10 @@ public VideoStatusClient(
/// Client-wide request defaults such as headers, query parameters, retries, and timeout.
/// Dispose the HttpClient when the instance is disposed. True by default.
public VideoStatusClient(
- global::System.Net.Http.HttpClient? httpClient = null,
- global::System.Uri? baseUri = null,
- global::System.Collections.Generic.List? authorizations = null,
- global::Topaz.AutoSDKClientOptions? options = null,
+ global::System.Net.Http.HttpClient? httpClient,
+ global::System.Uri? baseUri,
+ global::System.Collections.Generic.List? authorizations,
+ global::Topaz.AutoSDKClientOptions? options,
bool disposeHttpClient = true)
{