From dc18d2902f9d28a31fa2d7be453be1ae409dfbd3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 1 Jul 2026 22:14:41 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- .../HeyGen.AssetsClient.V1AssetUpload.g.cs | 24 ++-- ...en.CreateVideoApiClient.V1VideoDelete.g.cs | 24 ++-- ....CreateVideoApiClient.V2VideoGenerate.g.cs | 24 ++-- .../HeyGen/Generated/HeyGen.Exceptions.g.cs | 134 ++++++++++++++++++ .../HeyGen.HeyGenClient.V1VideoStatusGet.g.cs | 24 ++-- .../HeyGen.ListsClient.V1AvatarList.g.cs | 24 ++-- .../HeyGen.ListsClient.V1VideoList.g.cs | 24 ++-- .../HeyGen.ListsClient.V1VoiceList.g.cs | 24 ++-- .../HeyGen.ListsClient.V2Avatars.g.cs | 24 ++-- .../HeyGen.ListsClient.V2Voices.g.cs | 24 ++-- ...rsonalizedVideoAddContactRequest.Json.g.cs | 49 +++++++ ...dContactRequestVariablesListItem.Json.g.cs | 49 +++++++ ...dels.StreamingCreateTokenRequest.Json.g.cs | 49 +++++++ ...eyGen.Models.StreamingIceRequest.Json.g.cs | 49 +++++++ ...els.StreamingIceRequestCandidate.Json.g.cs | 49 +++++++ ...Models.StreamingInterruptRequest.Json.g.cs | 49 +++++++ ...eyGen.Models.StreamingNewRequest.Json.g.cs | 49 +++++++ ...Gen.Models.StreamingStartRequest.Json.g.cs | 49 +++++++ ....Models.StreamingStartRequestSdp.Json.g.cs | 49 +++++++ ...yGen.Models.StreamingStopRequest.Json.g.cs | 49 +++++++ ...yGen.Models.StreamingTaskRequest.Json.g.cs | 49 +++++++ ...dels.V1WebhookEndpointAddRequest.Json.g.cs | 49 +++++++ ...V1WebhookEndpointAddRequestEvent.Json.g.cs | 49 +++++++ ...Models.V2TemplateGenerateRequest.Json.g.cs | 49 +++++++ ...TemplateGenerateRequestDimension.Json.g.cs | 49 +++++++ ...TemplateGenerateRequestVariables.Json.g.cs | 49 +++++++ ...enerateRequestVariablesFirstName.Json.g.cs | 49 +++++++ ...uestVariablesFirstNameProperties.Json.g.cs | 49 +++++++ ...en.Models.V2VideoGenerateRequest.Json.g.cs | 49 +++++++ ....V2VideoGenerateRequestDimension.Json.g.cs | 49 +++++++ ...V2VideoGenerateRequestVideoInput.Json.g.cs | 49 +++++++ ...nerateRequestVideoInputCharacter.Json.g.cs | 49 +++++++ ...eoGenerateRequestVideoInputVoice.Json.g.cs | 49 +++++++ ...n.Models.V2VideoTranslateRequest.Json.g.cs | 49 +++++++ ...deoClient.PersonalizedVideoAddContact.g.cs | 24 ++-- ...lient.PersonalizedVideoAudienceDetail.g.cs | 24 ++-- ...Client.PersonalizedVideoProjectDetail.g.cs | 24 ++-- ...treamingApiClient.StreamingAvatarList.g.cs | 24 ++-- ...reamingApiClient.StreamingCreateToken.g.cs | 24 ++-- ...eyGen.StreamingApiClient.StreamingIce.g.cs | 24 ++-- ...StreamingApiClient.StreamingInterrupt.g.cs | 24 ++-- ...yGen.StreamingApiClient.StreamingList.g.cs | 24 ++-- ...eyGen.StreamingApiClient.StreamingNew.g.cs | 24 ++-- ...Gen.StreamingApiClient.StreamingStart.g.cs | 24 ++-- ...yGen.StreamingApiClient.StreamingStop.g.cs | 24 ++-- ...yGen.StreamingApiClient.StreamingTask.g.cs | 24 ++-- ...TalkingPhotoClient.V1TalkingPhotoList.g.cs | 24 ++-- ...lkingPhotoClient.V1TalkingPhotoUpload.g.cs | 24 ++-- ...ingPhotoClient.V2TalkingPhotoIdDelete.g.cs | 24 ++-- ....TemplateApiClient.V2TemplateGenerate.g.cs | 24 ++-- ...HeyGen.TemplateApiClient.V2TemplateId.g.cs | 24 ++-- .../HeyGen.TemplateApiClient.V2Templates.g.cs | 24 ++-- ...eyGen.UserClient.V2UserRemainingQuota.g.cs | 24 ++-- ...eoTranslateApiClient.V2VideoTranslate.g.cs | 24 ++-- ...ateApiClient.V2VideoTranslateIdStatus.g.cs | 24 ++-- ...lient.V2VideoTranslateTargetLanguages.g.cs | 24 ++-- ...n.WebhooksClient.V1WebhookEndpointAdd.g.cs | 24 ++-- ...ebhooksClient.V1WebhookEndpointDelete.g.cs | 24 ++-- ....WebhooksClient.V1WebhookEndpointList.g.cs | 24 ++-- ...n.WebhooksClient.V1WebhookWebhookList.g.cs | 24 ++-- 60 files changed, 1660 insertions(+), 490 deletions(-) diff --git a/src/libs/HeyGen/Generated/HeyGen.AssetsClient.V1AssetUpload.g.cs b/src/libs/HeyGen/Generated/HeyGen.AssetsClient.V1AssetUpload.g.cs index 32580f3..a8e41b7 100644 --- a/src/libs/HeyGen/Generated/HeyGen.AssetsClient.V1AssetUpload.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.AssetsClient.V1AssetUpload.g.cs @@ -350,17 +350,15 @@ await V1AssetUploadAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::HeyGen.ApiException( + throw global::HeyGen.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -388,17 +386,15 @@ await V1AssetUploadAsResponseAsync( { } - throw new global::HeyGen.ApiException( + throw global::HeyGen.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/HeyGen/Generated/HeyGen.CreateVideoApiClient.V1VideoDelete.g.cs b/src/libs/HeyGen/Generated/HeyGen.CreateVideoApiClient.V1VideoDelete.g.cs index fcd5df8..b6f8a2a 100644 --- a/src/libs/HeyGen/Generated/HeyGen.CreateVideoApiClient.V1VideoDelete.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.CreateVideoApiClient.V1VideoDelete.g.cs @@ -366,17 +366,15 @@ await V1VideoDeleteAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::HeyGen.ApiException( + throw global::HeyGen.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -404,17 +402,15 @@ await V1VideoDeleteAsResponseAsync( { } - throw new global::HeyGen.ApiException( + throw global::HeyGen.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/HeyGen/Generated/HeyGen.CreateVideoApiClient.V2VideoGenerate.g.cs b/src/libs/HeyGen/Generated/HeyGen.CreateVideoApiClient.V2VideoGenerate.g.cs index 861799b..56627c2 100644 --- a/src/libs/HeyGen/Generated/HeyGen.CreateVideoApiClient.V2VideoGenerate.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.CreateVideoApiClient.V2VideoGenerate.g.cs @@ -372,17 +372,15 @@ await V2VideoGenerateAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::HeyGen.ApiException( + throw global::HeyGen.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -410,17 +408,15 @@ await V2VideoGenerateAsResponseAsync( { } - throw new global::HeyGen.ApiException( + throw global::HeyGen.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/HeyGen/Generated/HeyGen.Exceptions.g.cs b/src/libs/HeyGen/Generated/HeyGen.Exceptions.g.cs index 296adc5..5a8c21e 100644 --- a/src/libs/HeyGen/Generated/HeyGen.Exceptions.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.Exceptions.g.cs @@ -12,16 +12,19 @@ public partial class ApiException : global::System.Exception /// The HTTP status code of the response. /// public global::System.Net.HttpStatusCode StatusCode { get; } + /// /// The response body as a string, or null if the body could not be read. /// This is always populated for error responses regardless of the ReadResponseAsString setting. /// For success-path failures (e.g. deserialization errors), the client attempts a best-effort read. /// public string? ResponseBody { get; set; } + /// /// The response headers. /// public global::System.Collections.Generic.Dictionary>? ResponseHeaders { get; set; } + /// /// Initializes a new instance of the class. /// @@ -49,6 +52,103 @@ public ApiException(string message, global::System.Exception? innerException, gl { StatusCode = statusCode; } + + /// + /// Constructs an instance whose runtime type matches the response status code when the typed exception hierarchy is enabled. Always returns a plain when the hierarchy is disabled. + /// + /// The HTTP status code of the response. + /// The error message. + /// An inner exception, when one is available. + /// The response headers; consulted for 429 Retry-After parsing when present. + public static global::HeyGen.ApiException Create( + global::System.Net.HttpStatusCode statusCode, + string message, + global::System.Exception? innerException = null, + global::System.Collections.Generic.IDictionary>? responseHeaders = null) + { + return new global::HeyGen.ApiException(message, innerException, statusCode); + } + + /// + /// Convenience overload that constructs an with response body and headers populated. + /// + public static global::HeyGen.ApiException Create( + global::System.Net.HttpStatusCode statusCode, + string message, + global::System.Exception? innerException, + string? responseBody, + global::System.Collections.Generic.Dictionary>? responseHeaders) + { + var exception = global::HeyGen.ApiException.Create(statusCode, message, innerException, responseHeaders); + exception.ResponseBody = responseBody; + exception.ResponseHeaders = responseHeaders; + return exception; + } + + /// + /// Parses a Retry-After response header (delta-seconds or HTTP-date) into a . + /// Returns null when the header is missing or unparseable. Public so consumer code that observes + /// directly can recover the value without re-implementing the parser. + /// + public static global::System.TimeSpan? TryParseRetryAfter( + global::System.Collections.Generic.IDictionary>? headers) + { + if (headers == null) + { + return null; + } + + global::System.Collections.Generic.IEnumerable? values = null; + foreach (var entry in headers) + { + if (string.Equals(entry.Key, "Retry-After", global::System.StringComparison.OrdinalIgnoreCase)) + { + values = entry.Value; + break; + } + } + + if (values == null) + { + return null; + } + + string? raw = null; + foreach (var value in values) + { + if (!string.IsNullOrWhiteSpace(value)) + { + raw = value.Trim(); + break; + } + } + + if (string.IsNullOrEmpty(raw)) + { + return null; + } + + if (int.TryParse( + raw, + global::System.Globalization.NumberStyles.Integer, + global::System.Globalization.CultureInfo.InvariantCulture, + out var seconds) && seconds >= 0) + { + return global::System.TimeSpan.FromSeconds(seconds); + } + + if (global::System.DateTimeOffset.TryParse( + raw, + global::System.Globalization.CultureInfo.InvariantCulture, + global::System.Globalization.DateTimeStyles.AssumeUniversal | global::System.Globalization.DateTimeStyles.AdjustToUniversal, + out var when)) + { + var delta = when - global::System.DateTimeOffset.UtcNow; + return delta > global::System.TimeSpan.Zero ? delta : global::System.TimeSpan.Zero; + } + + return null; + } } /// @@ -88,5 +188,39 @@ public ApiException(string message, global::System.Net.HttpStatusCode statusCode public ApiException(string message, global::System.Exception? innerException, global::System.Net.HttpStatusCode statusCode) : base(message, innerException, statusCode) { } + + /// + /// Constructs an whose runtime type matches the response status code when the typed exception hierarchy is enabled. + /// + /// The HTTP status code of the response. + /// The error message. + /// An inner exception, when one is available. + /// The response headers; consulted for 429 Retry-After parsing when present. + public static new global::HeyGen.ApiException Create( + global::System.Net.HttpStatusCode statusCode, + string message, + global::System.Exception? innerException = null, + global::System.Collections.Generic.IDictionary>? responseHeaders = null) + { + return new global::HeyGen.ApiException(message, innerException, statusCode); + } + + /// + /// Convenience overload that constructs an with response body, object, and headers populated. + /// + public static global::HeyGen.ApiException Create( + global::System.Net.HttpStatusCode statusCode, + string message, + global::System.Exception? innerException, + string? responseBody, + T? responseObject, + global::System.Collections.Generic.Dictionary>? responseHeaders) + { + var exception = global::HeyGen.ApiException.Create(statusCode, message, innerException, responseHeaders); + exception.ResponseBody = responseBody; + exception.ResponseObject = responseObject; + exception.ResponseHeaders = responseHeaders; + return exception; + } } } \ No newline at end of file diff --git a/src/libs/HeyGen/Generated/HeyGen.HeyGenClient.V1VideoStatusGet.g.cs b/src/libs/HeyGen/Generated/HeyGen.HeyGenClient.V1VideoStatusGet.g.cs index ab38fd0..f586556 100644 --- a/src/libs/HeyGen/Generated/HeyGen.HeyGenClient.V1VideoStatusGet.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.HeyGenClient.V1VideoStatusGet.g.cs @@ -366,17 +366,15 @@ await V1VideoStatusGetAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::HeyGen.ApiException( + throw global::HeyGen.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -404,17 +402,15 @@ await V1VideoStatusGetAsResponseAsync( { } - throw new global::HeyGen.ApiException( + throw global::HeyGen.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/HeyGen/Generated/HeyGen.ListsClient.V1AvatarList.g.cs b/src/libs/HeyGen/Generated/HeyGen.ListsClient.V1AvatarList.g.cs index 217fd05..e5f9249 100644 --- a/src/libs/HeyGen/Generated/HeyGen.ListsClient.V1AvatarList.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.ListsClient.V1AvatarList.g.cs @@ -350,17 +350,15 @@ await V1AvatarListAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::HeyGen.ApiException( + throw global::HeyGen.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -388,17 +386,15 @@ await V1AvatarListAsResponseAsync( { } - throw new global::HeyGen.ApiException( + throw global::HeyGen.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/HeyGen/Generated/HeyGen.ListsClient.V1VideoList.g.cs b/src/libs/HeyGen/Generated/HeyGen.ListsClient.V1VideoList.g.cs index 4869c5f..9476e4d 100644 --- a/src/libs/HeyGen/Generated/HeyGen.ListsClient.V1VideoList.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.ListsClient.V1VideoList.g.cs @@ -350,17 +350,15 @@ await V1VideoListAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::HeyGen.ApiException( + throw global::HeyGen.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -388,17 +386,15 @@ await V1VideoListAsResponseAsync( { } - throw new global::HeyGen.ApiException( + throw global::HeyGen.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/HeyGen/Generated/HeyGen.ListsClient.V1VoiceList.g.cs b/src/libs/HeyGen/Generated/HeyGen.ListsClient.V1VoiceList.g.cs index b0f6fc8..613717d 100644 --- a/src/libs/HeyGen/Generated/HeyGen.ListsClient.V1VoiceList.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.ListsClient.V1VoiceList.g.cs @@ -350,17 +350,15 @@ await V1VoiceListAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::HeyGen.ApiException( + throw global::HeyGen.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -388,17 +386,15 @@ await V1VoiceListAsResponseAsync( { } - throw new global::HeyGen.ApiException( + throw global::HeyGen.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/HeyGen/Generated/HeyGen.ListsClient.V2Avatars.g.cs b/src/libs/HeyGen/Generated/HeyGen.ListsClient.V2Avatars.g.cs index 7a155e2..24b6315 100644 --- a/src/libs/HeyGen/Generated/HeyGen.ListsClient.V2Avatars.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.ListsClient.V2Avatars.g.cs @@ -350,17 +350,15 @@ await V2AvatarsAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::HeyGen.ApiException( + throw global::HeyGen.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -388,17 +386,15 @@ await V2AvatarsAsResponseAsync( { } - throw new global::HeyGen.ApiException( + throw global::HeyGen.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/HeyGen/Generated/HeyGen.ListsClient.V2Voices.g.cs b/src/libs/HeyGen/Generated/HeyGen.ListsClient.V2Voices.g.cs index 0460233..5e73b84 100644 --- a/src/libs/HeyGen/Generated/HeyGen.ListsClient.V2Voices.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.ListsClient.V2Voices.g.cs @@ -350,17 +350,15 @@ await V2VoicesAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::HeyGen.ApiException( + throw global::HeyGen.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -388,17 +386,15 @@ await V2VoicesAsResponseAsync( { } - throw new global::HeyGen.ApiException( + throw global::HeyGen.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/HeyGen/Generated/HeyGen.Models.PersonalizedVideoAddContactRequest.Json.g.cs b/src/libs/HeyGen/Generated/HeyGen.Models.PersonalizedVideoAddContactRequest.Json.g.cs index 887c872..4bed7a6 100644 --- a/src/libs/HeyGen/Generated/HeyGen.Models.PersonalizedVideoAddContactRequest.Json.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.Models.PersonalizedVideoAddContactRequest.Json.g.cs @@ -16,6 +16,14 @@ public string ToJson( jsonSerializerContext); } + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::HeyGen.SourceGenerationContext.Default); + } + /// /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. /// @@ -26,6 +34,11 @@ public string ToJson( public string ToJson( global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return ToJson(global::HeyGen.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Serialize( this, jsonSerializerOptions); @@ -44,6 +57,17 @@ public string ToJson( jsonSerializerContext) as global::HeyGen.PersonalizedVideoAddContactRequest; } + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::HeyGen.PersonalizedVideoAddContactRequest? FromJson( + string json) + { + return FromJson( + json, + global::HeyGen.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON string using the provided JsonSerializerOptions. /// @@ -55,6 +79,13 @@ public string ToJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::HeyGen.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); @@ -73,6 +104,17 @@ public string ToJson( jsonSerializerContext).ConfigureAwait(false)) as global::HeyGen.PersonalizedVideoAddContactRequest; } + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::HeyGen.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON stream using the provided JsonSerializerOptions. /// @@ -84,6 +126,13 @@ public string ToJson( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::HeyGen.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); diff --git a/src/libs/HeyGen/Generated/HeyGen.Models.PersonalizedVideoAddContactRequestVariablesListItem.Json.g.cs b/src/libs/HeyGen/Generated/HeyGen.Models.PersonalizedVideoAddContactRequestVariablesListItem.Json.g.cs index a45ec18..c0ac456 100644 --- a/src/libs/HeyGen/Generated/HeyGen.Models.PersonalizedVideoAddContactRequestVariablesListItem.Json.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.Models.PersonalizedVideoAddContactRequestVariablesListItem.Json.g.cs @@ -16,6 +16,14 @@ public string ToJson( jsonSerializerContext); } + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::HeyGen.SourceGenerationContext.Default); + } + /// /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. /// @@ -26,6 +34,11 @@ public string ToJson( public string ToJson( global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return ToJson(global::HeyGen.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Serialize( this, jsonSerializerOptions); @@ -44,6 +57,17 @@ public string ToJson( jsonSerializerContext) as global::HeyGen.PersonalizedVideoAddContactRequestVariablesListItem; } + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::HeyGen.PersonalizedVideoAddContactRequestVariablesListItem? FromJson( + string json) + { + return FromJson( + json, + global::HeyGen.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON string using the provided JsonSerializerOptions. /// @@ -55,6 +79,13 @@ public string ToJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::HeyGen.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); @@ -73,6 +104,17 @@ public string ToJson( jsonSerializerContext).ConfigureAwait(false)) as global::HeyGen.PersonalizedVideoAddContactRequestVariablesListItem; } + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::HeyGen.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON stream using the provided JsonSerializerOptions. /// @@ -84,6 +126,13 @@ public string ToJson( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::HeyGen.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); diff --git a/src/libs/HeyGen/Generated/HeyGen.Models.StreamingCreateTokenRequest.Json.g.cs b/src/libs/HeyGen/Generated/HeyGen.Models.StreamingCreateTokenRequest.Json.g.cs index b45b01e..680ed72 100644 --- a/src/libs/HeyGen/Generated/HeyGen.Models.StreamingCreateTokenRequest.Json.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.Models.StreamingCreateTokenRequest.Json.g.cs @@ -16,6 +16,14 @@ public string ToJson( jsonSerializerContext); } + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::HeyGen.SourceGenerationContext.Default); + } + /// /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. /// @@ -26,6 +34,11 @@ public string ToJson( public string ToJson( global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return ToJson(global::HeyGen.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Serialize( this, jsonSerializerOptions); @@ -44,6 +57,17 @@ public string ToJson( jsonSerializerContext) as global::HeyGen.StreamingCreateTokenRequest; } + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::HeyGen.StreamingCreateTokenRequest? FromJson( + string json) + { + return FromJson( + json, + global::HeyGen.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON string using the provided JsonSerializerOptions. /// @@ -55,6 +79,13 @@ public string ToJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::HeyGen.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); @@ -73,6 +104,17 @@ public string ToJson( jsonSerializerContext).ConfigureAwait(false)) as global::HeyGen.StreamingCreateTokenRequest; } + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::HeyGen.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON stream using the provided JsonSerializerOptions. /// @@ -84,6 +126,13 @@ public string ToJson( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::HeyGen.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); diff --git a/src/libs/HeyGen/Generated/HeyGen.Models.StreamingIceRequest.Json.g.cs b/src/libs/HeyGen/Generated/HeyGen.Models.StreamingIceRequest.Json.g.cs index 08e69a2..b2fee21 100644 --- a/src/libs/HeyGen/Generated/HeyGen.Models.StreamingIceRequest.Json.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.Models.StreamingIceRequest.Json.g.cs @@ -16,6 +16,14 @@ public string ToJson( jsonSerializerContext); } + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::HeyGen.SourceGenerationContext.Default); + } + /// /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. /// @@ -26,6 +34,11 @@ public string ToJson( public string ToJson( global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return ToJson(global::HeyGen.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Serialize( this, jsonSerializerOptions); @@ -44,6 +57,17 @@ public string ToJson( jsonSerializerContext) as global::HeyGen.StreamingIceRequest; } + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::HeyGen.StreamingIceRequest? FromJson( + string json) + { + return FromJson( + json, + global::HeyGen.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON string using the provided JsonSerializerOptions. /// @@ -55,6 +79,13 @@ public string ToJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::HeyGen.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); @@ -73,6 +104,17 @@ public string ToJson( jsonSerializerContext).ConfigureAwait(false)) as global::HeyGen.StreamingIceRequest; } + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::HeyGen.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON stream using the provided JsonSerializerOptions. /// @@ -84,6 +126,13 @@ public string ToJson( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::HeyGen.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); diff --git a/src/libs/HeyGen/Generated/HeyGen.Models.StreamingIceRequestCandidate.Json.g.cs b/src/libs/HeyGen/Generated/HeyGen.Models.StreamingIceRequestCandidate.Json.g.cs index fdc3aed..d722a89 100644 --- a/src/libs/HeyGen/Generated/HeyGen.Models.StreamingIceRequestCandidate.Json.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.Models.StreamingIceRequestCandidate.Json.g.cs @@ -16,6 +16,14 @@ public string ToJson( jsonSerializerContext); } + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::HeyGen.SourceGenerationContext.Default); + } + /// /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. /// @@ -26,6 +34,11 @@ public string ToJson( public string ToJson( global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return ToJson(global::HeyGen.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Serialize( this, jsonSerializerOptions); @@ -44,6 +57,17 @@ public string ToJson( jsonSerializerContext) as global::HeyGen.StreamingIceRequestCandidate; } + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::HeyGen.StreamingIceRequestCandidate? FromJson( + string json) + { + return FromJson( + json, + global::HeyGen.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON string using the provided JsonSerializerOptions. /// @@ -55,6 +79,13 @@ public string ToJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::HeyGen.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); @@ -73,6 +104,17 @@ public string ToJson( jsonSerializerContext).ConfigureAwait(false)) as global::HeyGen.StreamingIceRequestCandidate; } + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::HeyGen.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON stream using the provided JsonSerializerOptions. /// @@ -84,6 +126,13 @@ public string ToJson( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::HeyGen.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); diff --git a/src/libs/HeyGen/Generated/HeyGen.Models.StreamingInterruptRequest.Json.g.cs b/src/libs/HeyGen/Generated/HeyGen.Models.StreamingInterruptRequest.Json.g.cs index 9eb5ccf..8df66da 100644 --- a/src/libs/HeyGen/Generated/HeyGen.Models.StreamingInterruptRequest.Json.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.Models.StreamingInterruptRequest.Json.g.cs @@ -16,6 +16,14 @@ public string ToJson( jsonSerializerContext); } + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::HeyGen.SourceGenerationContext.Default); + } + /// /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. /// @@ -26,6 +34,11 @@ public string ToJson( public string ToJson( global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return ToJson(global::HeyGen.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Serialize( this, jsonSerializerOptions); @@ -44,6 +57,17 @@ public string ToJson( jsonSerializerContext) as global::HeyGen.StreamingInterruptRequest; } + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::HeyGen.StreamingInterruptRequest? FromJson( + string json) + { + return FromJson( + json, + global::HeyGen.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON string using the provided JsonSerializerOptions. /// @@ -55,6 +79,13 @@ public string ToJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::HeyGen.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); @@ -73,6 +104,17 @@ public string ToJson( jsonSerializerContext).ConfigureAwait(false)) as global::HeyGen.StreamingInterruptRequest; } + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::HeyGen.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON stream using the provided JsonSerializerOptions. /// @@ -84,6 +126,13 @@ public string ToJson( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::HeyGen.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); diff --git a/src/libs/HeyGen/Generated/HeyGen.Models.StreamingNewRequest.Json.g.cs b/src/libs/HeyGen/Generated/HeyGen.Models.StreamingNewRequest.Json.g.cs index e673ae7..0cd4b1c 100644 --- a/src/libs/HeyGen/Generated/HeyGen.Models.StreamingNewRequest.Json.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.Models.StreamingNewRequest.Json.g.cs @@ -16,6 +16,14 @@ public string ToJson( jsonSerializerContext); } + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::HeyGen.SourceGenerationContext.Default); + } + /// /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. /// @@ -26,6 +34,11 @@ public string ToJson( public string ToJson( global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return ToJson(global::HeyGen.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Serialize( this, jsonSerializerOptions); @@ -44,6 +57,17 @@ public string ToJson( jsonSerializerContext) as global::HeyGen.StreamingNewRequest; } + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::HeyGen.StreamingNewRequest? FromJson( + string json) + { + return FromJson( + json, + global::HeyGen.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON string using the provided JsonSerializerOptions. /// @@ -55,6 +79,13 @@ public string ToJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::HeyGen.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); @@ -73,6 +104,17 @@ public string ToJson( jsonSerializerContext).ConfigureAwait(false)) as global::HeyGen.StreamingNewRequest; } + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::HeyGen.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON stream using the provided JsonSerializerOptions. /// @@ -84,6 +126,13 @@ public string ToJson( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::HeyGen.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); diff --git a/src/libs/HeyGen/Generated/HeyGen.Models.StreamingStartRequest.Json.g.cs b/src/libs/HeyGen/Generated/HeyGen.Models.StreamingStartRequest.Json.g.cs index ad63768..f080a66 100644 --- a/src/libs/HeyGen/Generated/HeyGen.Models.StreamingStartRequest.Json.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.Models.StreamingStartRequest.Json.g.cs @@ -16,6 +16,14 @@ public string ToJson( jsonSerializerContext); } + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::HeyGen.SourceGenerationContext.Default); + } + /// /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. /// @@ -26,6 +34,11 @@ public string ToJson( public string ToJson( global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return ToJson(global::HeyGen.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Serialize( this, jsonSerializerOptions); @@ -44,6 +57,17 @@ public string ToJson( jsonSerializerContext) as global::HeyGen.StreamingStartRequest; } + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::HeyGen.StreamingStartRequest? FromJson( + string json) + { + return FromJson( + json, + global::HeyGen.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON string using the provided JsonSerializerOptions. /// @@ -55,6 +79,13 @@ public string ToJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::HeyGen.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); @@ -73,6 +104,17 @@ public string ToJson( jsonSerializerContext).ConfigureAwait(false)) as global::HeyGen.StreamingStartRequest; } + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::HeyGen.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON stream using the provided JsonSerializerOptions. /// @@ -84,6 +126,13 @@ public string ToJson( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::HeyGen.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); diff --git a/src/libs/HeyGen/Generated/HeyGen.Models.StreamingStartRequestSdp.Json.g.cs b/src/libs/HeyGen/Generated/HeyGen.Models.StreamingStartRequestSdp.Json.g.cs index c0d8d78..c5a2af4 100644 --- a/src/libs/HeyGen/Generated/HeyGen.Models.StreamingStartRequestSdp.Json.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.Models.StreamingStartRequestSdp.Json.g.cs @@ -16,6 +16,14 @@ public string ToJson( jsonSerializerContext); } + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::HeyGen.SourceGenerationContext.Default); + } + /// /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. /// @@ -26,6 +34,11 @@ public string ToJson( public string ToJson( global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return ToJson(global::HeyGen.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Serialize( this, jsonSerializerOptions); @@ -44,6 +57,17 @@ public string ToJson( jsonSerializerContext) as global::HeyGen.StreamingStartRequestSdp; } + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::HeyGen.StreamingStartRequestSdp? FromJson( + string json) + { + return FromJson( + json, + global::HeyGen.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON string using the provided JsonSerializerOptions. /// @@ -55,6 +79,13 @@ public string ToJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::HeyGen.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); @@ -73,6 +104,17 @@ public string ToJson( jsonSerializerContext).ConfigureAwait(false)) as global::HeyGen.StreamingStartRequestSdp; } + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::HeyGen.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON stream using the provided JsonSerializerOptions. /// @@ -84,6 +126,13 @@ public string ToJson( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::HeyGen.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); diff --git a/src/libs/HeyGen/Generated/HeyGen.Models.StreamingStopRequest.Json.g.cs b/src/libs/HeyGen/Generated/HeyGen.Models.StreamingStopRequest.Json.g.cs index 57b5e8b..b31af9f 100644 --- a/src/libs/HeyGen/Generated/HeyGen.Models.StreamingStopRequest.Json.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.Models.StreamingStopRequest.Json.g.cs @@ -16,6 +16,14 @@ public string ToJson( jsonSerializerContext); } + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::HeyGen.SourceGenerationContext.Default); + } + /// /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. /// @@ -26,6 +34,11 @@ public string ToJson( public string ToJson( global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return ToJson(global::HeyGen.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Serialize( this, jsonSerializerOptions); @@ -44,6 +57,17 @@ public string ToJson( jsonSerializerContext) as global::HeyGen.StreamingStopRequest; } + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::HeyGen.StreamingStopRequest? FromJson( + string json) + { + return FromJson( + json, + global::HeyGen.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON string using the provided JsonSerializerOptions. /// @@ -55,6 +79,13 @@ public string ToJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::HeyGen.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); @@ -73,6 +104,17 @@ public string ToJson( jsonSerializerContext).ConfigureAwait(false)) as global::HeyGen.StreamingStopRequest; } + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::HeyGen.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON stream using the provided JsonSerializerOptions. /// @@ -84,6 +126,13 @@ public string ToJson( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::HeyGen.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); diff --git a/src/libs/HeyGen/Generated/HeyGen.Models.StreamingTaskRequest.Json.g.cs b/src/libs/HeyGen/Generated/HeyGen.Models.StreamingTaskRequest.Json.g.cs index 5f35423..034aff3 100644 --- a/src/libs/HeyGen/Generated/HeyGen.Models.StreamingTaskRequest.Json.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.Models.StreamingTaskRequest.Json.g.cs @@ -16,6 +16,14 @@ public string ToJson( jsonSerializerContext); } + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::HeyGen.SourceGenerationContext.Default); + } + /// /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. /// @@ -26,6 +34,11 @@ public string ToJson( public string ToJson( global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return ToJson(global::HeyGen.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Serialize( this, jsonSerializerOptions); @@ -44,6 +57,17 @@ public string ToJson( jsonSerializerContext) as global::HeyGen.StreamingTaskRequest; } + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::HeyGen.StreamingTaskRequest? FromJson( + string json) + { + return FromJson( + json, + global::HeyGen.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON string using the provided JsonSerializerOptions. /// @@ -55,6 +79,13 @@ public string ToJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::HeyGen.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); @@ -73,6 +104,17 @@ public string ToJson( jsonSerializerContext).ConfigureAwait(false)) as global::HeyGen.StreamingTaskRequest; } + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::HeyGen.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON stream using the provided JsonSerializerOptions. /// @@ -84,6 +126,13 @@ public string ToJson( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::HeyGen.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); diff --git a/src/libs/HeyGen/Generated/HeyGen.Models.V1WebhookEndpointAddRequest.Json.g.cs b/src/libs/HeyGen/Generated/HeyGen.Models.V1WebhookEndpointAddRequest.Json.g.cs index ad98c86..d013118 100644 --- a/src/libs/HeyGen/Generated/HeyGen.Models.V1WebhookEndpointAddRequest.Json.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.Models.V1WebhookEndpointAddRequest.Json.g.cs @@ -16,6 +16,14 @@ public string ToJson( jsonSerializerContext); } + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::HeyGen.SourceGenerationContext.Default); + } + /// /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. /// @@ -26,6 +34,11 @@ public string ToJson( public string ToJson( global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return ToJson(global::HeyGen.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Serialize( this, jsonSerializerOptions); @@ -44,6 +57,17 @@ public string ToJson( jsonSerializerContext) as global::HeyGen.V1WebhookEndpointAddRequest; } + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::HeyGen.V1WebhookEndpointAddRequest? FromJson( + string json) + { + return FromJson( + json, + global::HeyGen.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON string using the provided JsonSerializerOptions. /// @@ -55,6 +79,13 @@ public string ToJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::HeyGen.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); @@ -73,6 +104,17 @@ public string ToJson( jsonSerializerContext).ConfigureAwait(false)) as global::HeyGen.V1WebhookEndpointAddRequest; } + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::HeyGen.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON stream using the provided JsonSerializerOptions. /// @@ -84,6 +126,13 @@ public string ToJson( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::HeyGen.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); diff --git a/src/libs/HeyGen/Generated/HeyGen.Models.V1WebhookEndpointAddRequestEvent.Json.g.cs b/src/libs/HeyGen/Generated/HeyGen.Models.V1WebhookEndpointAddRequestEvent.Json.g.cs index a5693cd..470f61a 100644 --- a/src/libs/HeyGen/Generated/HeyGen.Models.V1WebhookEndpointAddRequestEvent.Json.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.Models.V1WebhookEndpointAddRequestEvent.Json.g.cs @@ -16,6 +16,14 @@ public string ToJson( jsonSerializerContext); } + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::HeyGen.SourceGenerationContext.Default); + } + /// /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. /// @@ -26,6 +34,11 @@ public string ToJson( public string ToJson( global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return ToJson(global::HeyGen.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Serialize( this, jsonSerializerOptions); @@ -44,6 +57,17 @@ public string ToJson( jsonSerializerContext) as global::HeyGen.V1WebhookEndpointAddRequestEvent; } + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::HeyGen.V1WebhookEndpointAddRequestEvent? FromJson( + string json) + { + return FromJson( + json, + global::HeyGen.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON string using the provided JsonSerializerOptions. /// @@ -55,6 +79,13 @@ public string ToJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::HeyGen.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); @@ -73,6 +104,17 @@ public string ToJson( jsonSerializerContext).ConfigureAwait(false)) as global::HeyGen.V1WebhookEndpointAddRequestEvent; } + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::HeyGen.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON stream using the provided JsonSerializerOptions. /// @@ -84,6 +126,13 @@ public string ToJson( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::HeyGen.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); diff --git a/src/libs/HeyGen/Generated/HeyGen.Models.V2TemplateGenerateRequest.Json.g.cs b/src/libs/HeyGen/Generated/HeyGen.Models.V2TemplateGenerateRequest.Json.g.cs index d7c199a..38d97d4 100644 --- a/src/libs/HeyGen/Generated/HeyGen.Models.V2TemplateGenerateRequest.Json.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.Models.V2TemplateGenerateRequest.Json.g.cs @@ -16,6 +16,14 @@ public string ToJson( jsonSerializerContext); } + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::HeyGen.SourceGenerationContext.Default); + } + /// /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. /// @@ -26,6 +34,11 @@ public string ToJson( public string ToJson( global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return ToJson(global::HeyGen.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Serialize( this, jsonSerializerOptions); @@ -44,6 +57,17 @@ public string ToJson( jsonSerializerContext) as global::HeyGen.V2TemplateGenerateRequest; } + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::HeyGen.V2TemplateGenerateRequest? FromJson( + string json) + { + return FromJson( + json, + global::HeyGen.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON string using the provided JsonSerializerOptions. /// @@ -55,6 +79,13 @@ public string ToJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::HeyGen.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); @@ -73,6 +104,17 @@ public string ToJson( jsonSerializerContext).ConfigureAwait(false)) as global::HeyGen.V2TemplateGenerateRequest; } + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::HeyGen.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON stream using the provided JsonSerializerOptions. /// @@ -84,6 +126,13 @@ public string ToJson( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::HeyGen.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); diff --git a/src/libs/HeyGen/Generated/HeyGen.Models.V2TemplateGenerateRequestDimension.Json.g.cs b/src/libs/HeyGen/Generated/HeyGen.Models.V2TemplateGenerateRequestDimension.Json.g.cs index 1c7ec08..89e8376 100644 --- a/src/libs/HeyGen/Generated/HeyGen.Models.V2TemplateGenerateRequestDimension.Json.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.Models.V2TemplateGenerateRequestDimension.Json.g.cs @@ -16,6 +16,14 @@ public string ToJson( jsonSerializerContext); } + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::HeyGen.SourceGenerationContext.Default); + } + /// /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. /// @@ -26,6 +34,11 @@ public string ToJson( public string ToJson( global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return ToJson(global::HeyGen.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Serialize( this, jsonSerializerOptions); @@ -44,6 +57,17 @@ public string ToJson( jsonSerializerContext) as global::HeyGen.V2TemplateGenerateRequestDimension; } + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::HeyGen.V2TemplateGenerateRequestDimension? FromJson( + string json) + { + return FromJson( + json, + global::HeyGen.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON string using the provided JsonSerializerOptions. /// @@ -55,6 +79,13 @@ public string ToJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::HeyGen.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); @@ -73,6 +104,17 @@ public string ToJson( jsonSerializerContext).ConfigureAwait(false)) as global::HeyGen.V2TemplateGenerateRequestDimension; } + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::HeyGen.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON stream using the provided JsonSerializerOptions. /// @@ -84,6 +126,13 @@ public string ToJson( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::HeyGen.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); diff --git a/src/libs/HeyGen/Generated/HeyGen.Models.V2TemplateGenerateRequestVariables.Json.g.cs b/src/libs/HeyGen/Generated/HeyGen.Models.V2TemplateGenerateRequestVariables.Json.g.cs index 86353a4..0c7f1b2 100644 --- a/src/libs/HeyGen/Generated/HeyGen.Models.V2TemplateGenerateRequestVariables.Json.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.Models.V2TemplateGenerateRequestVariables.Json.g.cs @@ -16,6 +16,14 @@ public string ToJson( jsonSerializerContext); } + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::HeyGen.SourceGenerationContext.Default); + } + /// /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. /// @@ -26,6 +34,11 @@ public string ToJson( public string ToJson( global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return ToJson(global::HeyGen.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Serialize( this, jsonSerializerOptions); @@ -44,6 +57,17 @@ public string ToJson( jsonSerializerContext) as global::HeyGen.V2TemplateGenerateRequestVariables; } + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::HeyGen.V2TemplateGenerateRequestVariables? FromJson( + string json) + { + return FromJson( + json, + global::HeyGen.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON string using the provided JsonSerializerOptions. /// @@ -55,6 +79,13 @@ public string ToJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::HeyGen.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); @@ -73,6 +104,17 @@ public string ToJson( jsonSerializerContext).ConfigureAwait(false)) as global::HeyGen.V2TemplateGenerateRequestVariables; } + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::HeyGen.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON stream using the provided JsonSerializerOptions. /// @@ -84,6 +126,13 @@ public string ToJson( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::HeyGen.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); diff --git a/src/libs/HeyGen/Generated/HeyGen.Models.V2TemplateGenerateRequestVariablesFirstName.Json.g.cs b/src/libs/HeyGen/Generated/HeyGen.Models.V2TemplateGenerateRequestVariablesFirstName.Json.g.cs index 049a725..076e5e5 100644 --- a/src/libs/HeyGen/Generated/HeyGen.Models.V2TemplateGenerateRequestVariablesFirstName.Json.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.Models.V2TemplateGenerateRequestVariablesFirstName.Json.g.cs @@ -16,6 +16,14 @@ public string ToJson( jsonSerializerContext); } + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::HeyGen.SourceGenerationContext.Default); + } + /// /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. /// @@ -26,6 +34,11 @@ public string ToJson( public string ToJson( global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return ToJson(global::HeyGen.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Serialize( this, jsonSerializerOptions); @@ -44,6 +57,17 @@ public string ToJson( jsonSerializerContext) as global::HeyGen.V2TemplateGenerateRequestVariablesFirstName; } + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::HeyGen.V2TemplateGenerateRequestVariablesFirstName? FromJson( + string json) + { + return FromJson( + json, + global::HeyGen.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON string using the provided JsonSerializerOptions. /// @@ -55,6 +79,13 @@ public string ToJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::HeyGen.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); @@ -73,6 +104,17 @@ public string ToJson( jsonSerializerContext).ConfigureAwait(false)) as global::HeyGen.V2TemplateGenerateRequestVariablesFirstName; } + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::HeyGen.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON stream using the provided JsonSerializerOptions. /// @@ -84,6 +126,13 @@ public string ToJson( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::HeyGen.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); diff --git a/src/libs/HeyGen/Generated/HeyGen.Models.V2TemplateGenerateRequestVariablesFirstNameProperties.Json.g.cs b/src/libs/HeyGen/Generated/HeyGen.Models.V2TemplateGenerateRequestVariablesFirstNameProperties.Json.g.cs index ed34192..1e9abb6 100644 --- a/src/libs/HeyGen/Generated/HeyGen.Models.V2TemplateGenerateRequestVariablesFirstNameProperties.Json.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.Models.V2TemplateGenerateRequestVariablesFirstNameProperties.Json.g.cs @@ -16,6 +16,14 @@ public string ToJson( jsonSerializerContext); } + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::HeyGen.SourceGenerationContext.Default); + } + /// /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. /// @@ -26,6 +34,11 @@ public string ToJson( public string ToJson( global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return ToJson(global::HeyGen.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Serialize( this, jsonSerializerOptions); @@ -44,6 +57,17 @@ public string ToJson( jsonSerializerContext) as global::HeyGen.V2TemplateGenerateRequestVariablesFirstNameProperties; } + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::HeyGen.V2TemplateGenerateRequestVariablesFirstNameProperties? FromJson( + string json) + { + return FromJson( + json, + global::HeyGen.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON string using the provided JsonSerializerOptions. /// @@ -55,6 +79,13 @@ public string ToJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::HeyGen.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); @@ -73,6 +104,17 @@ public string ToJson( jsonSerializerContext).ConfigureAwait(false)) as global::HeyGen.V2TemplateGenerateRequestVariablesFirstNameProperties; } + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::HeyGen.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON stream using the provided JsonSerializerOptions. /// @@ -84,6 +126,13 @@ public string ToJson( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::HeyGen.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); diff --git a/src/libs/HeyGen/Generated/HeyGen.Models.V2VideoGenerateRequest.Json.g.cs b/src/libs/HeyGen/Generated/HeyGen.Models.V2VideoGenerateRequest.Json.g.cs index c94dabb..addcaae 100644 --- a/src/libs/HeyGen/Generated/HeyGen.Models.V2VideoGenerateRequest.Json.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.Models.V2VideoGenerateRequest.Json.g.cs @@ -16,6 +16,14 @@ public string ToJson( jsonSerializerContext); } + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::HeyGen.SourceGenerationContext.Default); + } + /// /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. /// @@ -26,6 +34,11 @@ public string ToJson( public string ToJson( global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return ToJson(global::HeyGen.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Serialize( this, jsonSerializerOptions); @@ -44,6 +57,17 @@ public string ToJson( jsonSerializerContext) as global::HeyGen.V2VideoGenerateRequest; } + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::HeyGen.V2VideoGenerateRequest? FromJson( + string json) + { + return FromJson( + json, + global::HeyGen.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON string using the provided JsonSerializerOptions. /// @@ -55,6 +79,13 @@ public string ToJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::HeyGen.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); @@ -73,6 +104,17 @@ public string ToJson( jsonSerializerContext).ConfigureAwait(false)) as global::HeyGen.V2VideoGenerateRequest; } + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::HeyGen.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON stream using the provided JsonSerializerOptions. /// @@ -84,6 +126,13 @@ public string ToJson( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::HeyGen.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); diff --git a/src/libs/HeyGen/Generated/HeyGen.Models.V2VideoGenerateRequestDimension.Json.g.cs b/src/libs/HeyGen/Generated/HeyGen.Models.V2VideoGenerateRequestDimension.Json.g.cs index 62bee35..aad0bdb 100644 --- a/src/libs/HeyGen/Generated/HeyGen.Models.V2VideoGenerateRequestDimension.Json.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.Models.V2VideoGenerateRequestDimension.Json.g.cs @@ -16,6 +16,14 @@ public string ToJson( jsonSerializerContext); } + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::HeyGen.SourceGenerationContext.Default); + } + /// /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. /// @@ -26,6 +34,11 @@ public string ToJson( public string ToJson( global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return ToJson(global::HeyGen.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Serialize( this, jsonSerializerOptions); @@ -44,6 +57,17 @@ public string ToJson( jsonSerializerContext) as global::HeyGen.V2VideoGenerateRequestDimension; } + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::HeyGen.V2VideoGenerateRequestDimension? FromJson( + string json) + { + return FromJson( + json, + global::HeyGen.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON string using the provided JsonSerializerOptions. /// @@ -55,6 +79,13 @@ public string ToJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::HeyGen.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); @@ -73,6 +104,17 @@ public string ToJson( jsonSerializerContext).ConfigureAwait(false)) as global::HeyGen.V2VideoGenerateRequestDimension; } + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::HeyGen.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON stream using the provided JsonSerializerOptions. /// @@ -84,6 +126,13 @@ public string ToJson( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::HeyGen.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); diff --git a/src/libs/HeyGen/Generated/HeyGen.Models.V2VideoGenerateRequestVideoInput.Json.g.cs b/src/libs/HeyGen/Generated/HeyGen.Models.V2VideoGenerateRequestVideoInput.Json.g.cs index 5ff8ebb..dea1871 100644 --- a/src/libs/HeyGen/Generated/HeyGen.Models.V2VideoGenerateRequestVideoInput.Json.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.Models.V2VideoGenerateRequestVideoInput.Json.g.cs @@ -16,6 +16,14 @@ public string ToJson( jsonSerializerContext); } + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::HeyGen.SourceGenerationContext.Default); + } + /// /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. /// @@ -26,6 +34,11 @@ public string ToJson( public string ToJson( global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return ToJson(global::HeyGen.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Serialize( this, jsonSerializerOptions); @@ -44,6 +57,17 @@ public string ToJson( jsonSerializerContext) as global::HeyGen.V2VideoGenerateRequestVideoInput; } + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::HeyGen.V2VideoGenerateRequestVideoInput? FromJson( + string json) + { + return FromJson( + json, + global::HeyGen.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON string using the provided JsonSerializerOptions. /// @@ -55,6 +79,13 @@ public string ToJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::HeyGen.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); @@ -73,6 +104,17 @@ public string ToJson( jsonSerializerContext).ConfigureAwait(false)) as global::HeyGen.V2VideoGenerateRequestVideoInput; } + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::HeyGen.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON stream using the provided JsonSerializerOptions. /// @@ -84,6 +126,13 @@ public string ToJson( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::HeyGen.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); diff --git a/src/libs/HeyGen/Generated/HeyGen.Models.V2VideoGenerateRequestVideoInputCharacter.Json.g.cs b/src/libs/HeyGen/Generated/HeyGen.Models.V2VideoGenerateRequestVideoInputCharacter.Json.g.cs index 2f27692..d21ac4a 100644 --- a/src/libs/HeyGen/Generated/HeyGen.Models.V2VideoGenerateRequestVideoInputCharacter.Json.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.Models.V2VideoGenerateRequestVideoInputCharacter.Json.g.cs @@ -16,6 +16,14 @@ public string ToJson( jsonSerializerContext); } + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::HeyGen.SourceGenerationContext.Default); + } + /// /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. /// @@ -26,6 +34,11 @@ public string ToJson( public string ToJson( global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return ToJson(global::HeyGen.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Serialize( this, jsonSerializerOptions); @@ -44,6 +57,17 @@ public string ToJson( jsonSerializerContext) as global::HeyGen.V2VideoGenerateRequestVideoInputCharacter; } + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::HeyGen.V2VideoGenerateRequestVideoInputCharacter? FromJson( + string json) + { + return FromJson( + json, + global::HeyGen.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON string using the provided JsonSerializerOptions. /// @@ -55,6 +79,13 @@ public string ToJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::HeyGen.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); @@ -73,6 +104,17 @@ public string ToJson( jsonSerializerContext).ConfigureAwait(false)) as global::HeyGen.V2VideoGenerateRequestVideoInputCharacter; } + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::HeyGen.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON stream using the provided JsonSerializerOptions. /// @@ -84,6 +126,13 @@ public string ToJson( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::HeyGen.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); diff --git a/src/libs/HeyGen/Generated/HeyGen.Models.V2VideoGenerateRequestVideoInputVoice.Json.g.cs b/src/libs/HeyGen/Generated/HeyGen.Models.V2VideoGenerateRequestVideoInputVoice.Json.g.cs index 5296bb6..674ac23 100644 --- a/src/libs/HeyGen/Generated/HeyGen.Models.V2VideoGenerateRequestVideoInputVoice.Json.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.Models.V2VideoGenerateRequestVideoInputVoice.Json.g.cs @@ -16,6 +16,14 @@ public string ToJson( jsonSerializerContext); } + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::HeyGen.SourceGenerationContext.Default); + } + /// /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. /// @@ -26,6 +34,11 @@ public string ToJson( public string ToJson( global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return ToJson(global::HeyGen.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Serialize( this, jsonSerializerOptions); @@ -44,6 +57,17 @@ public string ToJson( jsonSerializerContext) as global::HeyGen.V2VideoGenerateRequestVideoInputVoice; } + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::HeyGen.V2VideoGenerateRequestVideoInputVoice? FromJson( + string json) + { + return FromJson( + json, + global::HeyGen.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON string using the provided JsonSerializerOptions. /// @@ -55,6 +79,13 @@ public string ToJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::HeyGen.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); @@ -73,6 +104,17 @@ public string ToJson( jsonSerializerContext).ConfigureAwait(false)) as global::HeyGen.V2VideoGenerateRequestVideoInputVoice; } + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::HeyGen.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON stream using the provided JsonSerializerOptions. /// @@ -84,6 +126,13 @@ public string ToJson( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::HeyGen.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); diff --git a/src/libs/HeyGen/Generated/HeyGen.Models.V2VideoTranslateRequest.Json.g.cs b/src/libs/HeyGen/Generated/HeyGen.Models.V2VideoTranslateRequest.Json.g.cs index 30e9089..d5040c2 100644 --- a/src/libs/HeyGen/Generated/HeyGen.Models.V2VideoTranslateRequest.Json.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.Models.V2VideoTranslateRequest.Json.g.cs @@ -16,6 +16,14 @@ public string ToJson( jsonSerializerContext); } + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::HeyGen.SourceGenerationContext.Default); + } + /// /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. /// @@ -26,6 +34,11 @@ public string ToJson( public string ToJson( global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return ToJson(global::HeyGen.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Serialize( this, jsonSerializerOptions); @@ -44,6 +57,17 @@ public string ToJson( jsonSerializerContext) as global::HeyGen.V2VideoTranslateRequest; } + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::HeyGen.V2VideoTranslateRequest? FromJson( + string json) + { + return FromJson( + json, + global::HeyGen.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON string using the provided JsonSerializerOptions. /// @@ -55,6 +79,13 @@ public string ToJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::HeyGen.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); @@ -73,6 +104,17 @@ public string ToJson( jsonSerializerContext).ConfigureAwait(false)) as global::HeyGen.V2VideoTranslateRequest; } + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::HeyGen.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON stream using the provided JsonSerializerOptions. /// @@ -84,6 +126,13 @@ public string ToJson( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::HeyGen.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); diff --git a/src/libs/HeyGen/Generated/HeyGen.PersonalizedVideoClient.PersonalizedVideoAddContact.g.cs b/src/libs/HeyGen/Generated/HeyGen.PersonalizedVideoClient.PersonalizedVideoAddContact.g.cs index 31c5e42..1befc61 100644 --- a/src/libs/HeyGen/Generated/HeyGen.PersonalizedVideoClient.PersonalizedVideoAddContact.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.PersonalizedVideoClient.PersonalizedVideoAddContact.g.cs @@ -370,17 +370,15 @@ await PersonalizedVideoAddContactAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::HeyGen.ApiException( + throw global::HeyGen.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -408,17 +406,15 @@ await PersonalizedVideoAddContactAsResponseAsync( { } - throw new global::HeyGen.ApiException( + throw global::HeyGen.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/HeyGen/Generated/HeyGen.PersonalizedVideoClient.PersonalizedVideoAudienceDetail.g.cs b/src/libs/HeyGen/Generated/HeyGen.PersonalizedVideoClient.PersonalizedVideoAudienceDetail.g.cs index da59bbd..ba3e983 100644 --- a/src/libs/HeyGen/Generated/HeyGen.PersonalizedVideoClient.PersonalizedVideoAudienceDetail.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.PersonalizedVideoClient.PersonalizedVideoAudienceDetail.g.cs @@ -366,17 +366,15 @@ await PersonalizedVideoAudienceDetailAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::HeyGen.ApiException( + throw global::HeyGen.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -404,17 +402,15 @@ await PersonalizedVideoAudienceDetailAsResponseAsync( { } - throw new global::HeyGen.ApiException( + throw global::HeyGen.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/HeyGen/Generated/HeyGen.PersonalizedVideoClient.PersonalizedVideoProjectDetail.g.cs b/src/libs/HeyGen/Generated/HeyGen.PersonalizedVideoClient.PersonalizedVideoProjectDetail.g.cs index 14dd624..3c65a8e 100644 --- a/src/libs/HeyGen/Generated/HeyGen.PersonalizedVideoClient.PersonalizedVideoProjectDetail.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.PersonalizedVideoClient.PersonalizedVideoProjectDetail.g.cs @@ -366,17 +366,15 @@ await PersonalizedVideoProjectDetailAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::HeyGen.ApiException( + throw global::HeyGen.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -404,17 +402,15 @@ await PersonalizedVideoProjectDetailAsResponseAsync( { } - throw new global::HeyGen.ApiException( + throw global::HeyGen.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingAvatarList.g.cs b/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingAvatarList.g.cs index 0ee9f76..10a66d7 100644 --- a/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingAvatarList.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingAvatarList.g.cs @@ -350,17 +350,15 @@ await StreamingAvatarListAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::HeyGen.ApiException( + throw global::HeyGen.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -388,17 +386,15 @@ await StreamingAvatarListAsResponseAsync( { } - throw new global::HeyGen.ApiException( + throw global::HeyGen.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingCreateToken.g.cs b/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingCreateToken.g.cs index 3bb92e8..ed2f7d1 100644 --- a/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingCreateToken.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingCreateToken.g.cs @@ -370,17 +370,15 @@ await StreamingCreateTokenAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::HeyGen.ApiException( + throw global::HeyGen.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -408,17 +406,15 @@ await StreamingCreateTokenAsResponseAsync( { } - throw new global::HeyGen.ApiException( + throw global::HeyGen.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingIce.g.cs b/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingIce.g.cs index 25068b8..0af19cd 100644 --- a/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingIce.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingIce.g.cs @@ -370,17 +370,15 @@ await StreamingIceAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::HeyGen.ApiException( + throw global::HeyGen.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -408,17 +406,15 @@ await StreamingIceAsResponseAsync( { } - throw new global::HeyGen.ApiException( + throw global::HeyGen.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingInterrupt.g.cs b/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingInterrupt.g.cs index c50aa23..bac718b 100644 --- a/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingInterrupt.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingInterrupt.g.cs @@ -370,17 +370,15 @@ await StreamingInterruptAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::HeyGen.ApiException( + throw global::HeyGen.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -408,17 +406,15 @@ await StreamingInterruptAsResponseAsync( { } - throw new global::HeyGen.ApiException( + throw global::HeyGen.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingList.g.cs b/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingList.g.cs index ce819a6..5a91e37 100644 --- a/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingList.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingList.g.cs @@ -350,17 +350,15 @@ await StreamingListAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::HeyGen.ApiException( + throw global::HeyGen.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -388,17 +386,15 @@ await StreamingListAsResponseAsync( { } - throw new global::HeyGen.ApiException( + throw global::HeyGen.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingNew.g.cs b/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingNew.g.cs index 9ddb133..1a8a88b 100644 --- a/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingNew.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingNew.g.cs @@ -370,17 +370,15 @@ await StreamingNewAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::HeyGen.ApiException( + throw global::HeyGen.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -408,17 +406,15 @@ await StreamingNewAsResponseAsync( { } - throw new global::HeyGen.ApiException( + throw global::HeyGen.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingStart.g.cs b/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingStart.g.cs index 72ebd69..80c7752 100644 --- a/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingStart.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingStart.g.cs @@ -370,17 +370,15 @@ await StreamingStartAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::HeyGen.ApiException( + throw global::HeyGen.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -408,17 +406,15 @@ await StreamingStartAsResponseAsync( { } - throw new global::HeyGen.ApiException( + throw global::HeyGen.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingStop.g.cs b/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingStop.g.cs index 978c142..522aa80 100644 --- a/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingStop.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingStop.g.cs @@ -370,17 +370,15 @@ await StreamingStopAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::HeyGen.ApiException( + throw global::HeyGen.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -408,17 +406,15 @@ await StreamingStopAsResponseAsync( { } - throw new global::HeyGen.ApiException( + throw global::HeyGen.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingTask.g.cs b/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingTask.g.cs index 1693470..17db61e 100644 --- a/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingTask.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingTask.g.cs @@ -370,17 +370,15 @@ await StreamingTaskAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::HeyGen.ApiException( + throw global::HeyGen.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -408,17 +406,15 @@ await StreamingTaskAsResponseAsync( { } - throw new global::HeyGen.ApiException( + throw global::HeyGen.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/HeyGen/Generated/HeyGen.TalkingPhotoClient.V1TalkingPhotoList.g.cs b/src/libs/HeyGen/Generated/HeyGen.TalkingPhotoClient.V1TalkingPhotoList.g.cs index 30a9b28..2f46ad2 100644 --- a/src/libs/HeyGen/Generated/HeyGen.TalkingPhotoClient.V1TalkingPhotoList.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.TalkingPhotoClient.V1TalkingPhotoList.g.cs @@ -350,17 +350,15 @@ await V1TalkingPhotoListAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::HeyGen.ApiException( + throw global::HeyGen.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -388,17 +386,15 @@ await V1TalkingPhotoListAsResponseAsync( { } - throw new global::HeyGen.ApiException( + throw global::HeyGen.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/HeyGen/Generated/HeyGen.TalkingPhotoClient.V1TalkingPhotoUpload.g.cs b/src/libs/HeyGen/Generated/HeyGen.TalkingPhotoClient.V1TalkingPhotoUpload.g.cs index 7868a47..931fba3 100644 --- a/src/libs/HeyGen/Generated/HeyGen.TalkingPhotoClient.V1TalkingPhotoUpload.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.TalkingPhotoClient.V1TalkingPhotoUpload.g.cs @@ -350,17 +350,15 @@ await V1TalkingPhotoUploadAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::HeyGen.ApiException( + throw global::HeyGen.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -388,17 +386,15 @@ await V1TalkingPhotoUploadAsResponseAsync( { } - throw new global::HeyGen.ApiException( + throw global::HeyGen.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/HeyGen/Generated/HeyGen.TalkingPhotoClient.V2TalkingPhotoIdDelete.g.cs b/src/libs/HeyGen/Generated/HeyGen.TalkingPhotoClient.V2TalkingPhotoIdDelete.g.cs index 2e3a934..5ae40ba 100644 --- a/src/libs/HeyGen/Generated/HeyGen.TalkingPhotoClient.V2TalkingPhotoIdDelete.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.TalkingPhotoClient.V2TalkingPhotoIdDelete.g.cs @@ -350,17 +350,15 @@ await V2TalkingPhotoIdDeleteAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::HeyGen.ApiException( + throw global::HeyGen.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -388,17 +386,15 @@ await V2TalkingPhotoIdDeleteAsResponseAsync( { } - throw new global::HeyGen.ApiException( + throw global::HeyGen.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/HeyGen/Generated/HeyGen.TemplateApiClient.V2TemplateGenerate.g.cs b/src/libs/HeyGen/Generated/HeyGen.TemplateApiClient.V2TemplateGenerate.g.cs index b54bd3f..02f683e 100644 --- a/src/libs/HeyGen/Generated/HeyGen.TemplateApiClient.V2TemplateGenerate.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.TemplateApiClient.V2TemplateGenerate.g.cs @@ -372,17 +372,15 @@ await V2TemplateGenerateAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::HeyGen.ApiException( + throw global::HeyGen.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -410,17 +408,15 @@ await V2TemplateGenerateAsResponseAsync( { } - throw new global::HeyGen.ApiException( + throw global::HeyGen.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/HeyGen/Generated/HeyGen.TemplateApiClient.V2TemplateId.g.cs b/src/libs/HeyGen/Generated/HeyGen.TemplateApiClient.V2TemplateId.g.cs index 20a53f7..00904be 100644 --- a/src/libs/HeyGen/Generated/HeyGen.TemplateApiClient.V2TemplateId.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.TemplateApiClient.V2TemplateId.g.cs @@ -350,17 +350,15 @@ await V2TemplateIdAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::HeyGen.ApiException( + throw global::HeyGen.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -388,17 +386,15 @@ await V2TemplateIdAsResponseAsync( { } - throw new global::HeyGen.ApiException( + throw global::HeyGen.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/HeyGen/Generated/HeyGen.TemplateApiClient.V2Templates.g.cs b/src/libs/HeyGen/Generated/HeyGen.TemplateApiClient.V2Templates.g.cs index 44a3dbe..844d80d 100644 --- a/src/libs/HeyGen/Generated/HeyGen.TemplateApiClient.V2Templates.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.TemplateApiClient.V2Templates.g.cs @@ -350,17 +350,15 @@ await V2TemplatesAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::HeyGen.ApiException( + throw global::HeyGen.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -388,17 +386,15 @@ await V2TemplatesAsResponseAsync( { } - throw new global::HeyGen.ApiException( + throw global::HeyGen.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/HeyGen/Generated/HeyGen.UserClient.V2UserRemainingQuota.g.cs b/src/libs/HeyGen/Generated/HeyGen.UserClient.V2UserRemainingQuota.g.cs index b4056a5..0c86a3a 100644 --- a/src/libs/HeyGen/Generated/HeyGen.UserClient.V2UserRemainingQuota.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.UserClient.V2UserRemainingQuota.g.cs @@ -350,17 +350,15 @@ await V2UserRemainingQuotaAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::HeyGen.ApiException( + throw global::HeyGen.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -388,17 +386,15 @@ await V2UserRemainingQuotaAsResponseAsync( { } - throw new global::HeyGen.ApiException( + throw global::HeyGen.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/HeyGen/Generated/HeyGen.VideoTranslateApiClient.V2VideoTranslate.g.cs b/src/libs/HeyGen/Generated/HeyGen.VideoTranslateApiClient.V2VideoTranslate.g.cs index 4f61f7c..4c153cc 100644 --- a/src/libs/HeyGen/Generated/HeyGen.VideoTranslateApiClient.V2VideoTranslate.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.VideoTranslateApiClient.V2VideoTranslate.g.cs @@ -370,17 +370,15 @@ await V2VideoTranslateAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::HeyGen.ApiException( + throw global::HeyGen.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -408,17 +406,15 @@ await V2VideoTranslateAsResponseAsync( { } - throw new global::HeyGen.ApiException( + throw global::HeyGen.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/HeyGen/Generated/HeyGen.VideoTranslateApiClient.V2VideoTranslateIdStatus.g.cs b/src/libs/HeyGen/Generated/HeyGen.VideoTranslateApiClient.V2VideoTranslateIdStatus.g.cs index 7a1c5d8..e34edde 100644 --- a/src/libs/HeyGen/Generated/HeyGen.VideoTranslateApiClient.V2VideoTranslateIdStatus.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.VideoTranslateApiClient.V2VideoTranslateIdStatus.g.cs @@ -350,17 +350,15 @@ await V2VideoTranslateIdStatusAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::HeyGen.ApiException( + throw global::HeyGen.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -388,17 +386,15 @@ await V2VideoTranslateIdStatusAsResponseAsync( { } - throw new global::HeyGen.ApiException( + throw global::HeyGen.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/HeyGen/Generated/HeyGen.VideoTranslateApiClient.V2VideoTranslateTargetLanguages.g.cs b/src/libs/HeyGen/Generated/HeyGen.VideoTranslateApiClient.V2VideoTranslateTargetLanguages.g.cs index 83f4d93..b513ef3 100644 --- a/src/libs/HeyGen/Generated/HeyGen.VideoTranslateApiClient.V2VideoTranslateTargetLanguages.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.VideoTranslateApiClient.V2VideoTranslateTargetLanguages.g.cs @@ -350,17 +350,15 @@ await V2VideoTranslateTargetLanguagesAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::HeyGen.ApiException( + throw global::HeyGen.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -388,17 +386,15 @@ await V2VideoTranslateTargetLanguagesAsResponseAsync( { } - throw new global::HeyGen.ApiException( + throw global::HeyGen.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/HeyGen/Generated/HeyGen.WebhooksClient.V1WebhookEndpointAdd.g.cs b/src/libs/HeyGen/Generated/HeyGen.WebhooksClient.V1WebhookEndpointAdd.g.cs index 5c9c4c4..47e4693 100644 --- a/src/libs/HeyGen/Generated/HeyGen.WebhooksClient.V1WebhookEndpointAdd.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.WebhooksClient.V1WebhookEndpointAdd.g.cs @@ -370,17 +370,15 @@ await V1WebhookEndpointAddAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::HeyGen.ApiException( + throw global::HeyGen.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -408,17 +406,15 @@ await V1WebhookEndpointAddAsResponseAsync( { } - throw new global::HeyGen.ApiException( + throw global::HeyGen.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/HeyGen/Generated/HeyGen.WebhooksClient.V1WebhookEndpointDelete.g.cs b/src/libs/HeyGen/Generated/HeyGen.WebhooksClient.V1WebhookEndpointDelete.g.cs index a9539a8..99c3ef2 100644 --- a/src/libs/HeyGen/Generated/HeyGen.WebhooksClient.V1WebhookEndpointDelete.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.WebhooksClient.V1WebhookEndpointDelete.g.cs @@ -366,17 +366,15 @@ await V1WebhookEndpointDeleteAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::HeyGen.ApiException( + throw global::HeyGen.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -404,17 +402,15 @@ await V1WebhookEndpointDeleteAsResponseAsync( { } - throw new global::HeyGen.ApiException( + throw global::HeyGen.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/HeyGen/Generated/HeyGen.WebhooksClient.V1WebhookEndpointList.g.cs b/src/libs/HeyGen/Generated/HeyGen.WebhooksClient.V1WebhookEndpointList.g.cs index dfb4830..adec941 100644 --- a/src/libs/HeyGen/Generated/HeyGen.WebhooksClient.V1WebhookEndpointList.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.WebhooksClient.V1WebhookEndpointList.g.cs @@ -350,17 +350,15 @@ await V1WebhookEndpointListAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::HeyGen.ApiException( + throw global::HeyGen.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -388,17 +386,15 @@ await V1WebhookEndpointListAsResponseAsync( { } - throw new global::HeyGen.ApiException( + throw global::HeyGen.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/HeyGen/Generated/HeyGen.WebhooksClient.V1WebhookWebhookList.g.cs b/src/libs/HeyGen/Generated/HeyGen.WebhooksClient.V1WebhookWebhookList.g.cs index c6b56c2..95082c8 100644 --- a/src/libs/HeyGen/Generated/HeyGen.WebhooksClient.V1WebhookWebhookList.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.WebhooksClient.V1WebhookWebhookList.g.cs @@ -350,17 +350,15 @@ await V1WebhookWebhookListAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::HeyGen.ApiException( + throw global::HeyGen.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -388,17 +386,15 @@ await V1WebhookWebhookListAsResponseAsync( { } - throw new global::HeyGen.ApiException( + throw global::HeyGen.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } }