From adc06b776c96e1f504f2eb1bf184f71ccf9340ed Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 5 May 2026 16:20:21 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- .../HeyGen.AssetsClient.V1AssetUpload.g.cs | 51 +++- .../HeyGen/Generated/HeyGen.AssetsClient.g.cs | 8 +- .../Generated/HeyGen.AutoSDKHttpResponse.g.cs | 121 +++++++++ ...en.CreateVideoApiClient.V1VideoDelete.g.cs | 60 ++++- ....CreateVideoApiClient.V2VideoGenerate.g.cs | 57 ++++- .../HeyGen.CreateVideoApiClient.g.cs | 8 +- .../HeyGen.HeyGenClient.V1VideoStatusGet.g.cs | 60 ++++- .../HeyGen/Generated/HeyGen.HeyGenClient.g.cs | 28 +-- .../HeyGen.IAssetsClient.V1AssetUpload.g.cs | 10 + ...n.ICreateVideoApiClient.V1VideoDelete.g.cs | 14 ++ ...ICreateVideoApiClient.V2VideoGenerate.g.cs | 14 ++ ...HeyGen.IHeyGenClient.V1VideoStatusGet.g.cs | 14 ++ .../HeyGen.IListsClient.V1AvatarList.g.cs | 10 + .../HeyGen.IListsClient.V1VideoList.g.cs | 10 + .../HeyGen.IListsClient.V1VoiceList.g.cs | 10 + .../HeyGen.IListsClient.V2Avatars.g.cs | 10 + .../HeyGen.IListsClient.V2Voices.g.cs | 10 + ...deoClient.PersonalizedVideoAddContact.g.cs | 13 + ...lient.PersonalizedVideoAudienceDetail.g.cs | 14 ++ ...Client.PersonalizedVideoProjectDetail.g.cs | 14 ++ ...treamingApiClient.StreamingAvatarList.g.cs | 10 + ...reamingApiClient.StreamingCreateToken.g.cs | 13 + ...yGen.IStreamingApiClient.StreamingIce.g.cs | 13 + ...StreamingApiClient.StreamingInterrupt.g.cs | 13 + ...Gen.IStreamingApiClient.StreamingList.g.cs | 10 + ...yGen.IStreamingApiClient.StreamingNew.g.cs | 13 + ...en.IStreamingApiClient.StreamingStart.g.cs | 13 + ...Gen.IStreamingApiClient.StreamingStop.g.cs | 13 + ...Gen.IStreamingApiClient.StreamingTask.g.cs | 13 + ...TalkingPhotoClient.V1TalkingPhotoList.g.cs | 10 + ...lkingPhotoClient.V1TalkingPhotoUpload.g.cs | 10 + ...ingPhotoClient.V2TalkingPhotoIdDelete.g.cs | 10 + ...ITemplateApiClient.V2TemplateGenerate.g.cs | 14 ++ ...eyGen.ITemplateApiClient.V2TemplateId.g.cs | 10 + ...HeyGen.ITemplateApiClient.V2Templates.g.cs | 10 + ...yGen.IUserClient.V2UserRemainingQuota.g.cs | 10 + ...eoTranslateApiClient.V2VideoTranslate.g.cs | 13 + ...ateApiClient.V2VideoTranslateIdStatus.g.cs | 10 + ...lient.V2VideoTranslateTargetLanguages.g.cs | 10 + ....IWebhooksClient.V1WebhookEndpointAdd.g.cs | 13 + ...ebhooksClient.V1WebhookEndpointDelete.g.cs | 14 ++ ...IWebhooksClient.V1WebhookEndpointList.g.cs | 10 + ....IWebhooksClient.V1WebhookWebhookList.g.cs | 10 + .../HeyGen.ListsClient.V1AvatarList.g.cs | 51 +++- .../HeyGen.ListsClient.V1VideoList.g.cs | 51 +++- .../HeyGen.ListsClient.V1VoiceList.g.cs | 51 +++- .../HeyGen.ListsClient.V2Avatars.g.cs | 51 +++- .../HeyGen.ListsClient.V2Voices.g.cs | 51 +++- .../HeyGen/Generated/HeyGen.ListsClient.g.cs | 8 +- .../Generated/HeyGen.OptionsSupport.g.cs | 231 +++++++++++++++++- ...deoClient.PersonalizedVideoAddContact.g.cs | 56 ++++- ...lient.PersonalizedVideoAudienceDetail.g.cs | 60 ++++- ...Client.PersonalizedVideoProjectDetail.g.cs | 60 ++++- .../HeyGen.PersonalizedVideoClient.g.cs | 8 +- ...treamingApiClient.StreamingAvatarList.g.cs | 51 +++- ...reamingApiClient.StreamingCreateToken.g.cs | 56 ++++- ...eyGen.StreamingApiClient.StreamingIce.g.cs | 56 ++++- ...StreamingApiClient.StreamingInterrupt.g.cs | 56 ++++- ...yGen.StreamingApiClient.StreamingList.g.cs | 51 +++- ...eyGen.StreamingApiClient.StreamingNew.g.cs | 56 ++++- ...Gen.StreamingApiClient.StreamingStart.g.cs | 56 ++++- ...yGen.StreamingApiClient.StreamingStop.g.cs | 56 ++++- ...yGen.StreamingApiClient.StreamingTask.g.cs | 56 ++++- .../Generated/HeyGen.StreamingApiClient.g.cs | 8 +- ...TalkingPhotoClient.V1TalkingPhotoList.g.cs | 51 +++- ...lkingPhotoClient.V1TalkingPhotoUpload.g.cs | 51 +++- ...ingPhotoClient.V2TalkingPhotoIdDelete.g.cs | 51 +++- .../Generated/HeyGen.TalkingPhotoClient.g.cs | 8 +- ....TemplateApiClient.V2TemplateGenerate.g.cs | 57 ++++- ...HeyGen.TemplateApiClient.V2TemplateId.g.cs | 51 +++- .../HeyGen.TemplateApiClient.V2Templates.g.cs | 51 +++- .../Generated/HeyGen.TemplateApiClient.g.cs | 8 +- ...eyGen.UserClient.V2UserRemainingQuota.g.cs | 51 +++- .../HeyGen/Generated/HeyGen.UserClient.g.cs | 8 +- ...eoTranslateApiClient.V2VideoTranslate.g.cs | 56 ++++- ...ateApiClient.V2VideoTranslateIdStatus.g.cs | 51 +++- ...lient.V2VideoTranslateTargetLanguages.g.cs | 51 +++- .../HeyGen.VideoTranslateApiClient.g.cs | 8 +- ...n.WebhooksClient.V1WebhookEndpointAdd.g.cs | 56 ++++- ...ebhooksClient.V1WebhookEndpointDelete.g.cs | 60 ++++- ....WebhooksClient.V1WebhookEndpointList.g.cs | 51 +++- ...n.WebhooksClient.V1WebhookWebhookList.g.cs | 51 +++- .../Generated/HeyGen.WebhooksClient.g.cs | 8 +- 83 files changed, 2550 insertions(+), 210 deletions(-) create mode 100644 src/libs/HeyGen/Generated/HeyGen.AutoSDKHttpResponse.g.cs diff --git a/src/libs/HeyGen/Generated/HeyGen.AssetsClient.V1AssetUpload.g.cs b/src/libs/HeyGen/Generated/HeyGen.AssetsClient.V1AssetUpload.g.cs index cc22cc8..32580f3 100644 --- a/src/libs/HeyGen/Generated/HeyGen.AssetsClient.V1AssetUpload.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.AssetsClient.V1AssetUpload.g.cs @@ -57,6 +57,22 @@ partial void ProcessV1AssetUploadResponse( public async global::System.Threading.Tasks.Task V1AssetUploadAsync( global::HeyGen.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await V1AssetUploadAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// v1/asset (upload)
+ /// v1/asset (upload) + ///
+ /// 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 V1AssetUploadAsResponseAsync( + global::HeyGen.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -85,6 +101,7 @@ partial void ProcessV1AssetUploadResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::HeyGen.PathBuilder( path: "/v1/asset", baseUri: ResolveBaseUri( @@ -159,6 +176,8 @@ partial void ProcessV1AssetUploadResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -169,6 +188,11 @@ partial void ProcessV1AssetUploadResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::HeyGen.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::HeyGen.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -186,6 +210,8 @@ partial void ProcessV1AssetUploadResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -195,8 +221,7 @@ partial void ProcessV1AssetUploadResponse( __httpRequest.Dispose(); __httpRequest = null; await global::HeyGen.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -205,6 +230,11 @@ partial void ProcessV1AssetUploadResponse( __attempt < __maxAttempts && global::HeyGen.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::HeyGen.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::HeyGen.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::HeyGen.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -221,14 +251,15 @@ partial void ProcessV1AssetUploadResponse( 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::HeyGen.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -268,6 +299,8 @@ partial void ProcessV1AssetUploadResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -288,6 +321,8 @@ partial void ProcessV1AssetUploadResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -308,6 +343,10 @@ partial void ProcessV1AssetUploadResponse( { __response.EnsureSuccessStatusCode(); + return new global::HeyGen.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::HeyGen.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -329,6 +368,10 @@ partial void ProcessV1AssetUploadResponse( try { __response.EnsureSuccessStatusCode(); + return new global::HeyGen.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::HeyGen.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/HeyGen/Generated/HeyGen.AssetsClient.g.cs b/src/libs/HeyGen/Generated/HeyGen.AssetsClient.g.cs index 8ea640b..85a629e 100644 --- a/src/libs/HeyGen/Generated/HeyGen.AssetsClient.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.AssetsClient.g.cs @@ -105,10 +105,10 @@ public AssetsClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public AssetsClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::HeyGen.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::HeyGen.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/HeyGen/Generated/HeyGen.AutoSDKHttpResponse.g.cs b/src/libs/HeyGen/Generated/HeyGen.AutoSDKHttpResponse.g.cs new file mode 100644 index 0000000..7386c96 --- /dev/null +++ b/src/libs/HeyGen/Generated/HeyGen.AutoSDKHttpResponse.g.cs @@ -0,0 +1,121 @@ + +#nullable enable + +namespace HeyGen +{ + /// + /// Represents a successful HTTP response with status code and headers. + /// + public partial class AutoSDKHttpResponse + { + /// + /// Initializes a new instance of the class. + /// + 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; + } + + /// + /// Gets the HTTP status code. + /// + public global::System.Net.HttpStatusCode StatusCode { get; } + /// + /// 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) + { + response = response ?? throw new global::System.ArgumentNullException(nameof(response)); + + var headers = global::System.Linq.Enumerable.ToDictionary( + response.Headers, + static header => header.Key, + static header => (global::System.Collections.Generic.IEnumerable)global::System.Linq.Enumerable.ToArray(header.Value), + global::System.StringComparer.OrdinalIgnoreCase); + + if (response.Content?.Headers == null) + { + return headers; + } + + foreach (var header in response.Content.Headers) + { + if (headers.TryGetValue(header.Key, out var existingValues)) + { + headers[header.Key] = global::System.Linq.Enumerable.ToArray( + global::System.Linq.Enumerable.Concat(existingValues, header.Value)); + } + else + { + headers[header.Key] = global::System.Linq.Enumerable.ToArray(header.Value); + } + } + + return headers; + } + } + + /// + /// Represents a successful HTTP response with status code, headers, and body. + /// + public partial class AutoSDKHttpResponse : AutoSDKHttpResponse + { + /// + /// Initializes a new instance of the class. + /// + public AutoSDKHttpResponse( + global::System.Net.HttpStatusCode statusCode, + global::System.Collections.Generic.Dictionary> headers, + T body) + : 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; + } + + /// + /// Gets the response body. + /// + public T Body { get; } + } +} \ No newline at end of file diff --git a/src/libs/HeyGen/Generated/HeyGen.CreateVideoApiClient.V1VideoDelete.g.cs b/src/libs/HeyGen/Generated/HeyGen.CreateVideoApiClient.V1VideoDelete.g.cs index acfe31f..fcd5df8 100644 --- a/src/libs/HeyGen/Generated/HeyGen.CreateVideoApiClient.V1VideoDelete.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.CreateVideoApiClient.V1VideoDelete.g.cs @@ -63,6 +63,27 @@ partial void ProcessV1VideoDeleteResponse( string? videoId = default, global::HeyGen.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await V1VideoDeleteAsResponseAsync( + videoId: videoId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// v1/video.delete
+ /// v1/video.delete + ///
+ /// + /// Example: <video_id> + /// + /// 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 V1VideoDeleteAsResponseAsync( + string? videoId = default, + global::HeyGen.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -92,13 +113,14 @@ partial void ProcessV1VideoDeleteResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::HeyGen.PathBuilder( path: "/v1/video.delete", baseUri: ResolveBaseUri( servers: s_V1VideoDeleteServers, - defaultBaseUrl: "https://api.heygen.com/")); + defaultBaseUrl: "https://api.heygen.com/")); __pathBuilder - .AddOptionalParameter("video_id", videoId) + .AddOptionalParameter("video_id", videoId) ; var __path = __pathBuilder.ToString(); __path = global::HeyGen.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -170,6 +192,8 @@ partial void ProcessV1VideoDeleteResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -180,6 +204,11 @@ partial void ProcessV1VideoDeleteResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::HeyGen.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::HeyGen.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -197,6 +226,8 @@ partial void ProcessV1VideoDeleteResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -206,8 +237,7 @@ partial void ProcessV1VideoDeleteResponse( __httpRequest.Dispose(); __httpRequest = null; await global::HeyGen.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -216,6 +246,11 @@ partial void ProcessV1VideoDeleteResponse( __attempt < __maxAttempts && global::HeyGen.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::HeyGen.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::HeyGen.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::HeyGen.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -232,14 +267,15 @@ partial void ProcessV1VideoDeleteResponse( 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::HeyGen.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -279,6 +315,8 @@ partial void ProcessV1VideoDeleteResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -299,6 +337,8 @@ partial void ProcessV1VideoDeleteResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -319,6 +359,10 @@ partial void ProcessV1VideoDeleteResponse( { __response.EnsureSuccessStatusCode(); + return new global::HeyGen.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::HeyGen.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -340,6 +384,10 @@ partial void ProcessV1VideoDeleteResponse( try { __response.EnsureSuccessStatusCode(); + return new global::HeyGen.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::HeyGen.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/HeyGen/Generated/HeyGen.CreateVideoApiClient.V2VideoGenerate.g.cs b/src/libs/HeyGen/Generated/HeyGen.CreateVideoApiClient.V2VideoGenerate.g.cs index 43f9f60..861799b 100644 --- a/src/libs/HeyGen/Generated/HeyGen.CreateVideoApiClient.V2VideoGenerate.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.CreateVideoApiClient.V2VideoGenerate.g.cs @@ -60,6 +60,28 @@ partial void ProcessV2VideoGenerateResponse( /// public async global::System.Threading.Tasks.Task V2VideoGenerateAsync( + global::HeyGen.V2VideoGenerateRequest request, + global::HeyGen.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + await V2VideoGenerateAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// v2/video/generate
+ /// Generated Video: [https://app.heygen.com/share/67cd13935445457eaa99040070bdb545](https://app.heygen.com/share/67cd13935445457eaa99040070bdb545)
+ /// <img src="https://resource.heygen.ai/video/gifs/67cd13935445457eaa99040070bdb545.gif" alt=""> + ///
+ /// + /// 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 V2VideoGenerateAsResponseAsync( + global::HeyGen.V2VideoGenerateRequest request, global::HeyGen.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -94,6 +116,7 @@ partial void ProcessV2VideoGenerateResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::HeyGen.PathBuilder( path: "/v2/video/generate", baseUri: ResolveBaseUri( @@ -175,6 +198,8 @@ partial void ProcessV2VideoGenerateResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -185,6 +210,11 @@ partial void ProcessV2VideoGenerateResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::HeyGen.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::HeyGen.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -202,6 +232,8 @@ partial void ProcessV2VideoGenerateResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -211,8 +243,7 @@ partial void ProcessV2VideoGenerateResponse( __httpRequest.Dispose(); __httpRequest = null; await global::HeyGen.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -221,6 +252,11 @@ partial void ProcessV2VideoGenerateResponse( __attempt < __maxAttempts && global::HeyGen.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::HeyGen.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::HeyGen.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::HeyGen.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -237,14 +273,15 @@ partial void ProcessV2VideoGenerateResponse( 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::HeyGen.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -284,6 +321,8 @@ partial void ProcessV2VideoGenerateResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -304,6 +343,8 @@ partial void ProcessV2VideoGenerateResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -324,6 +365,10 @@ partial void ProcessV2VideoGenerateResponse( { __response.EnsureSuccessStatusCode(); + return new global::HeyGen.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::HeyGen.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -345,6 +390,10 @@ partial void ProcessV2VideoGenerateResponse( try { __response.EnsureSuccessStatusCode(); + return new global::HeyGen.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::HeyGen.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/HeyGen/Generated/HeyGen.CreateVideoApiClient.g.cs b/src/libs/HeyGen/Generated/HeyGen.CreateVideoApiClient.g.cs index 3c7e511..f93b2c9 100644 --- a/src/libs/HeyGen/Generated/HeyGen.CreateVideoApiClient.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.CreateVideoApiClient.g.cs @@ -105,10 +105,10 @@ public CreateVideoApiClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public CreateVideoApiClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::HeyGen.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::HeyGen.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/HeyGen/Generated/HeyGen.HeyGenClient.V1VideoStatusGet.g.cs b/src/libs/HeyGen/Generated/HeyGen.HeyGenClient.V1VideoStatusGet.g.cs index c4cf854..ab38fd0 100644 --- a/src/libs/HeyGen/Generated/HeyGen.HeyGenClient.V1VideoStatusGet.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.HeyGenClient.V1VideoStatusGet.g.cs @@ -63,6 +63,27 @@ partial void ProcessV1VideoStatusGetResponse( string? videoId = default, global::HeyGen.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await V1VideoStatusGetAsResponseAsync( + videoId: videoId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// v1/video_status.get
+ /// v1/video_status.get + ///
+ /// + /// Example: <video_id> + /// + /// 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 V1VideoStatusGetAsResponseAsync( + string? videoId = default, + global::HeyGen.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -92,13 +113,14 @@ partial void ProcessV1VideoStatusGetResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::HeyGen.PathBuilder( path: "/v1/video_status.get", baseUri: ResolveBaseUri( servers: s_V1VideoStatusGetServers, - defaultBaseUrl: "https://api.heygen.com/")); + defaultBaseUrl: "https://api.heygen.com/")); __pathBuilder - .AddOptionalParameter("video_id", videoId) + .AddOptionalParameter("video_id", videoId) ; var __path = __pathBuilder.ToString(); __path = global::HeyGen.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -170,6 +192,8 @@ partial void ProcessV1VideoStatusGetResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -180,6 +204,11 @@ partial void ProcessV1VideoStatusGetResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::HeyGen.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::HeyGen.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -197,6 +226,8 @@ partial void ProcessV1VideoStatusGetResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -206,8 +237,7 @@ partial void ProcessV1VideoStatusGetResponse( __httpRequest.Dispose(); __httpRequest = null; await global::HeyGen.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -216,6 +246,11 @@ partial void ProcessV1VideoStatusGetResponse( __attempt < __maxAttempts && global::HeyGen.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::HeyGen.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::HeyGen.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::HeyGen.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -232,14 +267,15 @@ partial void ProcessV1VideoStatusGetResponse( 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::HeyGen.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -279,6 +315,8 @@ partial void ProcessV1VideoStatusGetResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -299,6 +337,8 @@ partial void ProcessV1VideoStatusGetResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -319,6 +359,10 @@ partial void ProcessV1VideoStatusGetResponse( { __response.EnsureSuccessStatusCode(); + return new global::HeyGen.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::HeyGen.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -340,6 +384,10 @@ partial void ProcessV1VideoStatusGetResponse( try { __response.EnsureSuccessStatusCode(); + return new global::HeyGen.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::HeyGen.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/HeyGen/Generated/HeyGen.HeyGenClient.g.cs b/src/libs/HeyGen/Generated/HeyGen.HeyGenClient.g.cs index dff6349..2202950 100644 --- a/src/libs/HeyGen/Generated/HeyGen.HeyGenClient.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.HeyGenClient.g.cs @@ -68,7 +68,7 @@ public sealed partial class HeyGenClient : global::HeyGen.IHeyGenClient, global: /// Upload an image or video asset to your account.
/// **Reference**: [https://docs.heygen.com/reference/upload-asset-1](https://docs.heygen.com/reference/upload-asset-1). /// - public AssetsClient Assets => new AssetsClient(HttpClient, authorizations: Authorizations, options: Options) + public AssetsClient Assets => new AssetsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -79,7 +79,7 @@ public sealed partial class HeyGenClient : global::HeyGen.IHeyGenClient, global: /// Create personalized avatar videos with ease using the **HeyGen API**. By selecting an avatar and a voice, you can create engaging videos for various purposes. 🌟
/// **Guide**: [https://docs.heygen.com/docs/create-video](https://docs.heygen.com/docs/create-video)**Reference**: [https://docs.heygen.com/reference/create-an-avatar-video-v2](https://docs.heygen.com/reference/create-an-avatar-video-v2). /// - public CreateVideoApiClient CreateVideoApi => new CreateVideoApiClient(HttpClient, authorizations: Authorizations, options: Options) + public CreateVideoApiClient CreateVideoApi => new CreateVideoApiClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -89,7 +89,7 @@ public sealed partial class HeyGenClient : global::HeyGen.IHeyGenClient, global: /// /// /// - public ListsClient Lists => new ListsClient(HttpClient, authorizations: Authorizations, options: Options) + public ListsClient Lists => new ListsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -101,7 +101,7 @@ public sealed partial class HeyGenClient : global::HeyGen.IHeyGenClient, global: /// **Guide**: [https://docs.heygen.com/docs/import-contacts-via-api](https://docs.heygen.com/docs/import-contacts-via-api)
/// Reference: [https://docs.heygen.com/reference/add-contact](https://docs.heygen.com/reference/add-contact). /// - public PersonalizedVideoClient PersonalizedVideo => new PersonalizedVideoClient(HttpClient, authorizations: Authorizations, options: Options) + public PersonalizedVideoClient PersonalizedVideo => new PersonalizedVideoClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -112,7 +112,7 @@ public sealed partial class HeyGenClient : global::HeyGen.IHeyGenClient, global: /// HeyGen's **Streaming API** allows developers to seamlessly integrate dynamic digital avatars into their applications for immersive and interactive user experiences. With this API, you can create _virtual assistants, real-time training simulations,_ and more, with a focus on real-time, low-latency communication between _users_ and _avatars_ with power of WebRTC.
/// **Guide**: [https://docs.heygen.com/docs/streaming-api](https://docs.heygen.com/docs/streaming-api)**Reference**: [https://docs.heygen.com/reference/new-session](https://docs.heygen.com/reference/new-session). /// - public StreamingApiClient StreamingApi => new StreamingApiClient(HttpClient, authorizations: Authorizations, options: Options) + public StreamingApiClient StreamingApi => new StreamingApiClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -123,7 +123,7 @@ public sealed partial class HeyGenClient : global::HeyGen.IHeyGenClient, global: /// These API endpoints allow you to manage photo avatars in your account.
/// **Reference**: [https://docs.heygen.com/reference/upload-talking-photo](https://docs.heygen.com/reference/upload-talking-photo). /// - public TalkingPhotoClient TalkingPhoto => new TalkingPhotoClient(HttpClient, authorizations: Authorizations, options: Options) + public TalkingPhotoClient TalkingPhoto => new TalkingPhotoClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -140,7 +140,7 @@ public sealed partial class HeyGenClient : global::HeyGen.IHeyGenClient, global: /// **Guide**: [https://docs.heygen.com/docs/generate-video-from-template-v2](https://docs.heygen.com/docs/generate-video-from-template-v2)
/// **Reference**: [https://docs.heygen.com/reference/generate-from-template-v2](https://docs.heygen.com/reference/generate-from-template-v2)[](https://docs.heygen.com/reference/create-an-avatar-video-v2). /// - public TemplateApiClient TemplateApi => new TemplateApiClient(HttpClient, authorizations: Authorizations, options: Options) + public TemplateApiClient TemplateApi => new TemplateApiClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -151,7 +151,7 @@ public sealed partial class HeyGenClient : global::HeyGen.IHeyGenClient, global: /// Obtain information about your account.
/// **Reference**: [https://docs.heygen.com/reference/get-remaining-quota-v2](https://docs.heygen.com/reference/get-remaining-quota-v2). /// - public UserClient User => new UserClient(HttpClient, authorizations: Authorizations, options: Options) + public UserClient User => new UserClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -162,7 +162,7 @@ public sealed partial class HeyGenClient : global::HeyGen.IHeyGenClient, global: /// The [Video Translate](https://labs.heygen.com/video-translate) by HeyGen provides a powerful solution for effortlessly translating videos, integrating natural voice cloning and authentic speaking styles seamlessly. Now, you can harness its capabilities programmatically through the **Video Translate API**!
/// **Guide**: [https://docs.heygen.com/docs/video-translate-api](https://docs.heygen.com/docs/video-translate-api)**Reference**: [https://docs.heygen.com/reference/video-translate](https://docs.heygen.com/reference/video-translate). /// - public VideoTranslateApiClient VideoTranslateApi => new VideoTranslateApiClient(HttpClient, authorizations: Authorizations, options: Options) + public VideoTranslateApiClient VideoTranslateApi => new VideoTranslateApiClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -173,7 +173,7 @@ public sealed partial class HeyGenClient : global::HeyGen.IHeyGenClient, global: /// Webhook events are how the **HeyGen** notifies your _endpoints_ when a variety of interactions or events happen, including when avatar video processing _succeeds_ or _fails_. Webhook events are sent by HeyGen as POST requests to your webhook endpoint.
/// **Guide**: [https://docs.heygen.com/docs/using-heygens-webhook-events](https://docs.heygen.com/docs/using-heygens-webhook-events)**Reference**: [https://docs.heygen.com/reference/add-a-webhook-endpoint](https://docs.heygen.com/reference/add-a-webhook-endpoint). /// - public WebhooksClient Webhooks => new WebhooksClient(HttpClient, authorizations: Authorizations, options: Options) + public WebhooksClient Webhooks => new WebhooksClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -241,10 +241,10 @@ public HeyGenClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public HeyGenClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::HeyGen.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::HeyGen.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/HeyGen/Generated/HeyGen.IAssetsClient.V1AssetUpload.g.cs b/src/libs/HeyGen/Generated/HeyGen.IAssetsClient.V1AssetUpload.g.cs index 70aa7f8..3fe7e91 100644 --- a/src/libs/HeyGen/Generated/HeyGen.IAssetsClient.V1AssetUpload.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.IAssetsClient.V1AssetUpload.g.cs @@ -14,5 +14,15 @@ public partial interface IAssetsClient global::System.Threading.Tasks.Task V1AssetUploadAsync( global::HeyGen.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// v1/asset (upload)
+ /// v1/asset (upload) + ///
+ /// 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 V1AssetUploadAsResponseAsync( + global::HeyGen.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/HeyGen/Generated/HeyGen.ICreateVideoApiClient.V1VideoDelete.g.cs b/src/libs/HeyGen/Generated/HeyGen.ICreateVideoApiClient.V1VideoDelete.g.cs index 91f6d6d..1f3de08 100644 --- a/src/libs/HeyGen/Generated/HeyGen.ICreateVideoApiClient.V1VideoDelete.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.ICreateVideoApiClient.V1VideoDelete.g.cs @@ -18,5 +18,19 @@ public partial interface ICreateVideoApiClient string? videoId = default, global::HeyGen.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// v1/video.delete
+ /// v1/video.delete + ///
+ /// + /// Example: <video_id> + /// + /// 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 V1VideoDeleteAsResponseAsync( + string? videoId = default, + global::HeyGen.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/HeyGen/Generated/HeyGen.ICreateVideoApiClient.V2VideoGenerate.g.cs b/src/libs/HeyGen/Generated/HeyGen.ICreateVideoApiClient.V2VideoGenerate.g.cs index ce07023..7f2e852 100644 --- a/src/libs/HeyGen/Generated/HeyGen.ICreateVideoApiClient.V2VideoGenerate.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.ICreateVideoApiClient.V2VideoGenerate.g.cs @@ -23,6 +23,20 @@ public partial interface ICreateVideoApiClient /// Generated Video: [https://app.heygen.com/share/67cd13935445457eaa99040070bdb545](https://app.heygen.com/share/67cd13935445457eaa99040070bdb545)
/// <img src="https://resource.heygen.ai/video/gifs/67cd13935445457eaa99040070bdb545.gif" alt=""> /// + /// + /// 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 V2VideoGenerateAsResponseAsync( + + global::HeyGen.V2VideoGenerateRequest request, + global::HeyGen.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// v2/video/generate
+ /// Generated Video: [https://app.heygen.com/share/67cd13935445457eaa99040070bdb545](https://app.heygen.com/share/67cd13935445457eaa99040070bdb545)
+ /// <img src="https://resource.heygen.ai/video/gifs/67cd13935445457eaa99040070bdb545.gif" alt=""> + ///
/// /// Example: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 /// diff --git a/src/libs/HeyGen/Generated/HeyGen.IHeyGenClient.V1VideoStatusGet.g.cs b/src/libs/HeyGen/Generated/HeyGen.IHeyGenClient.V1VideoStatusGet.g.cs index 7c508c5..71be992 100644 --- a/src/libs/HeyGen/Generated/HeyGen.IHeyGenClient.V1VideoStatusGet.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.IHeyGenClient.V1VideoStatusGet.g.cs @@ -18,5 +18,19 @@ public partial interface IHeyGenClient string? videoId = default, global::HeyGen.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// v1/video_status.get
+ /// v1/video_status.get + ///
+ /// + /// Example: <video_id> + /// + /// 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 V1VideoStatusGetAsResponseAsync( + string? videoId = default, + global::HeyGen.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/HeyGen/Generated/HeyGen.IListsClient.V1AvatarList.g.cs b/src/libs/HeyGen/Generated/HeyGen.IListsClient.V1AvatarList.g.cs index c398f95..f8fa959 100644 --- a/src/libs/HeyGen/Generated/HeyGen.IListsClient.V1AvatarList.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.IListsClient.V1AvatarList.g.cs @@ -14,5 +14,15 @@ public partial interface IListsClient global::System.Threading.Tasks.Task V1AvatarListAsync( global::HeyGen.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// v1/avatar.list
+ /// v1/avatar.list + ///
+ /// 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 V1AvatarListAsResponseAsync( + global::HeyGen.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/HeyGen/Generated/HeyGen.IListsClient.V1VideoList.g.cs b/src/libs/HeyGen/Generated/HeyGen.IListsClient.V1VideoList.g.cs index a148d1a..af50f31 100644 --- a/src/libs/HeyGen/Generated/HeyGen.IListsClient.V1VideoList.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.IListsClient.V1VideoList.g.cs @@ -14,5 +14,15 @@ public partial interface IListsClient global::System.Threading.Tasks.Task V1VideoListAsync( global::HeyGen.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// v1/video.list
+ /// v1/video.list + ///
+ /// 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 V1VideoListAsResponseAsync( + global::HeyGen.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/HeyGen/Generated/HeyGen.IListsClient.V1VoiceList.g.cs b/src/libs/HeyGen/Generated/HeyGen.IListsClient.V1VoiceList.g.cs index eb47fda..dde1183 100644 --- a/src/libs/HeyGen/Generated/HeyGen.IListsClient.V1VoiceList.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.IListsClient.V1VoiceList.g.cs @@ -14,5 +14,15 @@ public partial interface IListsClient global::System.Threading.Tasks.Task V1VoiceListAsync( global::HeyGen.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// v1/voice.list
+ /// v1/voice.list + ///
+ /// 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 V1VoiceListAsResponseAsync( + global::HeyGen.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/HeyGen/Generated/HeyGen.IListsClient.V2Avatars.g.cs b/src/libs/HeyGen/Generated/HeyGen.IListsClient.V2Avatars.g.cs index 963ccda..ba88298 100644 --- a/src/libs/HeyGen/Generated/HeyGen.IListsClient.V2Avatars.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.IListsClient.V2Avatars.g.cs @@ -14,5 +14,15 @@ public partial interface IListsClient global::System.Threading.Tasks.Task V2AvatarsAsync( global::HeyGen.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// v2/avatars
+ /// v2/avatars + ///
+ /// 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 V2AvatarsAsResponseAsync( + global::HeyGen.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/HeyGen/Generated/HeyGen.IListsClient.V2Voices.g.cs b/src/libs/HeyGen/Generated/HeyGen.IListsClient.V2Voices.g.cs index 04dfe5c..c46f4c4 100644 --- a/src/libs/HeyGen/Generated/HeyGen.IListsClient.V2Voices.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.IListsClient.V2Voices.g.cs @@ -14,5 +14,15 @@ public partial interface IListsClient global::System.Threading.Tasks.Task V2VoicesAsync( global::HeyGen.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// v2/voices
+ /// v2/voices + ///
+ /// 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 V2VoicesAsResponseAsync( + global::HeyGen.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/HeyGen/Generated/HeyGen.IPersonalizedVideoClient.PersonalizedVideoAddContact.g.cs b/src/libs/HeyGen/Generated/HeyGen.IPersonalizedVideoClient.PersonalizedVideoAddContact.g.cs index 24f6868..d55c565 100644 --- a/src/libs/HeyGen/Generated/HeyGen.IPersonalizedVideoClient.PersonalizedVideoAddContact.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.IPersonalizedVideoClient.PersonalizedVideoAddContact.g.cs @@ -21,6 +21,19 @@ public partial interface IPersonalizedVideoClient /// personalized_video/add_contact
/// personalized_video/add_contact /// + /// + /// 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 PersonalizedVideoAddContactAsResponseAsync( + + global::HeyGen.PersonalizedVideoAddContactRequest request, + global::HeyGen.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// personalized_video/add_contact
+ /// personalized_video/add_contact + ///
/// /// Example: <project_id> /// diff --git a/src/libs/HeyGen/Generated/HeyGen.IPersonalizedVideoClient.PersonalizedVideoAudienceDetail.g.cs b/src/libs/HeyGen/Generated/HeyGen.IPersonalizedVideoClient.PersonalizedVideoAudienceDetail.g.cs index b82295a..d9bbdad 100644 --- a/src/libs/HeyGen/Generated/HeyGen.IPersonalizedVideoClient.PersonalizedVideoAudienceDetail.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.IPersonalizedVideoClient.PersonalizedVideoAudienceDetail.g.cs @@ -18,5 +18,19 @@ public partial interface IPersonalizedVideoClient string? id = default, global::HeyGen.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// personalized_video/audience/detail
+ /// personalized_video/audience/detail + ///
+ /// + /// Example: <video-id> + /// + /// 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 PersonalizedVideoAudienceDetailAsResponseAsync( + string? id = default, + global::HeyGen.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/HeyGen/Generated/HeyGen.IPersonalizedVideoClient.PersonalizedVideoProjectDetail.g.cs b/src/libs/HeyGen/Generated/HeyGen.IPersonalizedVideoClient.PersonalizedVideoProjectDetail.g.cs index 2db51e5..67210f0 100644 --- a/src/libs/HeyGen/Generated/HeyGen.IPersonalizedVideoClient.PersonalizedVideoProjectDetail.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.IPersonalizedVideoClient.PersonalizedVideoProjectDetail.g.cs @@ -18,5 +18,19 @@ public partial interface IPersonalizedVideoClient string? id = default, global::HeyGen.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// personalized_video/project/detail
+ /// personalized_video/project/detail + ///
+ /// + /// Example: <project-id> + /// + /// 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 PersonalizedVideoProjectDetailAsResponseAsync( + string? id = default, + global::HeyGen.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/HeyGen/Generated/HeyGen.IStreamingApiClient.StreamingAvatarList.g.cs b/src/libs/HeyGen/Generated/HeyGen.IStreamingApiClient.StreamingAvatarList.g.cs index 8695cb0..76c4840 100644 --- a/src/libs/HeyGen/Generated/HeyGen.IStreamingApiClient.StreamingAvatarList.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.IStreamingApiClient.StreamingAvatarList.g.cs @@ -14,5 +14,15 @@ public partial interface IStreamingApiClient global::System.Threading.Tasks.Task StreamingAvatarListAsync( global::HeyGen.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// streaming/avatar.list
+ /// streaming/avatar.list + ///
+ /// 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 StreamingAvatarListAsResponseAsync( + global::HeyGen.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/HeyGen/Generated/HeyGen.IStreamingApiClient.StreamingCreateToken.g.cs b/src/libs/HeyGen/Generated/HeyGen.IStreamingApiClient.StreamingCreateToken.g.cs index 03585d7..5f41afc 100644 --- a/src/libs/HeyGen/Generated/HeyGen.IStreamingApiClient.StreamingCreateToken.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.IStreamingApiClient.StreamingCreateToken.g.cs @@ -21,6 +21,19 @@ public partial interface IStreamingApiClient /// streaming.create_token
/// streaming.create_token /// + /// + /// 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 StreamingCreateTokenAsResponseAsync( + + object request, + global::HeyGen.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// streaming.create_token
+ /// streaming.create_token + ///
/// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// diff --git a/src/libs/HeyGen/Generated/HeyGen.IStreamingApiClient.StreamingIce.g.cs b/src/libs/HeyGen/Generated/HeyGen.IStreamingApiClient.StreamingIce.g.cs index 20e92d2..ed03214 100644 --- a/src/libs/HeyGen/Generated/HeyGen.IStreamingApiClient.StreamingIce.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.IStreamingApiClient.StreamingIce.g.cs @@ -21,6 +21,19 @@ public partial interface IStreamingApiClient /// streaming.ice
/// streaming.ice /// + /// + /// 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 StreamingIceAsResponseAsync( + + global::HeyGen.StreamingIceRequest request, + global::HeyGen.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// streaming.ice
+ /// streaming.ice + ///
/// /// /// Example: <SESSION_ID> diff --git a/src/libs/HeyGen/Generated/HeyGen.IStreamingApiClient.StreamingInterrupt.g.cs b/src/libs/HeyGen/Generated/HeyGen.IStreamingApiClient.StreamingInterrupt.g.cs index d7c6120..f8732f3 100644 --- a/src/libs/HeyGen/Generated/HeyGen.IStreamingApiClient.StreamingInterrupt.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.IStreamingApiClient.StreamingInterrupt.g.cs @@ -21,6 +21,19 @@ public partial interface IStreamingApiClient /// streaming.interrupt
/// This is endpoint is to interrupt a speaking avatar. If the avatar is not speaking, it doesn't do anything. /// + /// + /// 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 StreamingInterruptAsResponseAsync( + + global::HeyGen.StreamingInterruptRequest request, + global::HeyGen.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// streaming.interrupt
+ /// This is endpoint is to interrupt a speaking avatar. If the avatar is not speaking, it doesn't do anything. + ///
/// /// Example: <session_id> /// diff --git a/src/libs/HeyGen/Generated/HeyGen.IStreamingApiClient.StreamingList.g.cs b/src/libs/HeyGen/Generated/HeyGen.IStreamingApiClient.StreamingList.g.cs index e1265b5..18234bd 100644 --- a/src/libs/HeyGen/Generated/HeyGen.IStreamingApiClient.StreamingList.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.IStreamingApiClient.StreamingList.g.cs @@ -14,5 +14,15 @@ public partial interface IStreamingApiClient global::System.Threading.Tasks.Task StreamingListAsync( global::HeyGen.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// streaming.list
+ /// streaming.list + ///
+ /// 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 StreamingListAsResponseAsync( + global::HeyGen.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/HeyGen/Generated/HeyGen.IStreamingApiClient.StreamingNew.g.cs b/src/libs/HeyGen/Generated/HeyGen.IStreamingApiClient.StreamingNew.g.cs index 8561248..e03bd65 100644 --- a/src/libs/HeyGen/Generated/HeyGen.IStreamingApiClient.StreamingNew.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.IStreamingApiClient.StreamingNew.g.cs @@ -21,6 +21,19 @@ public partial interface IStreamingApiClient /// streaming.new
/// streaming.new /// + /// + /// 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 StreamingNewAsResponseAsync( + + global::HeyGen.StreamingNewRequest request, + global::HeyGen.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// streaming.new
+ /// streaming.new + ///
/// /// Example: medium /// diff --git a/src/libs/HeyGen/Generated/HeyGen.IStreamingApiClient.StreamingStart.g.cs b/src/libs/HeyGen/Generated/HeyGen.IStreamingApiClient.StreamingStart.g.cs index 7d8cbcf..32d2eef 100644 --- a/src/libs/HeyGen/Generated/HeyGen.IStreamingApiClient.StreamingStart.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.IStreamingApiClient.StreamingStart.g.cs @@ -21,6 +21,19 @@ public partial interface IStreamingApiClient /// streaming.start
/// streaming.start /// + /// + /// 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 StreamingStartAsResponseAsync( + + global::HeyGen.StreamingStartRequest request, + global::HeyGen.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// streaming.start
+ /// streaming.start + ///
/// /// /// Example: f8c1f5bd-edbd-11ee-ac61-06daf6be75b4 diff --git a/src/libs/HeyGen/Generated/HeyGen.IStreamingApiClient.StreamingStop.g.cs b/src/libs/HeyGen/Generated/HeyGen.IStreamingApiClient.StreamingStop.g.cs index d9aa6e1..61e6372 100644 --- a/src/libs/HeyGen/Generated/HeyGen.IStreamingApiClient.StreamingStop.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.IStreamingApiClient.StreamingStop.g.cs @@ -21,6 +21,19 @@ public partial interface IStreamingApiClient /// streaming.stop
/// streaming.stop /// + /// + /// 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 StreamingStopAsResponseAsync( + + global::HeyGen.StreamingStopRequest request, + global::HeyGen.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// streaming.stop
+ /// streaming.stop + ///
/// /// Example: <session_id> /// diff --git a/src/libs/HeyGen/Generated/HeyGen.IStreamingApiClient.StreamingTask.g.cs b/src/libs/HeyGen/Generated/HeyGen.IStreamingApiClient.StreamingTask.g.cs index 74fd5c9..9f57c60 100644 --- a/src/libs/HeyGen/Generated/HeyGen.IStreamingApiClient.StreamingTask.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.IStreamingApiClient.StreamingTask.g.cs @@ -21,6 +21,19 @@ public partial interface IStreamingApiClient /// streaming.task
/// streaming.task /// + /// + /// 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 StreamingTaskAsResponseAsync( + + global::HeyGen.StreamingTaskRequest request, + global::HeyGen.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// streaming.task
+ /// streaming.task + ///
/// /// Example: <session_id> /// diff --git a/src/libs/HeyGen/Generated/HeyGen.ITalkingPhotoClient.V1TalkingPhotoList.g.cs b/src/libs/HeyGen/Generated/HeyGen.ITalkingPhotoClient.V1TalkingPhotoList.g.cs index b87e7ef..ebfff38 100644 --- a/src/libs/HeyGen/Generated/HeyGen.ITalkingPhotoClient.V1TalkingPhotoList.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.ITalkingPhotoClient.V1TalkingPhotoList.g.cs @@ -14,5 +14,15 @@ public partial interface ITalkingPhotoClient global::System.Threading.Tasks.Task V1TalkingPhotoListAsync( global::HeyGen.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// v1/talking_photo.list
+ /// v1/talking_photo.list + ///
+ /// 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 V1TalkingPhotoListAsResponseAsync( + global::HeyGen.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/HeyGen/Generated/HeyGen.ITalkingPhotoClient.V1TalkingPhotoUpload.g.cs b/src/libs/HeyGen/Generated/HeyGen.ITalkingPhotoClient.V1TalkingPhotoUpload.g.cs index 947c8e6..8354231 100644 --- a/src/libs/HeyGen/Generated/HeyGen.ITalkingPhotoClient.V1TalkingPhotoUpload.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.ITalkingPhotoClient.V1TalkingPhotoUpload.g.cs @@ -14,5 +14,15 @@ public partial interface ITalkingPhotoClient global::System.Threading.Tasks.Task V1TalkingPhotoUploadAsync( global::HeyGen.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// v1/talking_photo (upload)
+ /// v1/talking_photo (upload) + ///
+ /// 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 V1TalkingPhotoUploadAsResponseAsync( + global::HeyGen.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/HeyGen/Generated/HeyGen.ITalkingPhotoClient.V2TalkingPhotoIdDelete.g.cs b/src/libs/HeyGen/Generated/HeyGen.ITalkingPhotoClient.V2TalkingPhotoIdDelete.g.cs index f9243ca..d6501a9 100644 --- a/src/libs/HeyGen/Generated/HeyGen.ITalkingPhotoClient.V2TalkingPhotoIdDelete.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.ITalkingPhotoClient.V2TalkingPhotoIdDelete.g.cs @@ -14,5 +14,15 @@ public partial interface ITalkingPhotoClient global::System.Threading.Tasks.Task V2TalkingPhotoIdDeleteAsync( global::HeyGen.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// v2/talking_photo/<id> (delete)
+ /// v2/talking_photo/<id> (delete) + ///
+ /// 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 V2TalkingPhotoIdDeleteAsResponseAsync( + global::HeyGen.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/HeyGen/Generated/HeyGen.ITemplateApiClient.V2TemplateGenerate.g.cs b/src/libs/HeyGen/Generated/HeyGen.ITemplateApiClient.V2TemplateGenerate.g.cs index 0e0ca0c..974cb8b 100644 --- a/src/libs/HeyGen/Generated/HeyGen.ITemplateApiClient.V2TemplateGenerate.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.ITemplateApiClient.V2TemplateGenerate.g.cs @@ -23,6 +23,20 @@ public partial interface ITemplateApiClient /// Generated Video: [https://app.heygen.com/videos/7cba9d29d6db46b88471221fdbc4fb75](https://app.heygen.com/videos/7cba9d29d6db46b88471221fdbc4fb75)
/// <img src="https://resource.heygen.ai/video/gifs/7cba9d29d6db46b88471221fdbc4fb75.gif" alt=""> /// + /// + /// 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 V2TemplateGenerateAsResponseAsync( + + global::HeyGen.V2TemplateGenerateRequest request, + global::HeyGen.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// v2/template/generate
+ /// Generated Video: [https://app.heygen.com/videos/7cba9d29d6db46b88471221fdbc4fb75](https://app.heygen.com/videos/7cba9d29d6db46b88471221fdbc4fb75)
+ /// <img src="https://resource.heygen.ai/video/gifs/7cba9d29d6db46b88471221fdbc4fb75.gif" alt=""> + ///
/// /// Example: false /// diff --git a/src/libs/HeyGen/Generated/HeyGen.ITemplateApiClient.V2TemplateId.g.cs b/src/libs/HeyGen/Generated/HeyGen.ITemplateApiClient.V2TemplateId.g.cs index 3b5967b..00595c1 100644 --- a/src/libs/HeyGen/Generated/HeyGen.ITemplateApiClient.V2TemplateId.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.ITemplateApiClient.V2TemplateId.g.cs @@ -14,5 +14,15 @@ public partial interface ITemplateApiClient global::System.Threading.Tasks.Task V2TemplateIdAsync( global::HeyGen.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// v2/template/<id>
+ /// v2/template/<id> + ///
+ /// 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 V2TemplateIdAsResponseAsync( + global::HeyGen.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/HeyGen/Generated/HeyGen.ITemplateApiClient.V2Templates.g.cs b/src/libs/HeyGen/Generated/HeyGen.ITemplateApiClient.V2Templates.g.cs index 3b7d820..35d9fe1 100644 --- a/src/libs/HeyGen/Generated/HeyGen.ITemplateApiClient.V2Templates.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.ITemplateApiClient.V2Templates.g.cs @@ -14,5 +14,15 @@ public partial interface ITemplateApiClient global::System.Threading.Tasks.Task V2TemplatesAsync( global::HeyGen.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// v2/templates
+ /// v2/templates + ///
+ /// 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 V2TemplatesAsResponseAsync( + global::HeyGen.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/HeyGen/Generated/HeyGen.IUserClient.V2UserRemainingQuota.g.cs b/src/libs/HeyGen/Generated/HeyGen.IUserClient.V2UserRemainingQuota.g.cs index 35af631..3f98798 100644 --- a/src/libs/HeyGen/Generated/HeyGen.IUserClient.V2UserRemainingQuota.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.IUserClient.V2UserRemainingQuota.g.cs @@ -14,5 +14,15 @@ public partial interface IUserClient global::System.Threading.Tasks.Task V2UserRemainingQuotaAsync( global::HeyGen.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// v2/user/remaining_quota
+ /// v2/user/remaining_quota + ///
+ /// 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 V2UserRemainingQuotaAsResponseAsync( + global::HeyGen.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/HeyGen/Generated/HeyGen.IVideoTranslateApiClient.V2VideoTranslate.g.cs b/src/libs/HeyGen/Generated/HeyGen.IVideoTranslateApiClient.V2VideoTranslate.g.cs index af38f97..94e4754 100644 --- a/src/libs/HeyGen/Generated/HeyGen.IVideoTranslateApiClient.V2VideoTranslate.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.IVideoTranslateApiClient.V2VideoTranslate.g.cs @@ -21,6 +21,19 @@ public partial interface IVideoTranslateApiClient /// v2/video_translate
/// Generated Video: [https://app.heygen.com/video-translation/share/dab5a987e6154b0cb7e606c858043fa9](https://app.heygen.com/video-translation/share/dab5a987e6154b0cb7e606c858043fa9) /// + /// + /// 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 V2VideoTranslateAsResponseAsync( + + global::HeyGen.V2VideoTranslateRequest request, + global::HeyGen.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// v2/video_translate
+ /// Generated Video: [https://app.heygen.com/video-translation/share/dab5a987e6154b0cb7e606c858043fa9](https://app.heygen.com/video-translation/share/dab5a987e6154b0cb7e606c858043fa9) + ///
/// /// Example: English - American Accent /// diff --git a/src/libs/HeyGen/Generated/HeyGen.IVideoTranslateApiClient.V2VideoTranslateIdStatus.g.cs b/src/libs/HeyGen/Generated/HeyGen.IVideoTranslateApiClient.V2VideoTranslateIdStatus.g.cs index 0d91617..86d1bfe 100644 --- a/src/libs/HeyGen/Generated/HeyGen.IVideoTranslateApiClient.V2VideoTranslateIdStatus.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.IVideoTranslateApiClient.V2VideoTranslateIdStatus.g.cs @@ -14,5 +14,15 @@ public partial interface IVideoTranslateApiClient global::System.Threading.Tasks.Task V2VideoTranslateIdStatusAsync( global::HeyGen.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// v2/video_translate/<id> (status)
+ /// v2/video_translate/<id> (status) + ///
+ /// 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 V2VideoTranslateIdStatusAsResponseAsync( + global::HeyGen.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/HeyGen/Generated/HeyGen.IVideoTranslateApiClient.V2VideoTranslateTargetLanguages.g.cs b/src/libs/HeyGen/Generated/HeyGen.IVideoTranslateApiClient.V2VideoTranslateTargetLanguages.g.cs index 2d1642e..d175a51 100644 --- a/src/libs/HeyGen/Generated/HeyGen.IVideoTranslateApiClient.V2VideoTranslateTargetLanguages.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.IVideoTranslateApiClient.V2VideoTranslateTargetLanguages.g.cs @@ -14,5 +14,15 @@ public partial interface IVideoTranslateApiClient global::System.Threading.Tasks.Task V2VideoTranslateTargetLanguagesAsync( global::HeyGen.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// v2/video_translate/target_languages
+ /// v2/video_translate/target_languages + ///
+ /// 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 V2VideoTranslateTargetLanguagesAsResponseAsync( + global::HeyGen.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/HeyGen/Generated/HeyGen.IWebhooksClient.V1WebhookEndpointAdd.g.cs b/src/libs/HeyGen/Generated/HeyGen.IWebhooksClient.V1WebhookEndpointAdd.g.cs index 52843e6..c3160fc 100644 --- a/src/libs/HeyGen/Generated/HeyGen.IWebhooksClient.V1WebhookEndpointAdd.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.IWebhooksClient.V1WebhookEndpointAdd.g.cs @@ -21,6 +21,19 @@ public partial interface IWebhooksClient /// v1/webhook/endpoint.add
/// v1/webhook/endpoint.add /// + /// + /// 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 V1WebhookEndpointAddAsResponseAsync( + + global::HeyGen.V1WebhookEndpointAddRequest request, + global::HeyGen.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// v1/webhook/endpoint.add
+ /// v1/webhook/endpoint.add + ///
/// /// Example: [] /// diff --git a/src/libs/HeyGen/Generated/HeyGen.IWebhooksClient.V1WebhookEndpointDelete.g.cs b/src/libs/HeyGen/Generated/HeyGen.IWebhooksClient.V1WebhookEndpointDelete.g.cs index d240234..732bab0 100644 --- a/src/libs/HeyGen/Generated/HeyGen.IWebhooksClient.V1WebhookEndpointDelete.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.IWebhooksClient.V1WebhookEndpointDelete.g.cs @@ -18,5 +18,19 @@ public partial interface IWebhooksClient string? endpointId = default, global::HeyGen.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// v1/webhook/endpoint.delete
+ /// v1/webhook/endpoint.delete + ///
+ /// + /// Example: <endpoint_id> + /// + /// 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 V1WebhookEndpointDeleteAsResponseAsync( + string? endpointId = default, + global::HeyGen.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/HeyGen/Generated/HeyGen.IWebhooksClient.V1WebhookEndpointList.g.cs b/src/libs/HeyGen/Generated/HeyGen.IWebhooksClient.V1WebhookEndpointList.g.cs index a507bab..a410282 100644 --- a/src/libs/HeyGen/Generated/HeyGen.IWebhooksClient.V1WebhookEndpointList.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.IWebhooksClient.V1WebhookEndpointList.g.cs @@ -14,5 +14,15 @@ public partial interface IWebhooksClient global::System.Threading.Tasks.Task V1WebhookEndpointListAsync( global::HeyGen.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// v1/webhook/endpoint.list
+ /// v1/webhook/endpoint.list + ///
+ /// 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 V1WebhookEndpointListAsResponseAsync( + global::HeyGen.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/HeyGen/Generated/HeyGen.IWebhooksClient.V1WebhookWebhookList.g.cs b/src/libs/HeyGen/Generated/HeyGen.IWebhooksClient.V1WebhookWebhookList.g.cs index c4f5edc..4337c7e 100644 --- a/src/libs/HeyGen/Generated/HeyGen.IWebhooksClient.V1WebhookWebhookList.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.IWebhooksClient.V1WebhookWebhookList.g.cs @@ -14,5 +14,15 @@ public partial interface IWebhooksClient global::System.Threading.Tasks.Task V1WebhookWebhookListAsync( global::HeyGen.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// v1/webhook/webhook.list
+ /// v1/webhook/webhook.list + ///
+ /// 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 V1WebhookWebhookListAsResponseAsync( + global::HeyGen.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/HeyGen/Generated/HeyGen.ListsClient.V1AvatarList.g.cs b/src/libs/HeyGen/Generated/HeyGen.ListsClient.V1AvatarList.g.cs index c9636be..217fd05 100644 --- a/src/libs/HeyGen/Generated/HeyGen.ListsClient.V1AvatarList.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.ListsClient.V1AvatarList.g.cs @@ -57,6 +57,22 @@ partial void ProcessV1AvatarListResponse( public async global::System.Threading.Tasks.Task V1AvatarListAsync( global::HeyGen.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await V1AvatarListAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// v1/avatar.list
+ /// v1/avatar.list + ///
+ /// 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 V1AvatarListAsResponseAsync( + global::HeyGen.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -85,6 +101,7 @@ partial void ProcessV1AvatarListResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::HeyGen.PathBuilder( path: "/v1/avatar.list", baseUri: ResolveBaseUri( @@ -159,6 +176,8 @@ partial void ProcessV1AvatarListResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -169,6 +188,11 @@ partial void ProcessV1AvatarListResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::HeyGen.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::HeyGen.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -186,6 +210,8 @@ partial void ProcessV1AvatarListResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -195,8 +221,7 @@ partial void ProcessV1AvatarListResponse( __httpRequest.Dispose(); __httpRequest = null; await global::HeyGen.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -205,6 +230,11 @@ partial void ProcessV1AvatarListResponse( __attempt < __maxAttempts && global::HeyGen.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::HeyGen.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::HeyGen.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::HeyGen.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -221,14 +251,15 @@ partial void ProcessV1AvatarListResponse( 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::HeyGen.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -268,6 +299,8 @@ partial void ProcessV1AvatarListResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -288,6 +321,8 @@ partial void ProcessV1AvatarListResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -308,6 +343,10 @@ partial void ProcessV1AvatarListResponse( { __response.EnsureSuccessStatusCode(); + return new global::HeyGen.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::HeyGen.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -329,6 +368,10 @@ partial void ProcessV1AvatarListResponse( try { __response.EnsureSuccessStatusCode(); + return new global::HeyGen.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::HeyGen.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/HeyGen/Generated/HeyGen.ListsClient.V1VideoList.g.cs b/src/libs/HeyGen/Generated/HeyGen.ListsClient.V1VideoList.g.cs index 264c9c3..4869c5f 100644 --- a/src/libs/HeyGen/Generated/HeyGen.ListsClient.V1VideoList.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.ListsClient.V1VideoList.g.cs @@ -57,6 +57,22 @@ partial void ProcessV1VideoListResponse( public async global::System.Threading.Tasks.Task V1VideoListAsync( global::HeyGen.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await V1VideoListAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// v1/video.list
+ /// v1/video.list + ///
+ /// 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 V1VideoListAsResponseAsync( + global::HeyGen.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -85,6 +101,7 @@ partial void ProcessV1VideoListResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::HeyGen.PathBuilder( path: "/v1/video.list", baseUri: ResolveBaseUri( @@ -159,6 +176,8 @@ partial void ProcessV1VideoListResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -169,6 +188,11 @@ partial void ProcessV1VideoListResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::HeyGen.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::HeyGen.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -186,6 +210,8 @@ partial void ProcessV1VideoListResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -195,8 +221,7 @@ partial void ProcessV1VideoListResponse( __httpRequest.Dispose(); __httpRequest = null; await global::HeyGen.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -205,6 +230,11 @@ partial void ProcessV1VideoListResponse( __attempt < __maxAttempts && global::HeyGen.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::HeyGen.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::HeyGen.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::HeyGen.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -221,14 +251,15 @@ partial void ProcessV1VideoListResponse( 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::HeyGen.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -268,6 +299,8 @@ partial void ProcessV1VideoListResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -288,6 +321,8 @@ partial void ProcessV1VideoListResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -308,6 +343,10 @@ partial void ProcessV1VideoListResponse( { __response.EnsureSuccessStatusCode(); + return new global::HeyGen.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::HeyGen.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -329,6 +368,10 @@ partial void ProcessV1VideoListResponse( try { __response.EnsureSuccessStatusCode(); + return new global::HeyGen.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::HeyGen.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/HeyGen/Generated/HeyGen.ListsClient.V1VoiceList.g.cs b/src/libs/HeyGen/Generated/HeyGen.ListsClient.V1VoiceList.g.cs index 81332f5..b0f6fc8 100644 --- a/src/libs/HeyGen/Generated/HeyGen.ListsClient.V1VoiceList.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.ListsClient.V1VoiceList.g.cs @@ -57,6 +57,22 @@ partial void ProcessV1VoiceListResponse( public async global::System.Threading.Tasks.Task V1VoiceListAsync( global::HeyGen.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await V1VoiceListAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// v1/voice.list
+ /// v1/voice.list + ///
+ /// 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 V1VoiceListAsResponseAsync( + global::HeyGen.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -85,6 +101,7 @@ partial void ProcessV1VoiceListResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::HeyGen.PathBuilder( path: "/v1/voice.list", baseUri: ResolveBaseUri( @@ -159,6 +176,8 @@ partial void ProcessV1VoiceListResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -169,6 +188,11 @@ partial void ProcessV1VoiceListResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::HeyGen.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::HeyGen.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -186,6 +210,8 @@ partial void ProcessV1VoiceListResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -195,8 +221,7 @@ partial void ProcessV1VoiceListResponse( __httpRequest.Dispose(); __httpRequest = null; await global::HeyGen.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -205,6 +230,11 @@ partial void ProcessV1VoiceListResponse( __attempt < __maxAttempts && global::HeyGen.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::HeyGen.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::HeyGen.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::HeyGen.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -221,14 +251,15 @@ partial void ProcessV1VoiceListResponse( 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::HeyGen.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -268,6 +299,8 @@ partial void ProcessV1VoiceListResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -288,6 +321,8 @@ partial void ProcessV1VoiceListResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -308,6 +343,10 @@ partial void ProcessV1VoiceListResponse( { __response.EnsureSuccessStatusCode(); + return new global::HeyGen.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::HeyGen.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -329,6 +368,10 @@ partial void ProcessV1VoiceListResponse( try { __response.EnsureSuccessStatusCode(); + return new global::HeyGen.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::HeyGen.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/HeyGen/Generated/HeyGen.ListsClient.V2Avatars.g.cs b/src/libs/HeyGen/Generated/HeyGen.ListsClient.V2Avatars.g.cs index 9068e77..7a155e2 100644 --- a/src/libs/HeyGen/Generated/HeyGen.ListsClient.V2Avatars.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.ListsClient.V2Avatars.g.cs @@ -57,6 +57,22 @@ partial void ProcessV2AvatarsResponse( public async global::System.Threading.Tasks.Task V2AvatarsAsync( global::HeyGen.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await V2AvatarsAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// v2/avatars
+ /// v2/avatars + ///
+ /// 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 V2AvatarsAsResponseAsync( + global::HeyGen.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -85,6 +101,7 @@ partial void ProcessV2AvatarsResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::HeyGen.PathBuilder( path: "/v2/avatars", baseUri: ResolveBaseUri( @@ -159,6 +176,8 @@ partial void ProcessV2AvatarsResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -169,6 +188,11 @@ partial void ProcessV2AvatarsResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::HeyGen.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::HeyGen.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -186,6 +210,8 @@ partial void ProcessV2AvatarsResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -195,8 +221,7 @@ partial void ProcessV2AvatarsResponse( __httpRequest.Dispose(); __httpRequest = null; await global::HeyGen.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -205,6 +230,11 @@ partial void ProcessV2AvatarsResponse( __attempt < __maxAttempts && global::HeyGen.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::HeyGen.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::HeyGen.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::HeyGen.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -221,14 +251,15 @@ partial void ProcessV2AvatarsResponse( 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::HeyGen.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -268,6 +299,8 @@ partial void ProcessV2AvatarsResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -288,6 +321,8 @@ partial void ProcessV2AvatarsResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -308,6 +343,10 @@ partial void ProcessV2AvatarsResponse( { __response.EnsureSuccessStatusCode(); + return new global::HeyGen.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::HeyGen.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -329,6 +368,10 @@ partial void ProcessV2AvatarsResponse( try { __response.EnsureSuccessStatusCode(); + return new global::HeyGen.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::HeyGen.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/HeyGen/Generated/HeyGen.ListsClient.V2Voices.g.cs b/src/libs/HeyGen/Generated/HeyGen.ListsClient.V2Voices.g.cs index 789a03a..0460233 100644 --- a/src/libs/HeyGen/Generated/HeyGen.ListsClient.V2Voices.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.ListsClient.V2Voices.g.cs @@ -57,6 +57,22 @@ partial void ProcessV2VoicesResponse( public async global::System.Threading.Tasks.Task V2VoicesAsync( global::HeyGen.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await V2VoicesAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// v2/voices
+ /// v2/voices + ///
+ /// 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 V2VoicesAsResponseAsync( + global::HeyGen.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -85,6 +101,7 @@ partial void ProcessV2VoicesResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::HeyGen.PathBuilder( path: "/v2/voices", baseUri: ResolveBaseUri( @@ -159,6 +176,8 @@ partial void ProcessV2VoicesResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -169,6 +188,11 @@ partial void ProcessV2VoicesResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::HeyGen.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::HeyGen.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -186,6 +210,8 @@ partial void ProcessV2VoicesResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -195,8 +221,7 @@ partial void ProcessV2VoicesResponse( __httpRequest.Dispose(); __httpRequest = null; await global::HeyGen.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -205,6 +230,11 @@ partial void ProcessV2VoicesResponse( __attempt < __maxAttempts && global::HeyGen.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::HeyGen.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::HeyGen.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::HeyGen.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -221,14 +251,15 @@ partial void ProcessV2VoicesResponse( 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::HeyGen.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -268,6 +299,8 @@ partial void ProcessV2VoicesResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -288,6 +321,8 @@ partial void ProcessV2VoicesResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -308,6 +343,10 @@ partial void ProcessV2VoicesResponse( { __response.EnsureSuccessStatusCode(); + return new global::HeyGen.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::HeyGen.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -329,6 +368,10 @@ partial void ProcessV2VoicesResponse( try { __response.EnsureSuccessStatusCode(); + return new global::HeyGen.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::HeyGen.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/HeyGen/Generated/HeyGen.ListsClient.g.cs b/src/libs/HeyGen/Generated/HeyGen.ListsClient.g.cs index c907681..7d1245d 100644 --- a/src/libs/HeyGen/Generated/HeyGen.ListsClient.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.ListsClient.g.cs @@ -103,10 +103,10 @@ public ListsClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public ListsClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::HeyGen.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::HeyGen.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/HeyGen/Generated/HeyGen.OptionsSupport.g.cs b/src/libs/HeyGen/Generated/HeyGen.OptionsSupport.g.cs index aca3ef6..5bdb7ee 100644 --- a/src/libs/HeyGen/Generated/HeyGen.OptionsSupport.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.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::HeyGen.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::HeyGen.AutoSDKClientOptions clientOptions, global::HeyGen.AutoSDKRequestOptions? requestOptions, + global::System.Net.Http.HttpResponseMessage? response, + int attempt) + { + var retryOptions = requestOptions?.Retry ?? clientOptions.Retry ?? new global::HeyGen.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::HeyGen.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/HeyGen/Generated/HeyGen.PersonalizedVideoClient.PersonalizedVideoAddContact.g.cs b/src/libs/HeyGen/Generated/HeyGen.PersonalizedVideoClient.PersonalizedVideoAddContact.g.cs index 177497f..31c5e42 100644 --- a/src/libs/HeyGen/Generated/HeyGen.PersonalizedVideoClient.PersonalizedVideoAddContact.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.PersonalizedVideoClient.PersonalizedVideoAddContact.g.cs @@ -59,6 +59,27 @@ partial void ProcessPersonalizedVideoAddContactResponse( /// public async global::System.Threading.Tasks.Task PersonalizedVideoAddContactAsync( + global::HeyGen.PersonalizedVideoAddContactRequest request, + global::HeyGen.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + await PersonalizedVideoAddContactAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// personalized_video/add_contact
+ /// personalized_video/add_contact + ///
+ /// + /// 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 PersonalizedVideoAddContactAsResponseAsync( + global::HeyGen.PersonalizedVideoAddContactRequest request, global::HeyGen.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -93,6 +114,7 @@ partial void ProcessPersonalizedVideoAddContactResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::HeyGen.PathBuilder( path: "/v1/personalized_video/add_contact", baseUri: ResolveBaseUri( @@ -174,6 +196,8 @@ partial void ProcessPersonalizedVideoAddContactResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -184,6 +208,11 @@ partial void ProcessPersonalizedVideoAddContactResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::HeyGen.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::HeyGen.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -201,6 +230,8 @@ partial void ProcessPersonalizedVideoAddContactResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -210,8 +241,7 @@ partial void ProcessPersonalizedVideoAddContactResponse( __httpRequest.Dispose(); __httpRequest = null; await global::HeyGen.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -220,6 +250,11 @@ partial void ProcessPersonalizedVideoAddContactResponse( __attempt < __maxAttempts && global::HeyGen.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::HeyGen.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::HeyGen.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::HeyGen.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -236,14 +271,15 @@ partial void ProcessPersonalizedVideoAddContactResponse( 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::HeyGen.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -283,6 +319,8 @@ partial void ProcessPersonalizedVideoAddContactResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -303,6 +341,8 @@ partial void ProcessPersonalizedVideoAddContactResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -323,6 +363,10 @@ partial void ProcessPersonalizedVideoAddContactResponse( { __response.EnsureSuccessStatusCode(); + return new global::HeyGen.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::HeyGen.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -344,6 +388,10 @@ partial void ProcessPersonalizedVideoAddContactResponse( try { __response.EnsureSuccessStatusCode(); + return new global::HeyGen.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::HeyGen.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/HeyGen/Generated/HeyGen.PersonalizedVideoClient.PersonalizedVideoAudienceDetail.g.cs b/src/libs/HeyGen/Generated/HeyGen.PersonalizedVideoClient.PersonalizedVideoAudienceDetail.g.cs index 208bcff..da59bbd 100644 --- a/src/libs/HeyGen/Generated/HeyGen.PersonalizedVideoClient.PersonalizedVideoAudienceDetail.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.PersonalizedVideoClient.PersonalizedVideoAudienceDetail.g.cs @@ -63,6 +63,27 @@ partial void ProcessPersonalizedVideoAudienceDetailResponse( string? id = default, global::HeyGen.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await PersonalizedVideoAudienceDetailAsResponseAsync( + id: id, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// personalized_video/audience/detail
+ /// personalized_video/audience/detail + ///
+ /// + /// Example: <video-id> + /// + /// 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 PersonalizedVideoAudienceDetailAsResponseAsync( + string? id = default, + global::HeyGen.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -92,13 +113,14 @@ partial void ProcessPersonalizedVideoAudienceDetailResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::HeyGen.PathBuilder( path: "/v1/personalized_video/audience/detail", baseUri: ResolveBaseUri( servers: s_PersonalizedVideoAudienceDetailServers, - defaultBaseUrl: "https://api.heygen.com/")); + defaultBaseUrl: "https://api.heygen.com/")); __pathBuilder - .AddOptionalParameter("id", id) + .AddOptionalParameter("id", id) ; var __path = __pathBuilder.ToString(); __path = global::HeyGen.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -170,6 +192,8 @@ partial void ProcessPersonalizedVideoAudienceDetailResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -180,6 +204,11 @@ partial void ProcessPersonalizedVideoAudienceDetailResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::HeyGen.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::HeyGen.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -197,6 +226,8 @@ partial void ProcessPersonalizedVideoAudienceDetailResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -206,8 +237,7 @@ partial void ProcessPersonalizedVideoAudienceDetailResponse( __httpRequest.Dispose(); __httpRequest = null; await global::HeyGen.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -216,6 +246,11 @@ partial void ProcessPersonalizedVideoAudienceDetailResponse( __attempt < __maxAttempts && global::HeyGen.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::HeyGen.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::HeyGen.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::HeyGen.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -232,14 +267,15 @@ partial void ProcessPersonalizedVideoAudienceDetailResponse( 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::HeyGen.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -279,6 +315,8 @@ partial void ProcessPersonalizedVideoAudienceDetailResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -299,6 +337,8 @@ partial void ProcessPersonalizedVideoAudienceDetailResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -319,6 +359,10 @@ partial void ProcessPersonalizedVideoAudienceDetailResponse( { __response.EnsureSuccessStatusCode(); + return new global::HeyGen.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::HeyGen.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -340,6 +384,10 @@ partial void ProcessPersonalizedVideoAudienceDetailResponse( try { __response.EnsureSuccessStatusCode(); + return new global::HeyGen.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::HeyGen.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/HeyGen/Generated/HeyGen.PersonalizedVideoClient.PersonalizedVideoProjectDetail.g.cs b/src/libs/HeyGen/Generated/HeyGen.PersonalizedVideoClient.PersonalizedVideoProjectDetail.g.cs index 3fe24d2..14dd624 100644 --- a/src/libs/HeyGen/Generated/HeyGen.PersonalizedVideoClient.PersonalizedVideoProjectDetail.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.PersonalizedVideoClient.PersonalizedVideoProjectDetail.g.cs @@ -63,6 +63,27 @@ partial void ProcessPersonalizedVideoProjectDetailResponse( string? id = default, global::HeyGen.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await PersonalizedVideoProjectDetailAsResponseAsync( + id: id, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// personalized_video/project/detail
+ /// personalized_video/project/detail + ///
+ /// + /// Example: <project-id> + /// + /// 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 PersonalizedVideoProjectDetailAsResponseAsync( + string? id = default, + global::HeyGen.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -92,13 +113,14 @@ partial void ProcessPersonalizedVideoProjectDetailResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::HeyGen.PathBuilder( path: "/v1/personalized_video/project/detail", baseUri: ResolveBaseUri( servers: s_PersonalizedVideoProjectDetailServers, - defaultBaseUrl: "https://api.heygen.com/")); + defaultBaseUrl: "https://api.heygen.com/")); __pathBuilder - .AddOptionalParameter("id", id) + .AddOptionalParameter("id", id) ; var __path = __pathBuilder.ToString(); __path = global::HeyGen.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -170,6 +192,8 @@ partial void ProcessPersonalizedVideoProjectDetailResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -180,6 +204,11 @@ partial void ProcessPersonalizedVideoProjectDetailResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::HeyGen.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::HeyGen.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -197,6 +226,8 @@ partial void ProcessPersonalizedVideoProjectDetailResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -206,8 +237,7 @@ partial void ProcessPersonalizedVideoProjectDetailResponse( __httpRequest.Dispose(); __httpRequest = null; await global::HeyGen.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -216,6 +246,11 @@ partial void ProcessPersonalizedVideoProjectDetailResponse( __attempt < __maxAttempts && global::HeyGen.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::HeyGen.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::HeyGen.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::HeyGen.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -232,14 +267,15 @@ partial void ProcessPersonalizedVideoProjectDetailResponse( 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::HeyGen.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -279,6 +315,8 @@ partial void ProcessPersonalizedVideoProjectDetailResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -299,6 +337,8 @@ partial void ProcessPersonalizedVideoProjectDetailResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -319,6 +359,10 @@ partial void ProcessPersonalizedVideoProjectDetailResponse( { __response.EnsureSuccessStatusCode(); + return new global::HeyGen.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::HeyGen.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -340,6 +384,10 @@ partial void ProcessPersonalizedVideoProjectDetailResponse( try { __response.EnsureSuccessStatusCode(); + return new global::HeyGen.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::HeyGen.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/HeyGen/Generated/HeyGen.PersonalizedVideoClient.g.cs b/src/libs/HeyGen/Generated/HeyGen.PersonalizedVideoClient.g.cs index fffab2b..437c68c 100644 --- a/src/libs/HeyGen/Generated/HeyGen.PersonalizedVideoClient.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.PersonalizedVideoClient.g.cs @@ -106,10 +106,10 @@ public PersonalizedVideoClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public PersonalizedVideoClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::HeyGen.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::HeyGen.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingAvatarList.g.cs b/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingAvatarList.g.cs index 5cfbb9b..0ee9f76 100644 --- a/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingAvatarList.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingAvatarList.g.cs @@ -57,6 +57,22 @@ partial void ProcessStreamingAvatarListResponse( public async global::System.Threading.Tasks.Task StreamingAvatarListAsync( global::HeyGen.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await StreamingAvatarListAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// streaming/avatar.list
+ /// streaming/avatar.list + ///
+ /// 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 StreamingAvatarListAsResponseAsync( + global::HeyGen.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -85,6 +101,7 @@ partial void ProcessStreamingAvatarListResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::HeyGen.PathBuilder( path: "/v1/streaming/avatar.list", baseUri: ResolveBaseUri( @@ -159,6 +176,8 @@ partial void ProcessStreamingAvatarListResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -169,6 +188,11 @@ partial void ProcessStreamingAvatarListResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::HeyGen.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::HeyGen.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -186,6 +210,8 @@ partial void ProcessStreamingAvatarListResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -195,8 +221,7 @@ partial void ProcessStreamingAvatarListResponse( __httpRequest.Dispose(); __httpRequest = null; await global::HeyGen.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -205,6 +230,11 @@ partial void ProcessStreamingAvatarListResponse( __attempt < __maxAttempts && global::HeyGen.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::HeyGen.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::HeyGen.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::HeyGen.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -221,14 +251,15 @@ partial void ProcessStreamingAvatarListResponse( 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::HeyGen.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -268,6 +299,8 @@ partial void ProcessStreamingAvatarListResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -288,6 +321,8 @@ partial void ProcessStreamingAvatarListResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -308,6 +343,10 @@ partial void ProcessStreamingAvatarListResponse( { __response.EnsureSuccessStatusCode(); + return new global::HeyGen.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::HeyGen.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -329,6 +368,10 @@ partial void ProcessStreamingAvatarListResponse( try { __response.EnsureSuccessStatusCode(); + return new global::HeyGen.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::HeyGen.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingCreateToken.g.cs b/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingCreateToken.g.cs index a43b2b0..3bb92e8 100644 --- a/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingCreateToken.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingCreateToken.g.cs @@ -59,6 +59,27 @@ partial void ProcessStreamingCreateTokenResponse( /// public async global::System.Threading.Tasks.Task StreamingCreateTokenAsync( + object request, + global::HeyGen.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + await StreamingCreateTokenAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// streaming.create_token
+ /// streaming.create_token + ///
+ /// + /// 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 StreamingCreateTokenAsResponseAsync( + object request, global::HeyGen.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -93,6 +114,7 @@ partial void ProcessStreamingCreateTokenResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::HeyGen.PathBuilder( path: "/v1/streaming.create_token", baseUri: ResolveBaseUri( @@ -174,6 +196,8 @@ partial void ProcessStreamingCreateTokenResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -184,6 +208,11 @@ partial void ProcessStreamingCreateTokenResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::HeyGen.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::HeyGen.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -201,6 +230,8 @@ partial void ProcessStreamingCreateTokenResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -210,8 +241,7 @@ partial void ProcessStreamingCreateTokenResponse( __httpRequest.Dispose(); __httpRequest = null; await global::HeyGen.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -220,6 +250,11 @@ partial void ProcessStreamingCreateTokenResponse( __attempt < __maxAttempts && global::HeyGen.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::HeyGen.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::HeyGen.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::HeyGen.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -236,14 +271,15 @@ partial void ProcessStreamingCreateTokenResponse( 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::HeyGen.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -283,6 +319,8 @@ partial void ProcessStreamingCreateTokenResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -303,6 +341,8 @@ partial void ProcessStreamingCreateTokenResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -323,6 +363,10 @@ partial void ProcessStreamingCreateTokenResponse( { __response.EnsureSuccessStatusCode(); + return new global::HeyGen.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::HeyGen.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -344,6 +388,10 @@ partial void ProcessStreamingCreateTokenResponse( try { __response.EnsureSuccessStatusCode(); + return new global::HeyGen.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::HeyGen.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingIce.g.cs b/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingIce.g.cs index 4d9f9b1..25068b8 100644 --- a/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingIce.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingIce.g.cs @@ -59,6 +59,27 @@ partial void ProcessStreamingIceResponse( /// public async global::System.Threading.Tasks.Task StreamingIceAsync( + global::HeyGen.StreamingIceRequest request, + global::HeyGen.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + await StreamingIceAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// streaming.ice
+ /// streaming.ice + ///
+ /// + /// 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 StreamingIceAsResponseAsync( + global::HeyGen.StreamingIceRequest request, global::HeyGen.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -93,6 +114,7 @@ partial void ProcessStreamingIceResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::HeyGen.PathBuilder( path: "/v1/streaming.ice", baseUri: ResolveBaseUri( @@ -174,6 +196,8 @@ partial void ProcessStreamingIceResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -184,6 +208,11 @@ partial void ProcessStreamingIceResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::HeyGen.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::HeyGen.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -201,6 +230,8 @@ partial void ProcessStreamingIceResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -210,8 +241,7 @@ partial void ProcessStreamingIceResponse( __httpRequest.Dispose(); __httpRequest = null; await global::HeyGen.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -220,6 +250,11 @@ partial void ProcessStreamingIceResponse( __attempt < __maxAttempts && global::HeyGen.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::HeyGen.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::HeyGen.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::HeyGen.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -236,14 +271,15 @@ partial void ProcessStreamingIceResponse( 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::HeyGen.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -283,6 +319,8 @@ partial void ProcessStreamingIceResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -303,6 +341,8 @@ partial void ProcessStreamingIceResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -323,6 +363,10 @@ partial void ProcessStreamingIceResponse( { __response.EnsureSuccessStatusCode(); + return new global::HeyGen.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::HeyGen.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -344,6 +388,10 @@ partial void ProcessStreamingIceResponse( try { __response.EnsureSuccessStatusCode(); + return new global::HeyGen.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::HeyGen.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingInterrupt.g.cs b/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingInterrupt.g.cs index 79a5ff5..c50aa23 100644 --- a/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingInterrupt.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingInterrupt.g.cs @@ -59,6 +59,27 @@ partial void ProcessStreamingInterruptResponse( /// public async global::System.Threading.Tasks.Task StreamingInterruptAsync( + global::HeyGen.StreamingInterruptRequest request, + global::HeyGen.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + await StreamingInterruptAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// streaming.interrupt
+ /// This is endpoint is to interrupt a speaking avatar. If the avatar is not speaking, it doesn't do anything. + ///
+ /// + /// 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 StreamingInterruptAsResponseAsync( + global::HeyGen.StreamingInterruptRequest request, global::HeyGen.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -93,6 +114,7 @@ partial void ProcessStreamingInterruptResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::HeyGen.PathBuilder( path: "/v1/streaming.interrupt", baseUri: ResolveBaseUri( @@ -174,6 +196,8 @@ partial void ProcessStreamingInterruptResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -184,6 +208,11 @@ partial void ProcessStreamingInterruptResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::HeyGen.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::HeyGen.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -201,6 +230,8 @@ partial void ProcessStreamingInterruptResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -210,8 +241,7 @@ partial void ProcessStreamingInterruptResponse( __httpRequest.Dispose(); __httpRequest = null; await global::HeyGen.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -220,6 +250,11 @@ partial void ProcessStreamingInterruptResponse( __attempt < __maxAttempts && global::HeyGen.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::HeyGen.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::HeyGen.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::HeyGen.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -236,14 +271,15 @@ partial void ProcessStreamingInterruptResponse( 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::HeyGen.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -283,6 +319,8 @@ partial void ProcessStreamingInterruptResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -303,6 +341,8 @@ partial void ProcessStreamingInterruptResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -323,6 +363,10 @@ partial void ProcessStreamingInterruptResponse( { __response.EnsureSuccessStatusCode(); + return new global::HeyGen.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::HeyGen.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -344,6 +388,10 @@ partial void ProcessStreamingInterruptResponse( try { __response.EnsureSuccessStatusCode(); + return new global::HeyGen.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::HeyGen.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingList.g.cs b/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingList.g.cs index 8e075d7..ce819a6 100644 --- a/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingList.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingList.g.cs @@ -57,6 +57,22 @@ partial void ProcessStreamingListResponse( public async global::System.Threading.Tasks.Task StreamingListAsync( global::HeyGen.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await StreamingListAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// streaming.list
+ /// streaming.list + ///
+ /// 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 StreamingListAsResponseAsync( + global::HeyGen.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -85,6 +101,7 @@ partial void ProcessStreamingListResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::HeyGen.PathBuilder( path: "/v1/streaming.list", baseUri: ResolveBaseUri( @@ -159,6 +176,8 @@ partial void ProcessStreamingListResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -169,6 +188,11 @@ partial void ProcessStreamingListResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::HeyGen.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::HeyGen.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -186,6 +210,8 @@ partial void ProcessStreamingListResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -195,8 +221,7 @@ partial void ProcessStreamingListResponse( __httpRequest.Dispose(); __httpRequest = null; await global::HeyGen.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -205,6 +230,11 @@ partial void ProcessStreamingListResponse( __attempt < __maxAttempts && global::HeyGen.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::HeyGen.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::HeyGen.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::HeyGen.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -221,14 +251,15 @@ partial void ProcessStreamingListResponse( 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::HeyGen.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -268,6 +299,8 @@ partial void ProcessStreamingListResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -288,6 +321,8 @@ partial void ProcessStreamingListResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -308,6 +343,10 @@ partial void ProcessStreamingListResponse( { __response.EnsureSuccessStatusCode(); + return new global::HeyGen.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::HeyGen.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -329,6 +368,10 @@ partial void ProcessStreamingListResponse( try { __response.EnsureSuccessStatusCode(); + return new global::HeyGen.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::HeyGen.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingNew.g.cs b/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingNew.g.cs index 40e5e01..9ddb133 100644 --- a/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingNew.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingNew.g.cs @@ -59,6 +59,27 @@ partial void ProcessStreamingNewResponse( /// public async global::System.Threading.Tasks.Task StreamingNewAsync( + global::HeyGen.StreamingNewRequest request, + global::HeyGen.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + await StreamingNewAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// streaming.new
+ /// streaming.new + ///
+ /// + /// 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 StreamingNewAsResponseAsync( + global::HeyGen.StreamingNewRequest request, global::HeyGen.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -93,6 +114,7 @@ partial void ProcessStreamingNewResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::HeyGen.PathBuilder( path: "/v1/streaming.new", baseUri: ResolveBaseUri( @@ -174,6 +196,8 @@ partial void ProcessStreamingNewResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -184,6 +208,11 @@ partial void ProcessStreamingNewResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::HeyGen.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::HeyGen.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -201,6 +230,8 @@ partial void ProcessStreamingNewResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -210,8 +241,7 @@ partial void ProcessStreamingNewResponse( __httpRequest.Dispose(); __httpRequest = null; await global::HeyGen.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -220,6 +250,11 @@ partial void ProcessStreamingNewResponse( __attempt < __maxAttempts && global::HeyGen.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::HeyGen.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::HeyGen.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::HeyGen.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -236,14 +271,15 @@ partial void ProcessStreamingNewResponse( 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::HeyGen.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -283,6 +319,8 @@ partial void ProcessStreamingNewResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -303,6 +341,8 @@ partial void ProcessStreamingNewResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -323,6 +363,10 @@ partial void ProcessStreamingNewResponse( { __response.EnsureSuccessStatusCode(); + return new global::HeyGen.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::HeyGen.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -344,6 +388,10 @@ partial void ProcessStreamingNewResponse( try { __response.EnsureSuccessStatusCode(); + return new global::HeyGen.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::HeyGen.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingStart.g.cs b/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingStart.g.cs index 987ce05..72ebd69 100644 --- a/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingStart.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingStart.g.cs @@ -59,6 +59,27 @@ partial void ProcessStreamingStartResponse( /// public async global::System.Threading.Tasks.Task StreamingStartAsync( + global::HeyGen.StreamingStartRequest request, + global::HeyGen.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + await StreamingStartAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// streaming.start
+ /// streaming.start + ///
+ /// + /// 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 StreamingStartAsResponseAsync( + global::HeyGen.StreamingStartRequest request, global::HeyGen.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -93,6 +114,7 @@ partial void ProcessStreamingStartResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::HeyGen.PathBuilder( path: "/v1/streaming.start", baseUri: ResolveBaseUri( @@ -174,6 +196,8 @@ partial void ProcessStreamingStartResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -184,6 +208,11 @@ partial void ProcessStreamingStartResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::HeyGen.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::HeyGen.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -201,6 +230,8 @@ partial void ProcessStreamingStartResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -210,8 +241,7 @@ partial void ProcessStreamingStartResponse( __httpRequest.Dispose(); __httpRequest = null; await global::HeyGen.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -220,6 +250,11 @@ partial void ProcessStreamingStartResponse( __attempt < __maxAttempts && global::HeyGen.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::HeyGen.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::HeyGen.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::HeyGen.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -236,14 +271,15 @@ partial void ProcessStreamingStartResponse( 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::HeyGen.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -283,6 +319,8 @@ partial void ProcessStreamingStartResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -303,6 +341,8 @@ partial void ProcessStreamingStartResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -323,6 +363,10 @@ partial void ProcessStreamingStartResponse( { __response.EnsureSuccessStatusCode(); + return new global::HeyGen.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::HeyGen.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -344,6 +388,10 @@ partial void ProcessStreamingStartResponse( try { __response.EnsureSuccessStatusCode(); + return new global::HeyGen.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::HeyGen.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingStop.g.cs b/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingStop.g.cs index ee27c8f..978c142 100644 --- a/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingStop.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingStop.g.cs @@ -59,6 +59,27 @@ partial void ProcessStreamingStopResponse( /// public async global::System.Threading.Tasks.Task StreamingStopAsync( + global::HeyGen.StreamingStopRequest request, + global::HeyGen.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + await StreamingStopAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// streaming.stop
+ /// streaming.stop + ///
+ /// + /// 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 StreamingStopAsResponseAsync( + global::HeyGen.StreamingStopRequest request, global::HeyGen.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -93,6 +114,7 @@ partial void ProcessStreamingStopResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::HeyGen.PathBuilder( path: "/v1/streaming.stop", baseUri: ResolveBaseUri( @@ -174,6 +196,8 @@ partial void ProcessStreamingStopResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -184,6 +208,11 @@ partial void ProcessStreamingStopResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::HeyGen.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::HeyGen.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -201,6 +230,8 @@ partial void ProcessStreamingStopResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -210,8 +241,7 @@ partial void ProcessStreamingStopResponse( __httpRequest.Dispose(); __httpRequest = null; await global::HeyGen.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -220,6 +250,11 @@ partial void ProcessStreamingStopResponse( __attempt < __maxAttempts && global::HeyGen.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::HeyGen.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::HeyGen.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::HeyGen.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -236,14 +271,15 @@ partial void ProcessStreamingStopResponse( 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::HeyGen.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -283,6 +319,8 @@ partial void ProcessStreamingStopResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -303,6 +341,8 @@ partial void ProcessStreamingStopResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -323,6 +363,10 @@ partial void ProcessStreamingStopResponse( { __response.EnsureSuccessStatusCode(); + return new global::HeyGen.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::HeyGen.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -344,6 +388,10 @@ partial void ProcessStreamingStopResponse( try { __response.EnsureSuccessStatusCode(); + return new global::HeyGen.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::HeyGen.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingTask.g.cs b/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingTask.g.cs index ecf8e45..1693470 100644 --- a/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingTask.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingTask.g.cs @@ -59,6 +59,27 @@ partial void ProcessStreamingTaskResponse( /// public async global::System.Threading.Tasks.Task StreamingTaskAsync( + global::HeyGen.StreamingTaskRequest request, + global::HeyGen.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + await StreamingTaskAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// streaming.task
+ /// streaming.task + ///
+ /// + /// 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 StreamingTaskAsResponseAsync( + global::HeyGen.StreamingTaskRequest request, global::HeyGen.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -93,6 +114,7 @@ partial void ProcessStreamingTaskResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::HeyGen.PathBuilder( path: "/v1/streaming.task", baseUri: ResolveBaseUri( @@ -174,6 +196,8 @@ partial void ProcessStreamingTaskResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -184,6 +208,11 @@ partial void ProcessStreamingTaskResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::HeyGen.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::HeyGen.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -201,6 +230,8 @@ partial void ProcessStreamingTaskResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -210,8 +241,7 @@ partial void ProcessStreamingTaskResponse( __httpRequest.Dispose(); __httpRequest = null; await global::HeyGen.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -220,6 +250,11 @@ partial void ProcessStreamingTaskResponse( __attempt < __maxAttempts && global::HeyGen.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::HeyGen.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::HeyGen.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::HeyGen.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -236,14 +271,15 @@ partial void ProcessStreamingTaskResponse( 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::HeyGen.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -283,6 +319,8 @@ partial void ProcessStreamingTaskResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -303,6 +341,8 @@ partial void ProcessStreamingTaskResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -323,6 +363,10 @@ partial void ProcessStreamingTaskResponse( { __response.EnsureSuccessStatusCode(); + return new global::HeyGen.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::HeyGen.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -344,6 +388,10 @@ partial void ProcessStreamingTaskResponse( try { __response.EnsureSuccessStatusCode(); + return new global::HeyGen.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::HeyGen.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.g.cs b/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.g.cs index 3f477f7..c78022c 100644 --- a/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.g.cs @@ -105,10 +105,10 @@ public StreamingApiClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public StreamingApiClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::HeyGen.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::HeyGen.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/HeyGen/Generated/HeyGen.TalkingPhotoClient.V1TalkingPhotoList.g.cs b/src/libs/HeyGen/Generated/HeyGen.TalkingPhotoClient.V1TalkingPhotoList.g.cs index e98d3b0..30a9b28 100644 --- a/src/libs/HeyGen/Generated/HeyGen.TalkingPhotoClient.V1TalkingPhotoList.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.TalkingPhotoClient.V1TalkingPhotoList.g.cs @@ -57,6 +57,22 @@ partial void ProcessV1TalkingPhotoListResponse( public async global::System.Threading.Tasks.Task V1TalkingPhotoListAsync( global::HeyGen.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await V1TalkingPhotoListAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// v1/talking_photo.list
+ /// v1/talking_photo.list + ///
+ /// 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 V1TalkingPhotoListAsResponseAsync( + global::HeyGen.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -85,6 +101,7 @@ partial void ProcessV1TalkingPhotoListResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::HeyGen.PathBuilder( path: "/v1/talking_photo.list", baseUri: ResolveBaseUri( @@ -159,6 +176,8 @@ partial void ProcessV1TalkingPhotoListResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -169,6 +188,11 @@ partial void ProcessV1TalkingPhotoListResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::HeyGen.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::HeyGen.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -186,6 +210,8 @@ partial void ProcessV1TalkingPhotoListResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -195,8 +221,7 @@ partial void ProcessV1TalkingPhotoListResponse( __httpRequest.Dispose(); __httpRequest = null; await global::HeyGen.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -205,6 +230,11 @@ partial void ProcessV1TalkingPhotoListResponse( __attempt < __maxAttempts && global::HeyGen.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::HeyGen.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::HeyGen.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::HeyGen.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -221,14 +251,15 @@ partial void ProcessV1TalkingPhotoListResponse( 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::HeyGen.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -268,6 +299,8 @@ partial void ProcessV1TalkingPhotoListResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -288,6 +321,8 @@ partial void ProcessV1TalkingPhotoListResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -308,6 +343,10 @@ partial void ProcessV1TalkingPhotoListResponse( { __response.EnsureSuccessStatusCode(); + return new global::HeyGen.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::HeyGen.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -329,6 +368,10 @@ partial void ProcessV1TalkingPhotoListResponse( try { __response.EnsureSuccessStatusCode(); + return new global::HeyGen.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::HeyGen.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/HeyGen/Generated/HeyGen.TalkingPhotoClient.V1TalkingPhotoUpload.g.cs b/src/libs/HeyGen/Generated/HeyGen.TalkingPhotoClient.V1TalkingPhotoUpload.g.cs index e05c7cd..7868a47 100644 --- a/src/libs/HeyGen/Generated/HeyGen.TalkingPhotoClient.V1TalkingPhotoUpload.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.TalkingPhotoClient.V1TalkingPhotoUpload.g.cs @@ -57,6 +57,22 @@ partial void ProcessV1TalkingPhotoUploadResponse( public async global::System.Threading.Tasks.Task V1TalkingPhotoUploadAsync( global::HeyGen.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await V1TalkingPhotoUploadAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// v1/talking_photo (upload)
+ /// v1/talking_photo (upload) + ///
+ /// 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 V1TalkingPhotoUploadAsResponseAsync( + global::HeyGen.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -85,6 +101,7 @@ partial void ProcessV1TalkingPhotoUploadResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::HeyGen.PathBuilder( path: "/v1/talking_photo", baseUri: ResolveBaseUri( @@ -159,6 +176,8 @@ partial void ProcessV1TalkingPhotoUploadResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -169,6 +188,11 @@ partial void ProcessV1TalkingPhotoUploadResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::HeyGen.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::HeyGen.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -186,6 +210,8 @@ partial void ProcessV1TalkingPhotoUploadResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -195,8 +221,7 @@ partial void ProcessV1TalkingPhotoUploadResponse( __httpRequest.Dispose(); __httpRequest = null; await global::HeyGen.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -205,6 +230,11 @@ partial void ProcessV1TalkingPhotoUploadResponse( __attempt < __maxAttempts && global::HeyGen.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::HeyGen.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::HeyGen.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::HeyGen.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -221,14 +251,15 @@ partial void ProcessV1TalkingPhotoUploadResponse( 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::HeyGen.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -268,6 +299,8 @@ partial void ProcessV1TalkingPhotoUploadResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -288,6 +321,8 @@ partial void ProcessV1TalkingPhotoUploadResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -308,6 +343,10 @@ partial void ProcessV1TalkingPhotoUploadResponse( { __response.EnsureSuccessStatusCode(); + return new global::HeyGen.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::HeyGen.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -329,6 +368,10 @@ partial void ProcessV1TalkingPhotoUploadResponse( try { __response.EnsureSuccessStatusCode(); + return new global::HeyGen.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::HeyGen.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/HeyGen/Generated/HeyGen.TalkingPhotoClient.V2TalkingPhotoIdDelete.g.cs b/src/libs/HeyGen/Generated/HeyGen.TalkingPhotoClient.V2TalkingPhotoIdDelete.g.cs index 7aee154..2e3a934 100644 --- a/src/libs/HeyGen/Generated/HeyGen.TalkingPhotoClient.V2TalkingPhotoIdDelete.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.TalkingPhotoClient.V2TalkingPhotoIdDelete.g.cs @@ -57,6 +57,22 @@ partial void ProcessV2TalkingPhotoIdDeleteResponse( public async global::System.Threading.Tasks.Task V2TalkingPhotoIdDeleteAsync( global::HeyGen.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await V2TalkingPhotoIdDeleteAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// v2/talking_photo/<id> (delete)
+ /// v2/talking_photo/<id> (delete) + ///
+ /// 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 V2TalkingPhotoIdDeleteAsResponseAsync( + global::HeyGen.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -85,6 +101,7 @@ partial void ProcessV2TalkingPhotoIdDeleteResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::HeyGen.PathBuilder( path: "/v2/talking_photo/", baseUri: ResolveBaseUri( @@ -159,6 +176,8 @@ partial void ProcessV2TalkingPhotoIdDeleteResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -169,6 +188,11 @@ partial void ProcessV2TalkingPhotoIdDeleteResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::HeyGen.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::HeyGen.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -186,6 +210,8 @@ partial void ProcessV2TalkingPhotoIdDeleteResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -195,8 +221,7 @@ partial void ProcessV2TalkingPhotoIdDeleteResponse( __httpRequest.Dispose(); __httpRequest = null; await global::HeyGen.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -205,6 +230,11 @@ partial void ProcessV2TalkingPhotoIdDeleteResponse( __attempt < __maxAttempts && global::HeyGen.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::HeyGen.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::HeyGen.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::HeyGen.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -221,14 +251,15 @@ partial void ProcessV2TalkingPhotoIdDeleteResponse( 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::HeyGen.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -268,6 +299,8 @@ partial void ProcessV2TalkingPhotoIdDeleteResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -288,6 +321,8 @@ partial void ProcessV2TalkingPhotoIdDeleteResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -308,6 +343,10 @@ partial void ProcessV2TalkingPhotoIdDeleteResponse( { __response.EnsureSuccessStatusCode(); + return new global::HeyGen.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::HeyGen.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -329,6 +368,10 @@ partial void ProcessV2TalkingPhotoIdDeleteResponse( try { __response.EnsureSuccessStatusCode(); + return new global::HeyGen.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::HeyGen.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/HeyGen/Generated/HeyGen.TalkingPhotoClient.g.cs b/src/libs/HeyGen/Generated/HeyGen.TalkingPhotoClient.g.cs index a7519c0..72dc18d 100644 --- a/src/libs/HeyGen/Generated/HeyGen.TalkingPhotoClient.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.TalkingPhotoClient.g.cs @@ -105,10 +105,10 @@ public TalkingPhotoClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public TalkingPhotoClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::HeyGen.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::HeyGen.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/HeyGen/Generated/HeyGen.TemplateApiClient.V2TemplateGenerate.g.cs b/src/libs/HeyGen/Generated/HeyGen.TemplateApiClient.V2TemplateGenerate.g.cs index fab3df4..b54bd3f 100644 --- a/src/libs/HeyGen/Generated/HeyGen.TemplateApiClient.V2TemplateGenerate.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.TemplateApiClient.V2TemplateGenerate.g.cs @@ -60,6 +60,28 @@ partial void ProcessV2TemplateGenerateResponse( /// public async global::System.Threading.Tasks.Task V2TemplateGenerateAsync( + global::HeyGen.V2TemplateGenerateRequest request, + global::HeyGen.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + await V2TemplateGenerateAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// v2/template/generate
+ /// Generated Video: [https://app.heygen.com/videos/7cba9d29d6db46b88471221fdbc4fb75](https://app.heygen.com/videos/7cba9d29d6db46b88471221fdbc4fb75)
+ /// <img src="https://resource.heygen.ai/video/gifs/7cba9d29d6db46b88471221fdbc4fb75.gif" alt=""> + ///
+ /// + /// 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 V2TemplateGenerateAsResponseAsync( + global::HeyGen.V2TemplateGenerateRequest request, global::HeyGen.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -94,6 +116,7 @@ partial void ProcessV2TemplateGenerateResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::HeyGen.PathBuilder( path: "/v2/template//generate", baseUri: ResolveBaseUri( @@ -175,6 +198,8 @@ partial void ProcessV2TemplateGenerateResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -185,6 +210,11 @@ partial void ProcessV2TemplateGenerateResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::HeyGen.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::HeyGen.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -202,6 +232,8 @@ partial void ProcessV2TemplateGenerateResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -211,8 +243,7 @@ partial void ProcessV2TemplateGenerateResponse( __httpRequest.Dispose(); __httpRequest = null; await global::HeyGen.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -221,6 +252,11 @@ partial void ProcessV2TemplateGenerateResponse( __attempt < __maxAttempts && global::HeyGen.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::HeyGen.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::HeyGen.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::HeyGen.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -237,14 +273,15 @@ partial void ProcessV2TemplateGenerateResponse( 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::HeyGen.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -284,6 +321,8 @@ partial void ProcessV2TemplateGenerateResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -304,6 +343,8 @@ partial void ProcessV2TemplateGenerateResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -324,6 +365,10 @@ partial void ProcessV2TemplateGenerateResponse( { __response.EnsureSuccessStatusCode(); + return new global::HeyGen.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::HeyGen.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -345,6 +390,10 @@ partial void ProcessV2TemplateGenerateResponse( try { __response.EnsureSuccessStatusCode(); + return new global::HeyGen.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::HeyGen.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/HeyGen/Generated/HeyGen.TemplateApiClient.V2TemplateId.g.cs b/src/libs/HeyGen/Generated/HeyGen.TemplateApiClient.V2TemplateId.g.cs index 6eba8f4..20a53f7 100644 --- a/src/libs/HeyGen/Generated/HeyGen.TemplateApiClient.V2TemplateId.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.TemplateApiClient.V2TemplateId.g.cs @@ -57,6 +57,22 @@ partial void ProcessV2TemplateIdResponse( public async global::System.Threading.Tasks.Task V2TemplateIdAsync( global::HeyGen.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await V2TemplateIdAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// v2/template/<id>
+ /// v2/template/<id> + ///
+ /// 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 V2TemplateIdAsResponseAsync( + global::HeyGen.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -85,6 +101,7 @@ partial void ProcessV2TemplateIdResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::HeyGen.PathBuilder( path: "/v2/template/", baseUri: ResolveBaseUri( @@ -159,6 +176,8 @@ partial void ProcessV2TemplateIdResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -169,6 +188,11 @@ partial void ProcessV2TemplateIdResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::HeyGen.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::HeyGen.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -186,6 +210,8 @@ partial void ProcessV2TemplateIdResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -195,8 +221,7 @@ partial void ProcessV2TemplateIdResponse( __httpRequest.Dispose(); __httpRequest = null; await global::HeyGen.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -205,6 +230,11 @@ partial void ProcessV2TemplateIdResponse( __attempt < __maxAttempts && global::HeyGen.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::HeyGen.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::HeyGen.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::HeyGen.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -221,14 +251,15 @@ partial void ProcessV2TemplateIdResponse( 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::HeyGen.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -268,6 +299,8 @@ partial void ProcessV2TemplateIdResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -288,6 +321,8 @@ partial void ProcessV2TemplateIdResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -308,6 +343,10 @@ partial void ProcessV2TemplateIdResponse( { __response.EnsureSuccessStatusCode(); + return new global::HeyGen.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::HeyGen.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -329,6 +368,10 @@ partial void ProcessV2TemplateIdResponse( try { __response.EnsureSuccessStatusCode(); + return new global::HeyGen.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::HeyGen.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/HeyGen/Generated/HeyGen.TemplateApiClient.V2Templates.g.cs b/src/libs/HeyGen/Generated/HeyGen.TemplateApiClient.V2Templates.g.cs index 626affa..44a3dbe 100644 --- a/src/libs/HeyGen/Generated/HeyGen.TemplateApiClient.V2Templates.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.TemplateApiClient.V2Templates.g.cs @@ -57,6 +57,22 @@ partial void ProcessV2TemplatesResponse( public async global::System.Threading.Tasks.Task V2TemplatesAsync( global::HeyGen.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await V2TemplatesAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// v2/templates
+ /// v2/templates + ///
+ /// 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 V2TemplatesAsResponseAsync( + global::HeyGen.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -85,6 +101,7 @@ partial void ProcessV2TemplatesResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::HeyGen.PathBuilder( path: "/v2/templates", baseUri: ResolveBaseUri( @@ -159,6 +176,8 @@ partial void ProcessV2TemplatesResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -169,6 +188,11 @@ partial void ProcessV2TemplatesResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::HeyGen.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::HeyGen.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -186,6 +210,8 @@ partial void ProcessV2TemplatesResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -195,8 +221,7 @@ partial void ProcessV2TemplatesResponse( __httpRequest.Dispose(); __httpRequest = null; await global::HeyGen.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -205,6 +230,11 @@ partial void ProcessV2TemplatesResponse( __attempt < __maxAttempts && global::HeyGen.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::HeyGen.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::HeyGen.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::HeyGen.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -221,14 +251,15 @@ partial void ProcessV2TemplatesResponse( 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::HeyGen.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -268,6 +299,8 @@ partial void ProcessV2TemplatesResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -288,6 +321,8 @@ partial void ProcessV2TemplatesResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -308,6 +343,10 @@ partial void ProcessV2TemplatesResponse( { __response.EnsureSuccessStatusCode(); + return new global::HeyGen.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::HeyGen.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -329,6 +368,10 @@ partial void ProcessV2TemplatesResponse( try { __response.EnsureSuccessStatusCode(); + return new global::HeyGen.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::HeyGen.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/HeyGen/Generated/HeyGen.TemplateApiClient.g.cs b/src/libs/HeyGen/Generated/HeyGen.TemplateApiClient.g.cs index adb1b1d..0024162 100644 --- a/src/libs/HeyGen/Generated/HeyGen.TemplateApiClient.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.TemplateApiClient.g.cs @@ -111,10 +111,10 @@ public TemplateApiClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public TemplateApiClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::HeyGen.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::HeyGen.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/HeyGen/Generated/HeyGen.UserClient.V2UserRemainingQuota.g.cs b/src/libs/HeyGen/Generated/HeyGen.UserClient.V2UserRemainingQuota.g.cs index 190daa0..b4056a5 100644 --- a/src/libs/HeyGen/Generated/HeyGen.UserClient.V2UserRemainingQuota.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.UserClient.V2UserRemainingQuota.g.cs @@ -57,6 +57,22 @@ partial void ProcessV2UserRemainingQuotaResponse( public async global::System.Threading.Tasks.Task V2UserRemainingQuotaAsync( global::HeyGen.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await V2UserRemainingQuotaAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// v2/user/remaining_quota
+ /// v2/user/remaining_quota + ///
+ /// 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 V2UserRemainingQuotaAsResponseAsync( + global::HeyGen.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -85,6 +101,7 @@ partial void ProcessV2UserRemainingQuotaResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::HeyGen.PathBuilder( path: "/v2/user/remaining_quota", baseUri: ResolveBaseUri( @@ -159,6 +176,8 @@ partial void ProcessV2UserRemainingQuotaResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -169,6 +188,11 @@ partial void ProcessV2UserRemainingQuotaResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::HeyGen.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::HeyGen.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -186,6 +210,8 @@ partial void ProcessV2UserRemainingQuotaResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -195,8 +221,7 @@ partial void ProcessV2UserRemainingQuotaResponse( __httpRequest.Dispose(); __httpRequest = null; await global::HeyGen.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -205,6 +230,11 @@ partial void ProcessV2UserRemainingQuotaResponse( __attempt < __maxAttempts && global::HeyGen.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::HeyGen.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::HeyGen.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::HeyGen.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -221,14 +251,15 @@ partial void ProcessV2UserRemainingQuotaResponse( 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::HeyGen.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -268,6 +299,8 @@ partial void ProcessV2UserRemainingQuotaResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -288,6 +321,8 @@ partial void ProcessV2UserRemainingQuotaResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -308,6 +343,10 @@ partial void ProcessV2UserRemainingQuotaResponse( { __response.EnsureSuccessStatusCode(); + return new global::HeyGen.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::HeyGen.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -329,6 +368,10 @@ partial void ProcessV2UserRemainingQuotaResponse( try { __response.EnsureSuccessStatusCode(); + return new global::HeyGen.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::HeyGen.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/HeyGen/Generated/HeyGen.UserClient.g.cs b/src/libs/HeyGen/Generated/HeyGen.UserClient.g.cs index 242707a..40d370e 100644 --- a/src/libs/HeyGen/Generated/HeyGen.UserClient.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.UserClient.g.cs @@ -105,10 +105,10 @@ public UserClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public UserClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::HeyGen.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::HeyGen.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/HeyGen/Generated/HeyGen.VideoTranslateApiClient.V2VideoTranslate.g.cs b/src/libs/HeyGen/Generated/HeyGen.VideoTranslateApiClient.V2VideoTranslate.g.cs index ef2924f..4f61f7c 100644 --- a/src/libs/HeyGen/Generated/HeyGen.VideoTranslateApiClient.V2VideoTranslate.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.VideoTranslateApiClient.V2VideoTranslate.g.cs @@ -59,6 +59,27 @@ partial void ProcessV2VideoTranslateResponse( /// public async global::System.Threading.Tasks.Task V2VideoTranslateAsync( + global::HeyGen.V2VideoTranslateRequest request, + global::HeyGen.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + await V2VideoTranslateAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// v2/video_translate
+ /// Generated Video: [https://app.heygen.com/video-translation/share/dab5a987e6154b0cb7e606c858043fa9](https://app.heygen.com/video-translation/share/dab5a987e6154b0cb7e606c858043fa9) + ///
+ /// + /// 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 V2VideoTranslateAsResponseAsync( + global::HeyGen.V2VideoTranslateRequest request, global::HeyGen.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -93,6 +114,7 @@ partial void ProcessV2VideoTranslateResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::HeyGen.PathBuilder( path: "/v2/video_translate", baseUri: ResolveBaseUri( @@ -174,6 +196,8 @@ partial void ProcessV2VideoTranslateResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -184,6 +208,11 @@ partial void ProcessV2VideoTranslateResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::HeyGen.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::HeyGen.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -201,6 +230,8 @@ partial void ProcessV2VideoTranslateResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -210,8 +241,7 @@ partial void ProcessV2VideoTranslateResponse( __httpRequest.Dispose(); __httpRequest = null; await global::HeyGen.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -220,6 +250,11 @@ partial void ProcessV2VideoTranslateResponse( __attempt < __maxAttempts && global::HeyGen.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::HeyGen.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::HeyGen.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::HeyGen.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -236,14 +271,15 @@ partial void ProcessV2VideoTranslateResponse( 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::HeyGen.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -283,6 +319,8 @@ partial void ProcessV2VideoTranslateResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -303,6 +341,8 @@ partial void ProcessV2VideoTranslateResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -323,6 +363,10 @@ partial void ProcessV2VideoTranslateResponse( { __response.EnsureSuccessStatusCode(); + return new global::HeyGen.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::HeyGen.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -344,6 +388,10 @@ partial void ProcessV2VideoTranslateResponse( try { __response.EnsureSuccessStatusCode(); + return new global::HeyGen.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::HeyGen.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/HeyGen/Generated/HeyGen.VideoTranslateApiClient.V2VideoTranslateIdStatus.g.cs b/src/libs/HeyGen/Generated/HeyGen.VideoTranslateApiClient.V2VideoTranslateIdStatus.g.cs index 27d6922..7a1c5d8 100644 --- a/src/libs/HeyGen/Generated/HeyGen.VideoTranslateApiClient.V2VideoTranslateIdStatus.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.VideoTranslateApiClient.V2VideoTranslateIdStatus.g.cs @@ -57,6 +57,22 @@ partial void ProcessV2VideoTranslateIdStatusResponse( public async global::System.Threading.Tasks.Task V2VideoTranslateIdStatusAsync( global::HeyGen.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await V2VideoTranslateIdStatusAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// v2/video_translate/<id> (status)
+ /// v2/video_translate/<id> (status) + ///
+ /// 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 V2VideoTranslateIdStatusAsResponseAsync( + global::HeyGen.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -85,6 +101,7 @@ partial void ProcessV2VideoTranslateIdStatusResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::HeyGen.PathBuilder( path: "/v2/video_translate/", baseUri: ResolveBaseUri( @@ -159,6 +176,8 @@ partial void ProcessV2VideoTranslateIdStatusResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -169,6 +188,11 @@ partial void ProcessV2VideoTranslateIdStatusResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::HeyGen.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::HeyGen.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -186,6 +210,8 @@ partial void ProcessV2VideoTranslateIdStatusResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -195,8 +221,7 @@ partial void ProcessV2VideoTranslateIdStatusResponse( __httpRequest.Dispose(); __httpRequest = null; await global::HeyGen.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -205,6 +230,11 @@ partial void ProcessV2VideoTranslateIdStatusResponse( __attempt < __maxAttempts && global::HeyGen.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::HeyGen.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::HeyGen.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::HeyGen.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -221,14 +251,15 @@ partial void ProcessV2VideoTranslateIdStatusResponse( 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::HeyGen.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -268,6 +299,8 @@ partial void ProcessV2VideoTranslateIdStatusResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -288,6 +321,8 @@ partial void ProcessV2VideoTranslateIdStatusResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -308,6 +343,10 @@ partial void ProcessV2VideoTranslateIdStatusResponse( { __response.EnsureSuccessStatusCode(); + return new global::HeyGen.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::HeyGen.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -329,6 +368,10 @@ partial void ProcessV2VideoTranslateIdStatusResponse( try { __response.EnsureSuccessStatusCode(); + return new global::HeyGen.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::HeyGen.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/HeyGen/Generated/HeyGen.VideoTranslateApiClient.V2VideoTranslateTargetLanguages.g.cs b/src/libs/HeyGen/Generated/HeyGen.VideoTranslateApiClient.V2VideoTranslateTargetLanguages.g.cs index 8d1029c..83f4d93 100644 --- a/src/libs/HeyGen/Generated/HeyGen.VideoTranslateApiClient.V2VideoTranslateTargetLanguages.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.VideoTranslateApiClient.V2VideoTranslateTargetLanguages.g.cs @@ -57,6 +57,22 @@ partial void ProcessV2VideoTranslateTargetLanguagesResponse( public async global::System.Threading.Tasks.Task V2VideoTranslateTargetLanguagesAsync( global::HeyGen.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await V2VideoTranslateTargetLanguagesAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// v2/video_translate/target_languages
+ /// v2/video_translate/target_languages + ///
+ /// 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 V2VideoTranslateTargetLanguagesAsResponseAsync( + global::HeyGen.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -85,6 +101,7 @@ partial void ProcessV2VideoTranslateTargetLanguagesResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::HeyGen.PathBuilder( path: "/v2/video_translate/target_languages", baseUri: ResolveBaseUri( @@ -159,6 +176,8 @@ partial void ProcessV2VideoTranslateTargetLanguagesResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -169,6 +188,11 @@ partial void ProcessV2VideoTranslateTargetLanguagesResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::HeyGen.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::HeyGen.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -186,6 +210,8 @@ partial void ProcessV2VideoTranslateTargetLanguagesResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -195,8 +221,7 @@ partial void ProcessV2VideoTranslateTargetLanguagesResponse( __httpRequest.Dispose(); __httpRequest = null; await global::HeyGen.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -205,6 +230,11 @@ partial void ProcessV2VideoTranslateTargetLanguagesResponse( __attempt < __maxAttempts && global::HeyGen.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::HeyGen.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::HeyGen.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::HeyGen.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -221,14 +251,15 @@ partial void ProcessV2VideoTranslateTargetLanguagesResponse( 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::HeyGen.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -268,6 +299,8 @@ partial void ProcessV2VideoTranslateTargetLanguagesResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -288,6 +321,8 @@ partial void ProcessV2VideoTranslateTargetLanguagesResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -308,6 +343,10 @@ partial void ProcessV2VideoTranslateTargetLanguagesResponse( { __response.EnsureSuccessStatusCode(); + return new global::HeyGen.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::HeyGen.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -329,6 +368,10 @@ partial void ProcessV2VideoTranslateTargetLanguagesResponse( try { __response.EnsureSuccessStatusCode(); + return new global::HeyGen.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::HeyGen.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/HeyGen/Generated/HeyGen.VideoTranslateApiClient.g.cs b/src/libs/HeyGen/Generated/HeyGen.VideoTranslateApiClient.g.cs index 3968889..c328e5a 100644 --- a/src/libs/HeyGen/Generated/HeyGen.VideoTranslateApiClient.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.VideoTranslateApiClient.g.cs @@ -105,10 +105,10 @@ public VideoTranslateApiClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public VideoTranslateApiClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::HeyGen.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::HeyGen.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/HeyGen/Generated/HeyGen.WebhooksClient.V1WebhookEndpointAdd.g.cs b/src/libs/HeyGen/Generated/HeyGen.WebhooksClient.V1WebhookEndpointAdd.g.cs index e3015a3..5c9c4c4 100644 --- a/src/libs/HeyGen/Generated/HeyGen.WebhooksClient.V1WebhookEndpointAdd.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.WebhooksClient.V1WebhookEndpointAdd.g.cs @@ -59,6 +59,27 @@ partial void ProcessV1WebhookEndpointAddResponse( /// public async global::System.Threading.Tasks.Task V1WebhookEndpointAddAsync( + global::HeyGen.V1WebhookEndpointAddRequest request, + global::HeyGen.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + await V1WebhookEndpointAddAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// v1/webhook/endpoint.add
+ /// v1/webhook/endpoint.add + ///
+ /// + /// 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 V1WebhookEndpointAddAsResponseAsync( + global::HeyGen.V1WebhookEndpointAddRequest request, global::HeyGen.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -93,6 +114,7 @@ partial void ProcessV1WebhookEndpointAddResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::HeyGen.PathBuilder( path: "/v1/webhook/endpoint.add", baseUri: ResolveBaseUri( @@ -174,6 +196,8 @@ partial void ProcessV1WebhookEndpointAddResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -184,6 +208,11 @@ partial void ProcessV1WebhookEndpointAddResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::HeyGen.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::HeyGen.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -201,6 +230,8 @@ partial void ProcessV1WebhookEndpointAddResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -210,8 +241,7 @@ partial void ProcessV1WebhookEndpointAddResponse( __httpRequest.Dispose(); __httpRequest = null; await global::HeyGen.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -220,6 +250,11 @@ partial void ProcessV1WebhookEndpointAddResponse( __attempt < __maxAttempts && global::HeyGen.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::HeyGen.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::HeyGen.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::HeyGen.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -236,14 +271,15 @@ partial void ProcessV1WebhookEndpointAddResponse( 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::HeyGen.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -283,6 +319,8 @@ partial void ProcessV1WebhookEndpointAddResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -303,6 +341,8 @@ partial void ProcessV1WebhookEndpointAddResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -323,6 +363,10 @@ partial void ProcessV1WebhookEndpointAddResponse( { __response.EnsureSuccessStatusCode(); + return new global::HeyGen.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::HeyGen.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -344,6 +388,10 @@ partial void ProcessV1WebhookEndpointAddResponse( try { __response.EnsureSuccessStatusCode(); + return new global::HeyGen.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::HeyGen.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/HeyGen/Generated/HeyGen.WebhooksClient.V1WebhookEndpointDelete.g.cs b/src/libs/HeyGen/Generated/HeyGen.WebhooksClient.V1WebhookEndpointDelete.g.cs index 1a7b90a..a9539a8 100644 --- a/src/libs/HeyGen/Generated/HeyGen.WebhooksClient.V1WebhookEndpointDelete.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.WebhooksClient.V1WebhookEndpointDelete.g.cs @@ -63,6 +63,27 @@ partial void ProcessV1WebhookEndpointDeleteResponse( string? endpointId = default, global::HeyGen.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await V1WebhookEndpointDeleteAsResponseAsync( + endpointId: endpointId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// v1/webhook/endpoint.delete
+ /// v1/webhook/endpoint.delete + ///
+ /// + /// Example: <endpoint_id> + /// + /// 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 V1WebhookEndpointDeleteAsResponseAsync( + string? endpointId = default, + global::HeyGen.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -92,13 +113,14 @@ partial void ProcessV1WebhookEndpointDeleteResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::HeyGen.PathBuilder( path: "/v1/webhook/endpoint.delete", baseUri: ResolveBaseUri( servers: s_V1WebhookEndpointDeleteServers, - defaultBaseUrl: "https://api.heygen.com/")); + defaultBaseUrl: "https://api.heygen.com/")); __pathBuilder - .AddOptionalParameter("endpoint_id", endpointId) + .AddOptionalParameter("endpoint_id", endpointId) ; var __path = __pathBuilder.ToString(); __path = global::HeyGen.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -170,6 +192,8 @@ partial void ProcessV1WebhookEndpointDeleteResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -180,6 +204,11 @@ partial void ProcessV1WebhookEndpointDeleteResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::HeyGen.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::HeyGen.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -197,6 +226,8 @@ partial void ProcessV1WebhookEndpointDeleteResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -206,8 +237,7 @@ partial void ProcessV1WebhookEndpointDeleteResponse( __httpRequest.Dispose(); __httpRequest = null; await global::HeyGen.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -216,6 +246,11 @@ partial void ProcessV1WebhookEndpointDeleteResponse( __attempt < __maxAttempts && global::HeyGen.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::HeyGen.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::HeyGen.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::HeyGen.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -232,14 +267,15 @@ partial void ProcessV1WebhookEndpointDeleteResponse( 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::HeyGen.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -279,6 +315,8 @@ partial void ProcessV1WebhookEndpointDeleteResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -299,6 +337,8 @@ partial void ProcessV1WebhookEndpointDeleteResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -319,6 +359,10 @@ partial void ProcessV1WebhookEndpointDeleteResponse( { __response.EnsureSuccessStatusCode(); + return new global::HeyGen.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::HeyGen.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -340,6 +384,10 @@ partial void ProcessV1WebhookEndpointDeleteResponse( try { __response.EnsureSuccessStatusCode(); + return new global::HeyGen.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::HeyGen.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/HeyGen/Generated/HeyGen.WebhooksClient.V1WebhookEndpointList.g.cs b/src/libs/HeyGen/Generated/HeyGen.WebhooksClient.V1WebhookEndpointList.g.cs index d6a7ef5..dfb4830 100644 --- a/src/libs/HeyGen/Generated/HeyGen.WebhooksClient.V1WebhookEndpointList.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.WebhooksClient.V1WebhookEndpointList.g.cs @@ -57,6 +57,22 @@ partial void ProcessV1WebhookEndpointListResponse( public async global::System.Threading.Tasks.Task V1WebhookEndpointListAsync( global::HeyGen.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await V1WebhookEndpointListAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// v1/webhook/endpoint.list
+ /// v1/webhook/endpoint.list + ///
+ /// 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 V1WebhookEndpointListAsResponseAsync( + global::HeyGen.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -85,6 +101,7 @@ partial void ProcessV1WebhookEndpointListResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::HeyGen.PathBuilder( path: "/v1/webhook/endpoint.list", baseUri: ResolveBaseUri( @@ -159,6 +176,8 @@ partial void ProcessV1WebhookEndpointListResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -169,6 +188,11 @@ partial void ProcessV1WebhookEndpointListResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::HeyGen.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::HeyGen.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -186,6 +210,8 @@ partial void ProcessV1WebhookEndpointListResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -195,8 +221,7 @@ partial void ProcessV1WebhookEndpointListResponse( __httpRequest.Dispose(); __httpRequest = null; await global::HeyGen.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -205,6 +230,11 @@ partial void ProcessV1WebhookEndpointListResponse( __attempt < __maxAttempts && global::HeyGen.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::HeyGen.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::HeyGen.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::HeyGen.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -221,14 +251,15 @@ partial void ProcessV1WebhookEndpointListResponse( 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::HeyGen.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -268,6 +299,8 @@ partial void ProcessV1WebhookEndpointListResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -288,6 +321,8 @@ partial void ProcessV1WebhookEndpointListResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -308,6 +343,10 @@ partial void ProcessV1WebhookEndpointListResponse( { __response.EnsureSuccessStatusCode(); + return new global::HeyGen.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::HeyGen.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -329,6 +368,10 @@ partial void ProcessV1WebhookEndpointListResponse( try { __response.EnsureSuccessStatusCode(); + return new global::HeyGen.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::HeyGen.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/HeyGen/Generated/HeyGen.WebhooksClient.V1WebhookWebhookList.g.cs b/src/libs/HeyGen/Generated/HeyGen.WebhooksClient.V1WebhookWebhookList.g.cs index 3821c21..c6b56c2 100644 --- a/src/libs/HeyGen/Generated/HeyGen.WebhooksClient.V1WebhookWebhookList.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.WebhooksClient.V1WebhookWebhookList.g.cs @@ -57,6 +57,22 @@ partial void ProcessV1WebhookWebhookListResponse( public async global::System.Threading.Tasks.Task V1WebhookWebhookListAsync( global::HeyGen.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await V1WebhookWebhookListAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// v1/webhook/webhook.list
+ /// v1/webhook/webhook.list + ///
+ /// 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 V1WebhookWebhookListAsResponseAsync( + global::HeyGen.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -85,6 +101,7 @@ partial void ProcessV1WebhookWebhookListResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::HeyGen.PathBuilder( path: "/v1/webhook/webhook.list", baseUri: ResolveBaseUri( @@ -159,6 +176,8 @@ partial void ProcessV1WebhookWebhookListResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -169,6 +188,11 @@ partial void ProcessV1WebhookWebhookListResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::HeyGen.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::HeyGen.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -186,6 +210,8 @@ partial void ProcessV1WebhookWebhookListResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -195,8 +221,7 @@ partial void ProcessV1WebhookWebhookListResponse( __httpRequest.Dispose(); __httpRequest = null; await global::HeyGen.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -205,6 +230,11 @@ partial void ProcessV1WebhookWebhookListResponse( __attempt < __maxAttempts && global::HeyGen.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::HeyGen.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::HeyGen.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::HeyGen.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -221,14 +251,15 @@ partial void ProcessV1WebhookWebhookListResponse( 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::HeyGen.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -268,6 +299,8 @@ partial void ProcessV1WebhookWebhookListResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -288,6 +321,8 @@ partial void ProcessV1WebhookWebhookListResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -308,6 +343,10 @@ partial void ProcessV1WebhookWebhookListResponse( { __response.EnsureSuccessStatusCode(); + return new global::HeyGen.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::HeyGen.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -329,6 +368,10 @@ partial void ProcessV1WebhookWebhookListResponse( try { __response.EnsureSuccessStatusCode(); + return new global::HeyGen.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::HeyGen.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/HeyGen/Generated/HeyGen.WebhooksClient.g.cs b/src/libs/HeyGen/Generated/HeyGen.WebhooksClient.g.cs index 4416404..70ba09f 100644 --- a/src/libs/HeyGen/Generated/HeyGen.WebhooksClient.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.WebhooksClient.g.cs @@ -105,10 +105,10 @@ public WebhooksClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public WebhooksClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::HeyGen.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::HeyGen.AutoSDKClientOptions? options, bool disposeHttpClient = true) {