diff --git a/src/libs/HeyGen/Generated/HeyGen.AssetsClient.V1AssetUpload.g.cs b/src/libs/HeyGen/Generated/HeyGen.AssetsClient.V1AssetUpload.g.cs index 32580f3..f0cc3fe 100644 --- a/src/libs/HeyGen/Generated/HeyGen.AssetsClient.V1AssetUpload.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.AssetsClient.V1AssetUpload.g.cs @@ -134,7 +134,7 @@ await V1AssetUploadAsResponseAsync( __authorization.Location == "Header") { __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); - } + } } global::HeyGen.AutoSDKRequestOptionsSupport.ApplyHeaders( request: __httpRequest, @@ -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.AssetsClient.g.cs b/src/libs/HeyGen/Generated/HeyGen.AssetsClient.g.cs index 76dc45d..827bad7 100644 --- a/src/libs/HeyGen/Generated/HeyGen.AssetsClient.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.AssetsClient.g.cs @@ -12,7 +12,7 @@ namespace HeyGen public sealed partial class AssetsClient : global::HeyGen.IAssetsClient, global::System.IDisposable { /// - /// + /// /// public const string DefaultBaseUrl = "https://api.heygen.com/"; @@ -38,10 +38,17 @@ public sealed partial class AssetsClient : global::HeyGen.IAssetsClient, global: internal global::HeyGen.AutoSDKServerConfiguration AutoSDKServerConfiguration { get; set; } = new global::HeyGen.AutoSDKServerConfiguration(); + + internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::HeyGen.SourceGenerationContext.Default); + /// - /// + /// /// - public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::HeyGen.SourceGenerationContext.Default; + public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext + { + get => JsonSerializerContextProvider.Value; + set => JsonSerializerContextProvider = new(() => 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..b003a6d 100644 --- a/src/libs/HeyGen/Generated/HeyGen.CreateVideoApiClient.V1VideoDelete.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.CreateVideoApiClient.V1VideoDelete.g.cs @@ -149,7 +149,7 @@ await V1VideoDeleteAsResponseAsync( __authorization.Location == "Header") { __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); - } + } } global::HeyGen.AutoSDKRequestOptionsSupport.ApplyHeaders( request: __httpRequest, @@ -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..620aa0d 100644 --- a/src/libs/HeyGen/Generated/HeyGen.CreateVideoApiClient.V2VideoGenerate.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.CreateVideoApiClient.V2VideoGenerate.g.cs @@ -149,7 +149,7 @@ await V2VideoGenerateAsResponseAsync( __authorization.Location == "Header") { __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); - } + } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( @@ -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.CreateVideoApiClient.g.cs b/src/libs/HeyGen/Generated/HeyGen.CreateVideoApiClient.g.cs index 74953c0..938748e 100644 --- a/src/libs/HeyGen/Generated/HeyGen.CreateVideoApiClient.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.CreateVideoApiClient.g.cs @@ -12,7 +12,7 @@ namespace HeyGen public sealed partial class CreateVideoApiClient : global::HeyGen.ICreateVideoApiClient, global::System.IDisposable { /// - /// + /// /// public const string DefaultBaseUrl = "https://api.heygen.com/"; @@ -38,10 +38,17 @@ public sealed partial class CreateVideoApiClient : global::HeyGen.ICreateVideoAp internal global::HeyGen.AutoSDKServerConfiguration AutoSDKServerConfiguration { get; set; } = new global::HeyGen.AutoSDKServerConfiguration(); + + internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::HeyGen.SourceGenerationContext.Default); + /// - /// + /// /// - public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::HeyGen.SourceGenerationContext.Default; + public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext + { + get => JsonSerializerContextProvider.Value; + set => JsonSerializerContextProvider = new(() => 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..2fcce94 100644 --- a/src/libs/HeyGen/Generated/HeyGen.HeyGenClient.V1VideoStatusGet.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.HeyGenClient.V1VideoStatusGet.g.cs @@ -149,7 +149,7 @@ await V1VideoStatusGetAsResponseAsync( __authorization.Location == "Header") { __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); - } + } } global::HeyGen.AutoSDKRequestOptionsSupport.ApplyHeaders( request: __httpRequest, @@ -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.HeyGenClient.g.cs b/src/libs/HeyGen/Generated/HeyGen.HeyGenClient.g.cs index 1fe55c8..2dd3c70 100644 --- a/src/libs/HeyGen/Generated/HeyGen.HeyGenClient.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.HeyGenClient.g.cs @@ -32,7 +32,7 @@ namespace HeyGen public sealed partial class HeyGenClient : global::HeyGen.IHeyGenClient, global::System.IDisposable { /// - /// + /// /// public const string DefaultBaseUrl = "https://api.heygen.com/"; @@ -58,10 +58,17 @@ public sealed partial class HeyGenClient : global::HeyGen.IHeyGenClient, global: internal global::HeyGen.AutoSDKServerConfiguration AutoSDKServerConfiguration { get; set; } = new global::HeyGen.AutoSDKServerConfiguration(); + + internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::HeyGen.SourceGenerationContext.Default); + /// - /// + /// /// - public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::HeyGen.SourceGenerationContext.Default; + public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext + { + get => JsonSerializerContextProvider.Value; + set => JsonSerializerContextProvider = new(() => value); + } /// @@ -71,7 +78,7 @@ public sealed partial class HeyGenClient : global::HeyGen.IHeyGenClient, global: public AssetsClient Assets => new AssetsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, - JsonSerializerContext = JsonSerializerContext, + JsonSerializerContextProvider = JsonSerializerContextProvider, AutoSDKServerConfiguration = AutoSDKServerConfiguration, }; @@ -82,17 +89,17 @@ public sealed partial class HeyGenClient : global::HeyGen.IHeyGenClient, global: public CreateVideoApiClient CreateVideoApi => new CreateVideoApiClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, - JsonSerializerContext = JsonSerializerContext, + JsonSerializerContextProvider = JsonSerializerContextProvider, AutoSDKServerConfiguration = AutoSDKServerConfiguration, }; /// - /// + /// /// public ListsClient Lists => new ListsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, - JsonSerializerContext = JsonSerializerContext, + JsonSerializerContextProvider = JsonSerializerContextProvider, AutoSDKServerConfiguration = AutoSDKServerConfiguration, }; @@ -104,7 +111,7 @@ public sealed partial class HeyGenClient : global::HeyGen.IHeyGenClient, global: public PersonalizedVideoClient PersonalizedVideo => new PersonalizedVideoClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, - JsonSerializerContext = JsonSerializerContext, + JsonSerializerContextProvider = JsonSerializerContextProvider, AutoSDKServerConfiguration = AutoSDKServerConfiguration, }; @@ -115,7 +122,7 @@ public sealed partial class HeyGenClient : global::HeyGen.IHeyGenClient, global: public StreamingApiClient StreamingApi => new StreamingApiClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, - JsonSerializerContext = JsonSerializerContext, + JsonSerializerContextProvider = JsonSerializerContextProvider, AutoSDKServerConfiguration = AutoSDKServerConfiguration, }; @@ -126,7 +133,7 @@ public sealed partial class HeyGenClient : global::HeyGen.IHeyGenClient, global: public TalkingPhotoClient TalkingPhoto => new TalkingPhotoClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, - JsonSerializerContext = JsonSerializerContext, + JsonSerializerContextProvider = JsonSerializerContextProvider, AutoSDKServerConfiguration = AutoSDKServerConfiguration, }; @@ -143,7 +150,7 @@ public sealed partial class HeyGenClient : global::HeyGen.IHeyGenClient, global: public TemplateApiClient TemplateApi => new TemplateApiClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, - JsonSerializerContext = JsonSerializerContext, + JsonSerializerContextProvider = JsonSerializerContextProvider, AutoSDKServerConfiguration = AutoSDKServerConfiguration, }; @@ -154,7 +161,7 @@ public sealed partial class HeyGenClient : global::HeyGen.IHeyGenClient, global: public UserClient User => new UserClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, - JsonSerializerContext = JsonSerializerContext, + JsonSerializerContextProvider = JsonSerializerContextProvider, AutoSDKServerConfiguration = AutoSDKServerConfiguration, }; @@ -165,7 +172,7 @@ public sealed partial class HeyGenClient : global::HeyGen.IHeyGenClient, global: public VideoTranslateApiClient VideoTranslateApi => new VideoTranslateApiClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, - JsonSerializerContext = JsonSerializerContext, + JsonSerializerContextProvider = JsonSerializerContextProvider, AutoSDKServerConfiguration = AutoSDKServerConfiguration, }; @@ -176,7 +183,7 @@ public sealed partial class HeyGenClient : global::HeyGen.IHeyGenClient, global: public WebhooksClient Webhooks => new WebhooksClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, - JsonSerializerContext = JsonSerializerContext, + JsonSerializerContextProvider = JsonSerializerContextProvider, AutoSDKServerConfiguration = AutoSDKServerConfiguration, }; diff --git a/src/libs/HeyGen/Generated/HeyGen.IAssetsClient.g.cs b/src/libs/HeyGen/Generated/HeyGen.IAssetsClient.g.cs index b57727a..a9a4f65 100644 --- a/src/libs/HeyGen/Generated/HeyGen.IAssetsClient.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.IAssetsClient.g.cs @@ -62,7 +62,7 @@ public partial interface IAssetsClient : global::System.IDisposable /// - /// + /// /// global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } diff --git a/src/libs/HeyGen/Generated/HeyGen.ICreateVideoApiClient.g.cs b/src/libs/HeyGen/Generated/HeyGen.ICreateVideoApiClient.g.cs index 8502122..b53ab09 100644 --- a/src/libs/HeyGen/Generated/HeyGen.ICreateVideoApiClient.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.ICreateVideoApiClient.g.cs @@ -62,7 +62,7 @@ public partial interface ICreateVideoApiClient : global::System.IDisposable /// - /// + /// /// global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } diff --git a/src/libs/HeyGen/Generated/HeyGen.IHeyGenClient.g.cs b/src/libs/HeyGen/Generated/HeyGen.IHeyGenClient.g.cs index 4fd8d8c..8fb8dac 100644 --- a/src/libs/HeyGen/Generated/HeyGen.IHeyGenClient.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.IHeyGenClient.g.cs @@ -82,7 +82,7 @@ public partial interface IHeyGenClient : global::System.IDisposable /// - /// + /// /// global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } @@ -100,7 +100,7 @@ public partial interface IHeyGenClient : global::System.IDisposable public CreateVideoApiClient CreateVideoApi { get; } /// - /// + /// /// public ListsClient Lists { get; } diff --git a/src/libs/HeyGen/Generated/HeyGen.IListsClient.g.cs b/src/libs/HeyGen/Generated/HeyGen.IListsClient.g.cs index 59fce84..0a63bd6 100644 --- a/src/libs/HeyGen/Generated/HeyGen.IListsClient.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.IListsClient.g.cs @@ -60,7 +60,7 @@ public partial interface IListsClient : global::System.IDisposable /// - /// + /// /// global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } diff --git a/src/libs/HeyGen/Generated/HeyGen.IPersonalizedVideoClient.g.cs b/src/libs/HeyGen/Generated/HeyGen.IPersonalizedVideoClient.g.cs index bfde304..bb87ecf 100644 --- a/src/libs/HeyGen/Generated/HeyGen.IPersonalizedVideoClient.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.IPersonalizedVideoClient.g.cs @@ -63,7 +63,7 @@ public partial interface IPersonalizedVideoClient : global::System.IDisposable /// - /// + /// /// global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } diff --git a/src/libs/HeyGen/Generated/HeyGen.IStreamingApiClient.StreamingAvatarList.g.cs b/src/libs/HeyGen/Generated/HeyGen.IStreamingApiClient.StreamingAvatarList.g.cs index 76c4840..3755a3c 100644 --- a/src/libs/HeyGen/Generated/HeyGen.IStreamingApiClient.StreamingAvatarList.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.IStreamingApiClient.StreamingAvatarList.g.cs @@ -8,20 +8,26 @@ public partial interface IStreamingApiClient /// streaming/avatar.list
/// streaming/avatar.list ///
+ /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// global::System.Threading.Tasks.Task StreamingAvatarListAsync( + + string request, global::HeyGen.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); /// /// streaming/avatar.list
/// streaming/avatar.list ///
+ /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// global::System.Threading.Tasks.Task StreamingAvatarListAsResponseAsync( + + string request, global::HeyGen.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); } diff --git a/src/libs/HeyGen/Generated/HeyGen.IStreamingApiClient.StreamingList.g.cs b/src/libs/HeyGen/Generated/HeyGen.IStreamingApiClient.StreamingList.g.cs index 18234bd..ef03f9a 100644 --- a/src/libs/HeyGen/Generated/HeyGen.IStreamingApiClient.StreamingList.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.IStreamingApiClient.StreamingList.g.cs @@ -8,20 +8,26 @@ public partial interface IStreamingApiClient /// streaming.list
/// streaming.list ///
+ /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// global::System.Threading.Tasks.Task StreamingListAsync( + + string request, global::HeyGen.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); /// /// streaming.list
/// streaming.list ///
+ /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// global::System.Threading.Tasks.Task StreamingListAsResponseAsync( + + string request, global::HeyGen.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); } diff --git a/src/libs/HeyGen/Generated/HeyGen.IStreamingApiClient.g.cs b/src/libs/HeyGen/Generated/HeyGen.IStreamingApiClient.g.cs index 193ba9b..b7cc176 100644 --- a/src/libs/HeyGen/Generated/HeyGen.IStreamingApiClient.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.IStreamingApiClient.g.cs @@ -62,7 +62,7 @@ public partial interface IStreamingApiClient : global::System.IDisposable /// - /// + /// /// global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } diff --git a/src/libs/HeyGen/Generated/HeyGen.ITalkingPhotoClient.g.cs b/src/libs/HeyGen/Generated/HeyGen.ITalkingPhotoClient.g.cs index 6752d14..e89ac37 100644 --- a/src/libs/HeyGen/Generated/HeyGen.ITalkingPhotoClient.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.ITalkingPhotoClient.g.cs @@ -62,7 +62,7 @@ public partial interface ITalkingPhotoClient : global::System.IDisposable /// - /// + /// /// global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } diff --git a/src/libs/HeyGen/Generated/HeyGen.ITemplateApiClient.g.cs b/src/libs/HeyGen/Generated/HeyGen.ITemplateApiClient.g.cs index bea7890..0e2a0f6 100644 --- a/src/libs/HeyGen/Generated/HeyGen.ITemplateApiClient.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.ITemplateApiClient.g.cs @@ -68,7 +68,7 @@ public partial interface ITemplateApiClient : global::System.IDisposable /// - /// + /// /// global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } diff --git a/src/libs/HeyGen/Generated/HeyGen.IUserClient.g.cs b/src/libs/HeyGen/Generated/HeyGen.IUserClient.g.cs index 10d390d..f1b93fa 100644 --- a/src/libs/HeyGen/Generated/HeyGen.IUserClient.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.IUserClient.g.cs @@ -62,7 +62,7 @@ public partial interface IUserClient : global::System.IDisposable /// - /// + /// /// global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } diff --git a/src/libs/HeyGen/Generated/HeyGen.IVideoTranslateApiClient.g.cs b/src/libs/HeyGen/Generated/HeyGen.IVideoTranslateApiClient.g.cs index 7ef7624..773c7b4 100644 --- a/src/libs/HeyGen/Generated/HeyGen.IVideoTranslateApiClient.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.IVideoTranslateApiClient.g.cs @@ -62,7 +62,7 @@ public partial interface IVideoTranslateApiClient : global::System.IDisposable /// - /// + /// /// global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } diff --git a/src/libs/HeyGen/Generated/HeyGen.IWebhooksClient.g.cs b/src/libs/HeyGen/Generated/HeyGen.IWebhooksClient.g.cs index be37143..53bd218 100644 --- a/src/libs/HeyGen/Generated/HeyGen.IWebhooksClient.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.IWebhooksClient.g.cs @@ -62,7 +62,7 @@ public partial interface IWebhooksClient : global::System.IDisposable /// - /// + /// /// global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } diff --git a/src/libs/HeyGen/Generated/HeyGen.JsonConverters.UnixTimestamp.g.cs b/src/libs/HeyGen/Generated/HeyGen.JsonConverters.UnixTimestamp.g.cs index 9bbf7d7..3ba08a6 100644 --- a/src/libs/HeyGen/Generated/HeyGen.JsonConverters.UnixTimestamp.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.JsonConverters.UnixTimestamp.g.cs @@ -19,7 +19,7 @@ public class UnixTimestampJsonConverter : global::System.Text.Json.Serialization { return global::System.DateTimeOffset.FromUnixTimeSeconds(unixTimestamp); } - + return global::System.DateTimeOffset.FromUnixTimeMilliseconds(unixTimestamp); } if (reader.TryGetInt32(out int unixTimestampInt)) diff --git a/src/libs/HeyGen/Generated/HeyGen.JsonSerializerContext.g.cs b/src/libs/HeyGen/Generated/HeyGen.JsonSerializerContext.g.cs index 13efcca..59ff8a3 100644 --- a/src/libs/HeyGen/Generated/HeyGen.JsonSerializerContext.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.JsonSerializerContext.g.cs @@ -7,7 +7,7 @@ namespace HeyGen { /// - /// + /// /// [global::System.Text.Json.Serialization.JsonSourceGenerationOptions( DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, @@ -16,6 +16,7 @@ namespace HeyGen typeof(global::HeyGen.JsonConverters.UnixTimestampJsonConverter), })] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::HeyGen.JsonSerializerContextTypes))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List), TypeInfoPropertyName = "SystemCollectionsGeneric_ObjectList")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::HeyGen.V2VideoGenerateRequest))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(object))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::HeyGen.V2VideoGenerateRequestDimension))] @@ -46,7 +47,6 @@ namespace HeyGen [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::HeyGen.PersonalizedVideoAddContactRequestVariablesListItem))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] public sealed partial class SourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext { diff --git a/src/libs/HeyGen/Generated/HeyGen.JsonSerializerContextTypes.g.cs b/src/libs/HeyGen/Generated/HeyGen.JsonSerializerContextTypes.g.cs index 4e4ebd2..3008e18 100644 --- a/src/libs/HeyGen/Generated/HeyGen.JsonSerializerContextTypes.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.JsonSerializerContextTypes.g.cs @@ -6,152 +6,157 @@ namespace HeyGen { /// - /// + /// /// public sealed partial class JsonSerializerContextTypes { /// - /// + /// /// public global::System.Collections.Generic.Dictionary? StringStringDictionary { get; set; } /// - /// + /// /// public global::System.Collections.Generic.Dictionary? StringObjectDictionary { get; set; } /// - /// + /// Runtime object lists used by dynamic JSON payloads such as tool arguments. + /// + public global::System.Collections.Generic.List? ObjectList { get; set; } + + /// + /// /// public global::System.Text.Json.JsonElement? JsonElement { get; set; } /// - /// + /// /// public global::HeyGen.V2VideoGenerateRequest? Type0 { get; set; } /// - /// + /// /// public object? Type1 { get; set; } /// - /// + /// /// public global::HeyGen.V2VideoGenerateRequestDimension? Type2 { get; set; } /// - /// + /// /// public double? Type3 { get; set; } /// - /// + /// /// public bool? Type4 { get; set; } /// - /// + /// /// public string? Type5 { get; set; } /// - /// + /// /// public global::System.Collections.Generic.IList? Type6 { get; set; } /// - /// + /// /// public global::HeyGen.V2VideoGenerateRequestVideoInput? Type7 { get; set; } /// - /// + /// /// public global::HeyGen.V2VideoGenerateRequestVideoInputCharacter? Type8 { get; set; } /// - /// + /// /// public global::HeyGen.V2VideoGenerateRequestVideoInputVoice? Type9 { get; set; } /// - /// + /// /// public global::HeyGen.V2TemplateGenerateRequest? Type10 { get; set; } /// - /// + /// /// public global::HeyGen.V2TemplateGenerateRequestDimension? Type11 { get; set; } /// - /// + /// /// public global::HeyGen.V2TemplateGenerateRequestVariables? Type12 { get; set; } /// - /// + /// /// public global::HeyGen.V2TemplateGenerateRequestVariablesFirstName? Type13 { get; set; } /// - /// + /// /// public global::HeyGen.V2TemplateGenerateRequestVariablesFirstNameProperties? Type14 { get; set; } /// - /// + /// /// public global::HeyGen.V2VideoTranslateRequest? Type15 { get; set; } /// - /// + /// /// public global::HeyGen.StreamingNewRequest? Type16 { get; set; } /// - /// + /// /// public global::HeyGen.StreamingStartRequest? Type17 { get; set; } /// - /// + /// /// public global::HeyGen.StreamingStartRequestSdp? Type18 { get; set; } /// - /// + /// /// public global::HeyGen.StreamingIceRequest? Type19 { get; set; } /// - /// + /// /// public global::HeyGen.StreamingIceRequestCandidate? Type20 { get; set; } /// - /// + /// /// public global::HeyGen.StreamingTaskRequest? Type21 { get; set; } /// - /// + /// /// public global::HeyGen.StreamingStopRequest? Type22 { get; set; } /// - /// + /// /// public global::HeyGen.StreamingInterruptRequest? Type23 { get; set; } /// - /// + /// /// public global::HeyGen.V1WebhookEndpointAddRequest? Type24 { get; set; } /// - /// + /// /// public global::System.Collections.Generic.IList? Type25 { get; set; } /// - /// + /// /// public global::HeyGen.PersonalizedVideoAddContactRequest? Type26 { get; set; } /// - /// + /// /// public global::System.Collections.Generic.IList? Type27 { get; set; } /// - /// + /// /// public global::HeyGen.PersonalizedVideoAddContactRequestVariablesListItem? Type28 { get; set; } /// - /// + /// /// public global::System.Collections.Generic.List? ListType0 { get; set; } /// - /// + /// /// public global::System.Collections.Generic.List? ListType1 { get; set; } /// - /// + /// /// public global::System.Collections.Generic.List? ListType2 { get; set; } } diff --git a/src/libs/HeyGen/Generated/HeyGen.ListsClient.V1AvatarList.g.cs b/src/libs/HeyGen/Generated/HeyGen.ListsClient.V1AvatarList.g.cs index 217fd05..fa07328 100644 --- a/src/libs/HeyGen/Generated/HeyGen.ListsClient.V1AvatarList.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.ListsClient.V1AvatarList.g.cs @@ -134,7 +134,7 @@ await V1AvatarListAsResponseAsync( __authorization.Location == "Header") { __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); - } + } } global::HeyGen.AutoSDKRequestOptionsSupport.ApplyHeaders( request: __httpRequest, @@ -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..449f3a8 100644 --- a/src/libs/HeyGen/Generated/HeyGen.ListsClient.V1VideoList.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.ListsClient.V1VideoList.g.cs @@ -134,7 +134,7 @@ await V1VideoListAsResponseAsync( __authorization.Location == "Header") { __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); - } + } } global::HeyGen.AutoSDKRequestOptionsSupport.ApplyHeaders( request: __httpRequest, @@ -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..e4783df 100644 --- a/src/libs/HeyGen/Generated/HeyGen.ListsClient.V1VoiceList.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.ListsClient.V1VoiceList.g.cs @@ -134,7 +134,7 @@ await V1VoiceListAsResponseAsync( __authorization.Location == "Header") { __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); - } + } } global::HeyGen.AutoSDKRequestOptionsSupport.ApplyHeaders( request: __httpRequest, @@ -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..3d750f6 100644 --- a/src/libs/HeyGen/Generated/HeyGen.ListsClient.V2Avatars.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.ListsClient.V2Avatars.g.cs @@ -134,7 +134,7 @@ await V2AvatarsAsResponseAsync( __authorization.Location == "Header") { __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); - } + } } global::HeyGen.AutoSDKRequestOptionsSupport.ApplyHeaders( request: __httpRequest, @@ -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..a3b376c 100644 --- a/src/libs/HeyGen/Generated/HeyGen.ListsClient.V2Voices.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.ListsClient.V2Voices.g.cs @@ -134,7 +134,7 @@ await V2VoicesAsResponseAsync( __authorization.Location == "Header") { __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); - } + } } global::HeyGen.AutoSDKRequestOptionsSupport.ApplyHeaders( request: __httpRequest, @@ -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.ListsClient.g.cs b/src/libs/HeyGen/Generated/HeyGen.ListsClient.g.cs index ac0a21d..f7dfa0f 100644 --- a/src/libs/HeyGen/Generated/HeyGen.ListsClient.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.ListsClient.g.cs @@ -10,7 +10,7 @@ namespace HeyGen public sealed partial class ListsClient : global::HeyGen.IListsClient, global::System.IDisposable { /// - /// + /// /// public const string DefaultBaseUrl = "https://api.heygen.com/"; @@ -36,10 +36,17 @@ public sealed partial class ListsClient : global::HeyGen.IListsClient, global::S internal global::HeyGen.AutoSDKServerConfiguration AutoSDKServerConfiguration { get; set; } = new global::HeyGen.AutoSDKServerConfiguration(); + + internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::HeyGen.SourceGenerationContext.Default); + /// - /// + /// /// - public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::HeyGen.SourceGenerationContext.Default; + public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext + { + get => JsonSerializerContextProvider.Value; + set => JsonSerializerContextProvider = new(() => 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.PersonalizedVideoAddContactRequest.g.cs b/src/libs/HeyGen/Generated/HeyGen.Models.PersonalizedVideoAddContactRequest.g.cs index 50a06a7..7a2963a 100644 --- a/src/libs/HeyGen/Generated/HeyGen.Models.PersonalizedVideoAddContactRequest.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.Models.PersonalizedVideoAddContactRequest.g.cs @@ -4,7 +4,7 @@ namespace HeyGen { /// - /// + /// /// public sealed partial class PersonalizedVideoAddContactRequest { 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.PersonalizedVideoAddContactRequestVariablesListItem.g.cs b/src/libs/HeyGen/Generated/HeyGen.Models.PersonalizedVideoAddContactRequestVariablesListItem.g.cs index d4c4b39..768bc4a 100644 --- a/src/libs/HeyGen/Generated/HeyGen.Models.PersonalizedVideoAddContactRequestVariablesListItem.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.Models.PersonalizedVideoAddContactRequestVariablesListItem.g.cs @@ -4,7 +4,7 @@ namespace HeyGen { /// - /// + /// /// public sealed partial class PersonalizedVideoAddContactRequestVariablesListItem { 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.StreamingCreateTokenRequest.g.cs b/src/libs/HeyGen/Generated/HeyGen.Models.StreamingCreateTokenRequest.g.cs index 9b8aa89..e017755 100644 --- a/src/libs/HeyGen/Generated/HeyGen.Models.StreamingCreateTokenRequest.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.Models.StreamingCreateTokenRequest.g.cs @@ -4,7 +4,7 @@ namespace HeyGen { /// - /// + /// /// public sealed partial class StreamingCreateTokenRequest { 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.StreamingIceRequest.g.cs b/src/libs/HeyGen/Generated/HeyGen.Models.StreamingIceRequest.g.cs index b84bf2b..1b551cb 100644 --- a/src/libs/HeyGen/Generated/HeyGen.Models.StreamingIceRequest.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.Models.StreamingIceRequest.g.cs @@ -4,12 +4,12 @@ namespace HeyGen { /// - /// + /// /// public sealed partial class StreamingIceRequest { /// - /// + /// /// [global::System.Text.Json.Serialization.JsonPropertyName("candidate")] public global::HeyGen.StreamingIceRequestCandidate? Candidate { get; set; } 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.StreamingIceRequestCandidate.g.cs b/src/libs/HeyGen/Generated/HeyGen.Models.StreamingIceRequestCandidate.g.cs index dfd32fb..74838f7 100644 --- a/src/libs/HeyGen/Generated/HeyGen.Models.StreamingIceRequestCandidate.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.Models.StreamingIceRequestCandidate.g.cs @@ -4,7 +4,7 @@ namespace HeyGen { /// - /// + /// /// public sealed partial class StreamingIceRequestCandidate { 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.StreamingInterruptRequest.g.cs b/src/libs/HeyGen/Generated/HeyGen.Models.StreamingInterruptRequest.g.cs index f8551ab..8dd66be 100644 --- a/src/libs/HeyGen/Generated/HeyGen.Models.StreamingInterruptRequest.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.Models.StreamingInterruptRequest.g.cs @@ -4,7 +4,7 @@ namespace HeyGen { /// - /// + /// /// public sealed partial class StreamingInterruptRequest { 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.StreamingNewRequest.g.cs b/src/libs/HeyGen/Generated/HeyGen.Models.StreamingNewRequest.g.cs index 005fe33..254b5d4 100644 --- a/src/libs/HeyGen/Generated/HeyGen.Models.StreamingNewRequest.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.Models.StreamingNewRequest.g.cs @@ -4,7 +4,7 @@ namespace HeyGen { /// - /// + /// /// public sealed partial class StreamingNewRequest { 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.StreamingStartRequest.g.cs b/src/libs/HeyGen/Generated/HeyGen.Models.StreamingStartRequest.g.cs index 953c211..f068098 100644 --- a/src/libs/HeyGen/Generated/HeyGen.Models.StreamingStartRequest.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.Models.StreamingStartRequest.g.cs @@ -4,12 +4,12 @@ namespace HeyGen { /// - /// + /// /// public sealed partial class StreamingStartRequest { /// - /// + /// /// [global::System.Text.Json.Serialization.JsonPropertyName("sdp")] public global::HeyGen.StreamingStartRequestSdp? Sdp { get; set; } 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.StreamingStartRequestSdp.g.cs b/src/libs/HeyGen/Generated/HeyGen.Models.StreamingStartRequestSdp.g.cs index eeadc04..cdce13d 100644 --- a/src/libs/HeyGen/Generated/HeyGen.Models.StreamingStartRequestSdp.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.Models.StreamingStartRequestSdp.g.cs @@ -4,7 +4,7 @@ namespace HeyGen { /// - /// + /// /// public sealed partial class StreamingStartRequestSdp { 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.StreamingStopRequest.g.cs b/src/libs/HeyGen/Generated/HeyGen.Models.StreamingStopRequest.g.cs index f61ed55..03ffc6a 100644 --- a/src/libs/HeyGen/Generated/HeyGen.Models.StreamingStopRequest.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.Models.StreamingStopRequest.g.cs @@ -4,7 +4,7 @@ namespace HeyGen { /// - /// + /// /// public sealed partial class StreamingStopRequest { 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.StreamingTaskRequest.g.cs b/src/libs/HeyGen/Generated/HeyGen.Models.StreamingTaskRequest.g.cs index b253c40..b2c66d3 100644 --- a/src/libs/HeyGen/Generated/HeyGen.Models.StreamingTaskRequest.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.Models.StreamingTaskRequest.g.cs @@ -4,7 +4,7 @@ namespace HeyGen { /// - /// + /// /// public sealed partial class StreamingTaskRequest { 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.V1WebhookEndpointAddRequest.g.cs b/src/libs/HeyGen/Generated/HeyGen.Models.V1WebhookEndpointAddRequest.g.cs index 7858117..41396c1 100644 --- a/src/libs/HeyGen/Generated/HeyGen.Models.V1WebhookEndpointAddRequest.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.Models.V1WebhookEndpointAddRequest.g.cs @@ -4,7 +4,7 @@ namespace HeyGen { /// - /// + /// /// public sealed partial class V1WebhookEndpointAddRequest { 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.V1WebhookEndpointAddRequestEvent.g.cs b/src/libs/HeyGen/Generated/HeyGen.Models.V1WebhookEndpointAddRequestEvent.g.cs index 139967b..b3e1f21 100644 --- a/src/libs/HeyGen/Generated/HeyGen.Models.V1WebhookEndpointAddRequestEvent.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.Models.V1WebhookEndpointAddRequestEvent.g.cs @@ -4,7 +4,7 @@ namespace HeyGen { /// - /// + /// /// public sealed partial class V1WebhookEndpointAddRequestEvent { 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.V2TemplateGenerateRequest.g.cs b/src/libs/HeyGen/Generated/HeyGen.Models.V2TemplateGenerateRequest.g.cs index 9a0b00b..f0bf7ab 100644 --- a/src/libs/HeyGen/Generated/HeyGen.Models.V2TemplateGenerateRequest.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.Models.V2TemplateGenerateRequest.g.cs @@ -4,7 +4,7 @@ namespace HeyGen { /// - /// + /// /// public sealed partial class V2TemplateGenerateRequest { @@ -16,7 +16,7 @@ public sealed partial class V2TemplateGenerateRequest public bool? Caption { get; set; } /// - /// + /// /// [global::System.Text.Json.Serialization.JsonPropertyName("dimension")] public global::HeyGen.V2TemplateGenerateRequestDimension? Dimension { get; set; } @@ -36,7 +36,7 @@ public sealed partial class V2TemplateGenerateRequest public string? Title { get; set; } /// - /// + /// /// [global::System.Text.Json.Serialization.JsonPropertyName("variables")] public global::HeyGen.V2TemplateGenerateRequestVariables? Variables { get; set; } 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.V2TemplateGenerateRequestDimension.g.cs b/src/libs/HeyGen/Generated/HeyGen.Models.V2TemplateGenerateRequestDimension.g.cs index 3744882..935d008 100644 --- a/src/libs/HeyGen/Generated/HeyGen.Models.V2TemplateGenerateRequestDimension.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.Models.V2TemplateGenerateRequestDimension.g.cs @@ -4,7 +4,7 @@ namespace HeyGen { /// - /// + /// /// public sealed partial class V2TemplateGenerateRequestDimension { 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.V2TemplateGenerateRequestVariables.g.cs b/src/libs/HeyGen/Generated/HeyGen.Models.V2TemplateGenerateRequestVariables.g.cs index f46b59e..bdf16f3 100644 --- a/src/libs/HeyGen/Generated/HeyGen.Models.V2TemplateGenerateRequestVariables.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.Models.V2TemplateGenerateRequestVariables.g.cs @@ -4,12 +4,12 @@ namespace HeyGen { /// - /// + /// /// public sealed partial class V2TemplateGenerateRequestVariables { /// - /// + /// /// [global::System.Text.Json.Serialization.JsonPropertyName("first_name")] public global::HeyGen.V2TemplateGenerateRequestVariablesFirstName? FirstName { get; set; } 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.V2TemplateGenerateRequestVariablesFirstName.g.cs b/src/libs/HeyGen/Generated/HeyGen.Models.V2TemplateGenerateRequestVariablesFirstName.g.cs index a7ac4f8..8b5f1e2 100644 --- a/src/libs/HeyGen/Generated/HeyGen.Models.V2TemplateGenerateRequestVariablesFirstName.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.Models.V2TemplateGenerateRequestVariablesFirstName.g.cs @@ -4,7 +4,7 @@ namespace HeyGen { /// - /// + /// /// public sealed partial class V2TemplateGenerateRequestVariablesFirstName { @@ -16,7 +16,7 @@ public sealed partial class V2TemplateGenerateRequestVariablesFirstName public string? Name { get; set; } /// - /// + /// /// [global::System.Text.Json.Serialization.JsonPropertyName("properties")] public global::HeyGen.V2TemplateGenerateRequestVariablesFirstNameProperties? Properties { get; set; } 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.V2TemplateGenerateRequestVariablesFirstNameProperties.g.cs b/src/libs/HeyGen/Generated/HeyGen.Models.V2TemplateGenerateRequestVariablesFirstNameProperties.g.cs index 57336ce..3344861 100644 --- a/src/libs/HeyGen/Generated/HeyGen.Models.V2TemplateGenerateRequestVariablesFirstNameProperties.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.Models.V2TemplateGenerateRequestVariablesFirstNameProperties.g.cs @@ -4,7 +4,7 @@ namespace HeyGen { /// - /// + /// /// public sealed partial class V2TemplateGenerateRequestVariablesFirstNameProperties { 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.V2VideoGenerateRequest.g.cs b/src/libs/HeyGen/Generated/HeyGen.Models.V2VideoGenerateRequest.g.cs index 2de2fcb..30243ae 100644 --- a/src/libs/HeyGen/Generated/HeyGen.Models.V2VideoGenerateRequest.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.Models.V2VideoGenerateRequest.g.cs @@ -4,7 +4,7 @@ namespace HeyGen { /// - /// + /// /// public sealed partial class V2VideoGenerateRequest { @@ -23,7 +23,7 @@ public sealed partial class V2VideoGenerateRequest public object? CallbackId { get; set; } /// - /// + /// /// [global::System.Text.Json.Serialization.JsonPropertyName("dimension")] public global::HeyGen.V2VideoGenerateRequestDimension? Dimension { get; set; } 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.V2VideoGenerateRequestDimension.g.cs b/src/libs/HeyGen/Generated/HeyGen.Models.V2VideoGenerateRequestDimension.g.cs index 2613d87..74338d9 100644 --- a/src/libs/HeyGen/Generated/HeyGen.Models.V2VideoGenerateRequestDimension.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.Models.V2VideoGenerateRequestDimension.g.cs @@ -4,7 +4,7 @@ namespace HeyGen { /// - /// + /// /// public sealed partial class V2VideoGenerateRequestDimension { 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.V2VideoGenerateRequestVideoInput.g.cs b/src/libs/HeyGen/Generated/HeyGen.Models.V2VideoGenerateRequestVideoInput.g.cs index 47a7059..f0eb9fd 100644 --- a/src/libs/HeyGen/Generated/HeyGen.Models.V2VideoGenerateRequestVideoInput.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.Models.V2VideoGenerateRequestVideoInput.g.cs @@ -4,18 +4,18 @@ namespace HeyGen { /// - /// + /// /// public sealed partial class V2VideoGenerateRequestVideoInput { /// - /// + /// /// [global::System.Text.Json.Serialization.JsonPropertyName("character")] public global::HeyGen.V2VideoGenerateRequestVideoInputCharacter? Character { get; set; } /// - /// + /// /// [global::System.Text.Json.Serialization.JsonPropertyName("voice")] public global::HeyGen.V2VideoGenerateRequestVideoInputVoice? Voice { get; set; } 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.V2VideoGenerateRequestVideoInputCharacter.g.cs b/src/libs/HeyGen/Generated/HeyGen.Models.V2VideoGenerateRequestVideoInputCharacter.g.cs index 719bd15..95b74f9 100644 --- a/src/libs/HeyGen/Generated/HeyGen.Models.V2VideoGenerateRequestVideoInputCharacter.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.Models.V2VideoGenerateRequestVideoInputCharacter.g.cs @@ -4,7 +4,7 @@ namespace HeyGen { /// - /// + /// /// public sealed partial class V2VideoGenerateRequestVideoInputCharacter { 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.V2VideoGenerateRequestVideoInputVoice.g.cs b/src/libs/HeyGen/Generated/HeyGen.Models.V2VideoGenerateRequestVideoInputVoice.g.cs index 19383cd..4f32b39 100644 --- a/src/libs/HeyGen/Generated/HeyGen.Models.V2VideoGenerateRequestVideoInputVoice.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.Models.V2VideoGenerateRequestVideoInputVoice.g.cs @@ -4,7 +4,7 @@ namespace HeyGen { /// - /// + /// /// public sealed partial class V2VideoGenerateRequestVideoInputVoice { 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.Models.V2VideoTranslateRequest.g.cs b/src/libs/HeyGen/Generated/HeyGen.Models.V2VideoTranslateRequest.g.cs index c6a61d6..35c6923 100644 --- a/src/libs/HeyGen/Generated/HeyGen.Models.V2VideoTranslateRequest.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.Models.V2VideoTranslateRequest.g.cs @@ -4,7 +4,7 @@ namespace HeyGen { /// - /// + /// /// public sealed partial class V2VideoTranslateRequest { diff --git a/src/libs/HeyGen/Generated/HeyGen.PathBuilder.g.cs b/src/libs/HeyGen/Generated/HeyGen.PathBuilder.g.cs index db07486..c72e4e0 100644 --- a/src/libs/HeyGen/Generated/HeyGen.PathBuilder.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.PathBuilder.g.cs @@ -65,13 +65,14 @@ public PathBuilder AddRequiredParameter( /// The current instance. public PathBuilder AddRequiredParameter( string name, - global::System.Collections.Generic.IEnumerable value, + global::System.Collections.Generic.IEnumerable value, string delimiter = ",", bool explode = false) { + var nonNullValues = global::System.Linq.Enumerable.OfType(value); if (explode) { - foreach (var item in value) + foreach (var item in nonNullValues) { AddRequiredParameter($"{name}", item); } @@ -79,7 +80,7 @@ public PathBuilder AddRequiredParameter( return this; } - AddRequiredParameter(name, string.Join(delimiter, value)); + AddRequiredParameter(name, string.Join(delimiter, nonNullValues)); return this; } @@ -138,7 +139,7 @@ public PathBuilder AddOptionalParameter( /// The current instance. public PathBuilder AddOptionalParameter( string name, - global::System.Collections.Generic.IEnumerable? value, + global::System.Collections.Generic.IEnumerable? value, string delimiter = ",", bool explode = false) { @@ -266,32 +267,32 @@ public PathBuilder AddRawQueryString( } /// - /// + /// /// public class EndPointAuthorization { /// - /// + /// /// public string Type { get; set; } = string.Empty; /// - /// + /// /// public string SchemeId { get; set; } = string.Empty; /// - /// + /// /// public string Location { get; set; } = string.Empty; /// - /// + /// /// public string Name { get; set; } = string.Empty; /// - /// + /// /// public string Value { get; set; } = string.Empty; } diff --git a/src/libs/HeyGen/Generated/HeyGen.PersonalizedVideoClient.PersonalizedVideoAddContact.g.cs b/src/libs/HeyGen/Generated/HeyGen.PersonalizedVideoClient.PersonalizedVideoAddContact.g.cs index 31c5e42..5e8687f 100644 --- a/src/libs/HeyGen/Generated/HeyGen.PersonalizedVideoClient.PersonalizedVideoAddContact.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.PersonalizedVideoClient.PersonalizedVideoAddContact.g.cs @@ -147,7 +147,7 @@ await PersonalizedVideoAddContactAsResponseAsync( __authorization.Location == "Header") { __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); - } + } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( @@ -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..2b793fb 100644 --- a/src/libs/HeyGen/Generated/HeyGen.PersonalizedVideoClient.PersonalizedVideoAudienceDetail.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.PersonalizedVideoClient.PersonalizedVideoAudienceDetail.g.cs @@ -149,7 +149,7 @@ await PersonalizedVideoAudienceDetailAsResponseAsync( __authorization.Location == "Header") { __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); - } + } } global::HeyGen.AutoSDKRequestOptionsSupport.ApplyHeaders( request: __httpRequest, @@ -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..2633514 100644 --- a/src/libs/HeyGen/Generated/HeyGen.PersonalizedVideoClient.PersonalizedVideoProjectDetail.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.PersonalizedVideoClient.PersonalizedVideoProjectDetail.g.cs @@ -149,7 +149,7 @@ await PersonalizedVideoProjectDetailAsResponseAsync( __authorization.Location == "Header") { __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); - } + } } global::HeyGen.AutoSDKRequestOptionsSupport.ApplyHeaders( request: __httpRequest, @@ -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.PersonalizedVideoClient.g.cs b/src/libs/HeyGen/Generated/HeyGen.PersonalizedVideoClient.g.cs index 550b5af..3a94662 100644 --- a/src/libs/HeyGen/Generated/HeyGen.PersonalizedVideoClient.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.PersonalizedVideoClient.g.cs @@ -13,7 +13,7 @@ namespace HeyGen public sealed partial class PersonalizedVideoClient : global::HeyGen.IPersonalizedVideoClient, global::System.IDisposable { /// - /// + /// /// public const string DefaultBaseUrl = "https://api.heygen.com/"; @@ -39,10 +39,17 @@ public sealed partial class PersonalizedVideoClient : global::HeyGen.IPersonaliz internal global::HeyGen.AutoSDKServerConfiguration AutoSDKServerConfiguration { get; set; } = new global::HeyGen.AutoSDKServerConfiguration(); + + internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::HeyGen.SourceGenerationContext.Default); + /// - /// + /// /// - public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::HeyGen.SourceGenerationContext.Default; + public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext + { + get => JsonSerializerContextProvider.Value; + set => JsonSerializerContextProvider = new(() => value); + } diff --git a/src/libs/HeyGen/Generated/HeyGen.Polyfills.g.cs b/src/libs/HeyGen/Generated/HeyGen.Polyfills.g.cs index 256e9c2..a704188 100644 --- a/src/libs/HeyGen/Generated/HeyGen.Polyfills.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.Polyfills.g.cs @@ -4,13 +4,13 @@ namespace HeyGen { /// - /// + /// /// public static partial class AutoSdkPolyfills { #if !NET6_0_OR_GREATER /// - /// + /// /// /// /// @@ -23,7 +23,7 @@ public static partial class AutoSdkPolyfills return content.ReadAsStringAsync(); } /// - /// + /// /// /// /// @@ -36,7 +36,7 @@ public static partial class AutoSdkPolyfills return content.ReadAsStreamAsync(); } /// - /// + /// /// /// /// diff --git a/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingAvatarList.g.cs b/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingAvatarList.g.cs index 0ee9f76..a2c2d05 100644 --- a/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingAvatarList.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingAvatarList.g.cs @@ -39,10 +39,12 @@ public partial class StreamingApiClient { s_StreamingAvatarListSecurityRequirement0, }; partial void PrepareStreamingAvatarListArguments( - global::System.Net.Http.HttpClient httpClient); + global::System.Net.Http.HttpClient httpClient, + string request); partial void PrepareStreamingAvatarListRequest( global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage); + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string request); partial void ProcessStreamingAvatarListResponse( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpResponseMessage httpResponseMessage); @@ -51,14 +53,19 @@ partial void ProcessStreamingAvatarListResponse( /// streaming/avatar.list
/// streaming/avatar.list /// + /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task StreamingAvatarListAsync( + + string request, global::HeyGen.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) { await StreamingAvatarListAsResponseAsync( + + request: request, requestOptions: requestOptions, cancellationToken: cancellationToken ).ConfigureAwait(false); @@ -67,17 +74,23 @@ await StreamingAvatarListAsResponseAsync( /// streaming/avatar.list
/// streaming/avatar.list /// + /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task StreamingAvatarListAsResponseAsync( + + string request, global::HeyGen.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + PrepareArguments( client: HttpClient); PrepareStreamingAvatarListArguments( - httpClient: HttpClient); + httpClient: HttpClient, + request: request); var __authorizations = global::HeyGen.EndPointSecurityResolver.ResolveAuthorizations( @@ -134,8 +147,14 @@ await StreamingAvatarListAsResponseAsync( __authorization.Location == "Header") { __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); - } + } } + + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: request, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "text/plain"); + __httpRequest.Content = __httpRequestContent; global::HeyGen.AutoSDKRequestOptionsSupport.ApplyHeaders( request: __httpRequest, clientHeaders: Options.Headers, @@ -146,7 +165,8 @@ await StreamingAvatarListAsResponseAsync( request: __httpRequest); PrepareStreamingAvatarListRequest( httpClient: HttpClient, - httpRequestMessage: __httpRequest); + httpRequestMessage: __httpRequest, + request: request); return __httpRequest; } @@ -350,17 +370,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 +406,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..cbc428e 100644 --- a/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingCreateToken.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingCreateToken.g.cs @@ -147,7 +147,7 @@ await StreamingCreateTokenAsResponseAsync( __authorization.Location == "Header") { __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); - } + } } var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, request.GetType(), JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( @@ -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..783bd57 100644 --- a/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingIce.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingIce.g.cs @@ -147,7 +147,7 @@ await StreamingIceAsResponseAsync( __authorization.Location == "Header") { __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); - } + } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( @@ -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..947e28a 100644 --- a/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingInterrupt.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingInterrupt.g.cs @@ -147,7 +147,7 @@ await StreamingInterruptAsResponseAsync( __authorization.Location == "Header") { __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); - } + } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( @@ -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..a94c684 100644 --- a/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingList.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingList.g.cs @@ -39,10 +39,12 @@ public partial class StreamingApiClient { s_StreamingListSecurityRequirement0, }; partial void PrepareStreamingListArguments( - global::System.Net.Http.HttpClient httpClient); + global::System.Net.Http.HttpClient httpClient, + string request); partial void PrepareStreamingListRequest( global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage); + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string request); partial void ProcessStreamingListResponse( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpResponseMessage httpResponseMessage); @@ -51,14 +53,19 @@ partial void ProcessStreamingListResponse( /// streaming.list
/// streaming.list /// + /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task StreamingListAsync( + + string request, global::HeyGen.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) { await StreamingListAsResponseAsync( + + request: request, requestOptions: requestOptions, cancellationToken: cancellationToken ).ConfigureAwait(false); @@ -67,17 +74,23 @@ await StreamingListAsResponseAsync( /// streaming.list
/// streaming.list /// + /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task StreamingListAsResponseAsync( + + string request, global::HeyGen.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + PrepareArguments( client: HttpClient); PrepareStreamingListArguments( - httpClient: HttpClient); + httpClient: HttpClient, + request: request); var __authorizations = global::HeyGen.EndPointSecurityResolver.ResolveAuthorizations( @@ -134,8 +147,14 @@ await StreamingListAsResponseAsync( __authorization.Location == "Header") { __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); - } + } } + + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: request, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "text/plain"); + __httpRequest.Content = __httpRequestContent; global::HeyGen.AutoSDKRequestOptionsSupport.ApplyHeaders( request: __httpRequest, clientHeaders: Options.Headers, @@ -146,7 +165,8 @@ await StreamingListAsResponseAsync( request: __httpRequest); PrepareStreamingListRequest( httpClient: HttpClient, - httpRequestMessage: __httpRequest); + httpRequestMessage: __httpRequest, + request: request); return __httpRequest; } @@ -350,17 +370,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 +406,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..3149e8e 100644 --- a/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingNew.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingNew.g.cs @@ -147,7 +147,7 @@ await StreamingNewAsResponseAsync( __authorization.Location == "Header") { __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); - } + } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( @@ -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..30cbb8f 100644 --- a/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingStart.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingStart.g.cs @@ -147,7 +147,7 @@ await StreamingStartAsResponseAsync( __authorization.Location == "Header") { __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); - } + } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( @@ -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..ab8b382 100644 --- a/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingStop.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingStop.g.cs @@ -147,7 +147,7 @@ await StreamingStopAsResponseAsync( __authorization.Location == "Header") { __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); - } + } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( @@ -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..4fe6fd4 100644 --- a/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingTask.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingTask.g.cs @@ -147,7 +147,7 @@ await StreamingTaskAsResponseAsync( __authorization.Location == "Header") { __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); - } + } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( @@ -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.StreamingApiClient.g.cs b/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.g.cs index 32c7107..a0623f1 100644 --- a/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.g.cs @@ -12,7 +12,7 @@ namespace HeyGen public sealed partial class StreamingApiClient : global::HeyGen.IStreamingApiClient, global::System.IDisposable { /// - /// + /// /// public const string DefaultBaseUrl = "https://api.heygen.com/"; @@ -38,10 +38,17 @@ public sealed partial class StreamingApiClient : global::HeyGen.IStreamingApiCli internal global::HeyGen.AutoSDKServerConfiguration AutoSDKServerConfiguration { get; set; } = new global::HeyGen.AutoSDKServerConfiguration(); + + internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::HeyGen.SourceGenerationContext.Default); + /// - /// + /// /// - public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::HeyGen.SourceGenerationContext.Default; + public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext + { + get => JsonSerializerContextProvider.Value; + set => JsonSerializerContextProvider = new(() => 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..8c01115 100644 --- a/src/libs/HeyGen/Generated/HeyGen.TalkingPhotoClient.V1TalkingPhotoList.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.TalkingPhotoClient.V1TalkingPhotoList.g.cs @@ -134,7 +134,7 @@ await V1TalkingPhotoListAsResponseAsync( __authorization.Location == "Header") { __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); - } + } } global::HeyGen.AutoSDKRequestOptionsSupport.ApplyHeaders( request: __httpRequest, @@ -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..d6da08e 100644 --- a/src/libs/HeyGen/Generated/HeyGen.TalkingPhotoClient.V1TalkingPhotoUpload.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.TalkingPhotoClient.V1TalkingPhotoUpload.g.cs @@ -134,7 +134,7 @@ await V1TalkingPhotoUploadAsResponseAsync( __authorization.Location == "Header") { __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); - } + } } global::HeyGen.AutoSDKRequestOptionsSupport.ApplyHeaders( request: __httpRequest, @@ -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..6d1af9f 100644 --- a/src/libs/HeyGen/Generated/HeyGen.TalkingPhotoClient.V2TalkingPhotoIdDelete.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.TalkingPhotoClient.V2TalkingPhotoIdDelete.g.cs @@ -134,7 +134,7 @@ await V2TalkingPhotoIdDeleteAsResponseAsync( __authorization.Location == "Header") { __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); - } + } } global::HeyGen.AutoSDKRequestOptionsSupport.ApplyHeaders( request: __httpRequest, @@ -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.TalkingPhotoClient.g.cs b/src/libs/HeyGen/Generated/HeyGen.TalkingPhotoClient.g.cs index a81bc81..15a10ce 100644 --- a/src/libs/HeyGen/Generated/HeyGen.TalkingPhotoClient.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.TalkingPhotoClient.g.cs @@ -12,7 +12,7 @@ namespace HeyGen public sealed partial class TalkingPhotoClient : global::HeyGen.ITalkingPhotoClient, global::System.IDisposable { /// - /// + /// /// public const string DefaultBaseUrl = "https://api.heygen.com/"; @@ -38,10 +38,17 @@ public sealed partial class TalkingPhotoClient : global::HeyGen.ITalkingPhotoCli internal global::HeyGen.AutoSDKServerConfiguration AutoSDKServerConfiguration { get; set; } = new global::HeyGen.AutoSDKServerConfiguration(); + + internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::HeyGen.SourceGenerationContext.Default); + /// - /// + /// /// - public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::HeyGen.SourceGenerationContext.Default; + public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext + { + get => JsonSerializerContextProvider.Value; + set => JsonSerializerContextProvider = new(() => 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..4e80861 100644 --- a/src/libs/HeyGen/Generated/HeyGen.TemplateApiClient.V2TemplateGenerate.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.TemplateApiClient.V2TemplateGenerate.g.cs @@ -149,7 +149,7 @@ await V2TemplateGenerateAsResponseAsync( __authorization.Location == "Header") { __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); - } + } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( @@ -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..d32bfb4 100644 --- a/src/libs/HeyGen/Generated/HeyGen.TemplateApiClient.V2TemplateId.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.TemplateApiClient.V2TemplateId.g.cs @@ -134,7 +134,7 @@ await V2TemplateIdAsResponseAsync( __authorization.Location == "Header") { __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); - } + } } global::HeyGen.AutoSDKRequestOptionsSupport.ApplyHeaders( request: __httpRequest, @@ -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..99c04a8 100644 --- a/src/libs/HeyGen/Generated/HeyGen.TemplateApiClient.V2Templates.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.TemplateApiClient.V2Templates.g.cs @@ -134,7 +134,7 @@ await V2TemplatesAsResponseAsync( __authorization.Location == "Header") { __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); - } + } } global::HeyGen.AutoSDKRequestOptionsSupport.ApplyHeaders( request: __httpRequest, @@ -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.TemplateApiClient.g.cs b/src/libs/HeyGen/Generated/HeyGen.TemplateApiClient.g.cs index bd50027..c333234 100644 --- a/src/libs/HeyGen/Generated/HeyGen.TemplateApiClient.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.TemplateApiClient.g.cs @@ -18,7 +18,7 @@ namespace HeyGen public sealed partial class TemplateApiClient : global::HeyGen.ITemplateApiClient, global::System.IDisposable { /// - /// + /// /// public const string DefaultBaseUrl = "https://api.heygen.com/"; @@ -44,10 +44,17 @@ public sealed partial class TemplateApiClient : global::HeyGen.ITemplateApiClien internal global::HeyGen.AutoSDKServerConfiguration AutoSDKServerConfiguration { get; set; } = new global::HeyGen.AutoSDKServerConfiguration(); + + internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::HeyGen.SourceGenerationContext.Default); + /// - /// + /// /// - public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::HeyGen.SourceGenerationContext.Default; + public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext + { + get => JsonSerializerContextProvider.Value; + set => JsonSerializerContextProvider = new(() => 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..698c68e 100644 --- a/src/libs/HeyGen/Generated/HeyGen.UserClient.V2UserRemainingQuota.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.UserClient.V2UserRemainingQuota.g.cs @@ -134,7 +134,7 @@ await V2UserRemainingQuotaAsResponseAsync( __authorization.Location == "Header") { __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); - } + } } global::HeyGen.AutoSDKRequestOptionsSupport.ApplyHeaders( request: __httpRequest, @@ -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.UserClient.g.cs b/src/libs/HeyGen/Generated/HeyGen.UserClient.g.cs index 59aa52a..bd5f3f4 100644 --- a/src/libs/HeyGen/Generated/HeyGen.UserClient.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.UserClient.g.cs @@ -12,7 +12,7 @@ namespace HeyGen public sealed partial class UserClient : global::HeyGen.IUserClient, global::System.IDisposable { /// - /// + /// /// public const string DefaultBaseUrl = "https://api.heygen.com/"; @@ -38,10 +38,17 @@ public sealed partial class UserClient : global::HeyGen.IUserClient, global::Sys internal global::HeyGen.AutoSDKServerConfiguration AutoSDKServerConfiguration { get; set; } = new global::HeyGen.AutoSDKServerConfiguration(); + + internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::HeyGen.SourceGenerationContext.Default); + /// - /// + /// /// - public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::HeyGen.SourceGenerationContext.Default; + public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext + { + get => JsonSerializerContextProvider.Value; + set => JsonSerializerContextProvider = new(() => 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..78415dc 100644 --- a/src/libs/HeyGen/Generated/HeyGen.VideoTranslateApiClient.V2VideoTranslate.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.VideoTranslateApiClient.V2VideoTranslate.g.cs @@ -147,7 +147,7 @@ await V2VideoTranslateAsResponseAsync( __authorization.Location == "Header") { __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); - } + } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( @@ -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..3118c76 100644 --- a/src/libs/HeyGen/Generated/HeyGen.VideoTranslateApiClient.V2VideoTranslateIdStatus.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.VideoTranslateApiClient.V2VideoTranslateIdStatus.g.cs @@ -134,7 +134,7 @@ await V2VideoTranslateIdStatusAsResponseAsync( __authorization.Location == "Header") { __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); - } + } } global::HeyGen.AutoSDKRequestOptionsSupport.ApplyHeaders( request: __httpRequest, @@ -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..730cf9d 100644 --- a/src/libs/HeyGen/Generated/HeyGen.VideoTranslateApiClient.V2VideoTranslateTargetLanguages.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.VideoTranslateApiClient.V2VideoTranslateTargetLanguages.g.cs @@ -134,7 +134,7 @@ await V2VideoTranslateTargetLanguagesAsResponseAsync( __authorization.Location == "Header") { __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); - } + } } global::HeyGen.AutoSDKRequestOptionsSupport.ApplyHeaders( request: __httpRequest, @@ -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.VideoTranslateApiClient.g.cs b/src/libs/HeyGen/Generated/HeyGen.VideoTranslateApiClient.g.cs index 85ba2b3..b653806 100644 --- a/src/libs/HeyGen/Generated/HeyGen.VideoTranslateApiClient.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.VideoTranslateApiClient.g.cs @@ -12,7 +12,7 @@ namespace HeyGen public sealed partial class VideoTranslateApiClient : global::HeyGen.IVideoTranslateApiClient, global::System.IDisposable { /// - /// + /// /// public const string DefaultBaseUrl = "https://api.heygen.com/"; @@ -38,10 +38,17 @@ public sealed partial class VideoTranslateApiClient : global::HeyGen.IVideoTrans internal global::HeyGen.AutoSDKServerConfiguration AutoSDKServerConfiguration { get; set; } = new global::HeyGen.AutoSDKServerConfiguration(); + + internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::HeyGen.SourceGenerationContext.Default); + /// - /// + /// /// - public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::HeyGen.SourceGenerationContext.Default; + public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext + { + get => JsonSerializerContextProvider.Value; + set => JsonSerializerContextProvider = new(() => 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..4aaaa62 100644 --- a/src/libs/HeyGen/Generated/HeyGen.WebhooksClient.V1WebhookEndpointAdd.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.WebhooksClient.V1WebhookEndpointAdd.g.cs @@ -147,7 +147,7 @@ await V1WebhookEndpointAddAsResponseAsync( __authorization.Location == "Header") { __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); - } + } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( @@ -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..494b73d 100644 --- a/src/libs/HeyGen/Generated/HeyGen.WebhooksClient.V1WebhookEndpointDelete.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.WebhooksClient.V1WebhookEndpointDelete.g.cs @@ -149,7 +149,7 @@ await V1WebhookEndpointDeleteAsResponseAsync( __authorization.Location == "Header") { __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); - } + } } global::HeyGen.AutoSDKRequestOptionsSupport.ApplyHeaders( request: __httpRequest, @@ -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..a5959d9 100644 --- a/src/libs/HeyGen/Generated/HeyGen.WebhooksClient.V1WebhookEndpointList.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.WebhooksClient.V1WebhookEndpointList.g.cs @@ -134,7 +134,7 @@ await V1WebhookEndpointListAsResponseAsync( __authorization.Location == "Header") { __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); - } + } } global::HeyGen.AutoSDKRequestOptionsSupport.ApplyHeaders( request: __httpRequest, @@ -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..2868002 100644 --- a/src/libs/HeyGen/Generated/HeyGen.WebhooksClient.V1WebhookWebhookList.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.WebhooksClient.V1WebhookWebhookList.g.cs @@ -134,7 +134,7 @@ await V1WebhookWebhookListAsResponseAsync( __authorization.Location == "Header") { __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); - } + } } global::HeyGen.AutoSDKRequestOptionsSupport.ApplyHeaders( request: __httpRequest, @@ -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)); } } diff --git a/src/libs/HeyGen/Generated/HeyGen.WebhooksClient.g.cs b/src/libs/HeyGen/Generated/HeyGen.WebhooksClient.g.cs index 6c6d3f2..c0f41d9 100644 --- a/src/libs/HeyGen/Generated/HeyGen.WebhooksClient.g.cs +++ b/src/libs/HeyGen/Generated/HeyGen.WebhooksClient.g.cs @@ -12,7 +12,7 @@ namespace HeyGen public sealed partial class WebhooksClient : global::HeyGen.IWebhooksClient, global::System.IDisposable { /// - /// + /// /// public const string DefaultBaseUrl = "https://api.heygen.com/"; @@ -38,10 +38,17 @@ public sealed partial class WebhooksClient : global::HeyGen.IWebhooksClient, glo internal global::HeyGen.AutoSDKServerConfiguration AutoSDKServerConfiguration { get; set; } = new global::HeyGen.AutoSDKServerConfiguration(); + + internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::HeyGen.SourceGenerationContext.Default); + /// - /// + /// /// - public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::HeyGen.SourceGenerationContext.Default; + public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext + { + get => JsonSerializerContextProvider.Value; + set => JsonSerializerContextProvider = new(() => value); + } diff --git a/src/libs/HeyGen/Generated/autosdk.generated-examples.json b/src/libs/HeyGen/Generated/autosdk.generated-examples.json index 4bb0cf6..e0c70d3 100644 --- a/src/libs/HeyGen/Generated/autosdk.generated-examples.json +++ b/src/libs/HeyGen/Generated/autosdk.generated-examples.json @@ -27,11 +27,11 @@ "Title": "streaming/avatar.list", "Slug": "streamingavatarlist", "Description": "streaming/avatar.list", - "Language": "csharp", - "Code": "using var client = new HeyGenClient(apiKey);\nawait client.StreamingApi.StreamingAvatarListAsync();", - "Format": "sdk", + "Language": "http", + "Code": "### streaming/avatar.list\n# @name streamingAvatarList\nGET {{host}}/v1/streaming/avatar.list\nX-Api-Key: {{api_key}}\nContent-Type: text/plain", + "Format": "http", "OperationId": "streamingAvatarList", - "Setup": "This example assumes \u0060using HeyGen;\u0060 is in scope and \u0060apiKey\u0060 contains the required credential." + "Setup": null }, { "Order": 4, @@ -71,11 +71,11 @@ "Title": "streaming.list", "Slug": "streaminglist", "Description": "streaming.list", - "Language": "csharp", - "Code": "using var client = new HeyGenClient(apiKey);\nawait client.StreamingApi.StreamingListAsync();", - "Format": "sdk", + "Language": "http", + "Code": "### streaming.list\n# @name streamingList\nGET {{host}}/v1/streaming.list\nX-Api-Key: {{api_key}}\nContent-Type: text/plain", + "Format": "http", "OperationId": "streamingList", - "Setup": "This example assumes \u0060using HeyGen;\u0060 is in scope and \u0060apiKey\u0060 contains the required credential." + "Setup": null }, { "Order": 8,