diff --git a/src/libs/HeyGen/Generated/HeyGen.AssetsClient.V1AssetUpload.g.cs b/src/libs/HeyGen/Generated/HeyGen.AssetsClient.V1AssetUpload.g.cs
index 32580f3..a8e41b7 100644
--- a/src/libs/HeyGen/Generated/HeyGen.AssetsClient.V1AssetUpload.g.cs
+++ b/src/libs/HeyGen/Generated/HeyGen.AssetsClient.V1AssetUpload.g.cs
@@ -350,17 +350,15 @@ await V1AssetUploadAsResponseAsync(
}
catch (global::System.Exception __ex)
{
- throw new global::HeyGen.ApiException(
+ throw global::HeyGen.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
else
@@ -388,17 +386,15 @@ await V1AssetUploadAsResponseAsync(
{
}
- throw new global::HeyGen.ApiException(
+ throw global::HeyGen.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
diff --git a/src/libs/HeyGen/Generated/HeyGen.CreateVideoApiClient.V1VideoDelete.g.cs b/src/libs/HeyGen/Generated/HeyGen.CreateVideoApiClient.V1VideoDelete.g.cs
index fcd5df8..b6f8a2a 100644
--- a/src/libs/HeyGen/Generated/HeyGen.CreateVideoApiClient.V1VideoDelete.g.cs
+++ b/src/libs/HeyGen/Generated/HeyGen.CreateVideoApiClient.V1VideoDelete.g.cs
@@ -366,17 +366,15 @@ await V1VideoDeleteAsResponseAsync(
}
catch (global::System.Exception __ex)
{
- throw new global::HeyGen.ApiException(
+ throw global::HeyGen.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
else
@@ -404,17 +402,15 @@ await V1VideoDeleteAsResponseAsync(
{
}
- throw new global::HeyGen.ApiException(
+ throw global::HeyGen.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
diff --git a/src/libs/HeyGen/Generated/HeyGen.CreateVideoApiClient.V2VideoGenerate.g.cs b/src/libs/HeyGen/Generated/HeyGen.CreateVideoApiClient.V2VideoGenerate.g.cs
index 861799b..56627c2 100644
--- a/src/libs/HeyGen/Generated/HeyGen.CreateVideoApiClient.V2VideoGenerate.g.cs
+++ b/src/libs/HeyGen/Generated/HeyGen.CreateVideoApiClient.V2VideoGenerate.g.cs
@@ -372,17 +372,15 @@ await V2VideoGenerateAsResponseAsync(
}
catch (global::System.Exception __ex)
{
- throw new global::HeyGen.ApiException(
+ throw global::HeyGen.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
else
@@ -410,17 +408,15 @@ await V2VideoGenerateAsResponseAsync(
{
}
- throw new global::HeyGen.ApiException(
+ throw global::HeyGen.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
diff --git a/src/libs/HeyGen/Generated/HeyGen.Exceptions.g.cs b/src/libs/HeyGen/Generated/HeyGen.Exceptions.g.cs
index 296adc5..5a8c21e 100644
--- a/src/libs/HeyGen/Generated/HeyGen.Exceptions.g.cs
+++ b/src/libs/HeyGen/Generated/HeyGen.Exceptions.g.cs
@@ -12,16 +12,19 @@ public partial class ApiException : global::System.Exception
/// The HTTP status code of the response.
///
public global::System.Net.HttpStatusCode StatusCode { get; }
+
///
/// The response body as a string, or null if the body could not be read.
/// This is always populated for error responses regardless of the ReadResponseAsString setting.
/// For success-path failures (e.g. deserialization errors), the client attempts a best-effort read.
///
public string? ResponseBody { get; set; }
+
///
/// The response headers.
///
public global::System.Collections.Generic.Dictionary>? ResponseHeaders { get; set; }
+
///
/// Initializes a new instance of the class.
///
@@ -49,6 +52,103 @@ public ApiException(string message, global::System.Exception? innerException, gl
{
StatusCode = statusCode;
}
+
+ ///
+ /// Constructs an instance whose runtime type matches the response status code when the typed exception hierarchy is enabled. Always returns a plain when the hierarchy is disabled.
+ ///
+ /// The HTTP status code of the response.
+ /// The error message.
+ /// An inner exception, when one is available.
+ /// The response headers; consulted for 429 Retry-After parsing when present.
+ public static global::HeyGen.ApiException Create(
+ global::System.Net.HttpStatusCode statusCode,
+ string message,
+ global::System.Exception? innerException = null,
+ global::System.Collections.Generic.IDictionary>? responseHeaders = null)
+ {
+ return new global::HeyGen.ApiException(message, innerException, statusCode);
+ }
+
+ ///
+ /// Convenience overload that constructs an with response body and headers populated.
+ ///
+ public static global::HeyGen.ApiException Create(
+ global::System.Net.HttpStatusCode statusCode,
+ string message,
+ global::System.Exception? innerException,
+ string? responseBody,
+ global::System.Collections.Generic.Dictionary>? responseHeaders)
+ {
+ var exception = global::HeyGen.ApiException.Create(statusCode, message, innerException, responseHeaders);
+ exception.ResponseBody = responseBody;
+ exception.ResponseHeaders = responseHeaders;
+ return exception;
+ }
+
+ ///
+ /// Parses a Retry-After response header (delta-seconds or HTTP-date) into a .
+ /// Returns null when the header is missing or unparseable. Public so consumer code that observes
+ /// directly can recover the value without re-implementing the parser.
+ ///
+ public static global::System.TimeSpan? TryParseRetryAfter(
+ global::System.Collections.Generic.IDictionary>? headers)
+ {
+ if (headers == null)
+ {
+ return null;
+ }
+
+ global::System.Collections.Generic.IEnumerable? values = null;
+ foreach (var entry in headers)
+ {
+ if (string.Equals(entry.Key, "Retry-After", global::System.StringComparison.OrdinalIgnoreCase))
+ {
+ values = entry.Value;
+ break;
+ }
+ }
+
+ if (values == null)
+ {
+ return null;
+ }
+
+ string? raw = null;
+ foreach (var value in values)
+ {
+ if (!string.IsNullOrWhiteSpace(value))
+ {
+ raw = value.Trim();
+ break;
+ }
+ }
+
+ if (string.IsNullOrEmpty(raw))
+ {
+ return null;
+ }
+
+ if (int.TryParse(
+ raw,
+ global::System.Globalization.NumberStyles.Integer,
+ global::System.Globalization.CultureInfo.InvariantCulture,
+ out var seconds) && seconds >= 0)
+ {
+ return global::System.TimeSpan.FromSeconds(seconds);
+ }
+
+ if (global::System.DateTimeOffset.TryParse(
+ raw,
+ global::System.Globalization.CultureInfo.InvariantCulture,
+ global::System.Globalization.DateTimeStyles.AssumeUniversal | global::System.Globalization.DateTimeStyles.AdjustToUniversal,
+ out var when))
+ {
+ var delta = when - global::System.DateTimeOffset.UtcNow;
+ return delta > global::System.TimeSpan.Zero ? delta : global::System.TimeSpan.Zero;
+ }
+
+ return null;
+ }
}
///
@@ -88,5 +188,39 @@ public ApiException(string message, global::System.Net.HttpStatusCode statusCode
public ApiException(string message, global::System.Exception? innerException, global::System.Net.HttpStatusCode statusCode) : base(message, innerException, statusCode)
{
}
+
+ ///
+ /// Constructs an whose runtime type matches the response status code when the typed exception hierarchy is enabled.
+ ///
+ /// The HTTP status code of the response.
+ /// The error message.
+ /// An inner exception, when one is available.
+ /// The response headers; consulted for 429 Retry-After parsing when present.
+ public static new global::HeyGen.ApiException Create(
+ global::System.Net.HttpStatusCode statusCode,
+ string message,
+ global::System.Exception? innerException = null,
+ global::System.Collections.Generic.IDictionary>? responseHeaders = null)
+ {
+ return new global::HeyGen.ApiException(message, innerException, statusCode);
+ }
+
+ ///
+ /// Convenience overload that constructs an with response body, object, and headers populated.
+ ///
+ public static global::HeyGen.ApiException Create(
+ global::System.Net.HttpStatusCode statusCode,
+ string message,
+ global::System.Exception? innerException,
+ string? responseBody,
+ T? responseObject,
+ global::System.Collections.Generic.Dictionary>? responseHeaders)
+ {
+ var exception = global::HeyGen.ApiException.Create(statusCode, message, innerException, responseHeaders);
+ exception.ResponseBody = responseBody;
+ exception.ResponseObject = responseObject;
+ exception.ResponseHeaders = responseHeaders;
+ return exception;
+ }
}
}
\ No newline at end of file
diff --git a/src/libs/HeyGen/Generated/HeyGen.HeyGenClient.V1VideoStatusGet.g.cs b/src/libs/HeyGen/Generated/HeyGen.HeyGenClient.V1VideoStatusGet.g.cs
index ab38fd0..f586556 100644
--- a/src/libs/HeyGen/Generated/HeyGen.HeyGenClient.V1VideoStatusGet.g.cs
+++ b/src/libs/HeyGen/Generated/HeyGen.HeyGenClient.V1VideoStatusGet.g.cs
@@ -366,17 +366,15 @@ await V1VideoStatusGetAsResponseAsync(
}
catch (global::System.Exception __ex)
{
- throw new global::HeyGen.ApiException(
+ throw global::HeyGen.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
else
@@ -404,17 +402,15 @@ await V1VideoStatusGetAsResponseAsync(
{
}
- throw new global::HeyGen.ApiException(
+ throw global::HeyGen.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
diff --git a/src/libs/HeyGen/Generated/HeyGen.ListsClient.V1AvatarList.g.cs b/src/libs/HeyGen/Generated/HeyGen.ListsClient.V1AvatarList.g.cs
index 217fd05..e5f9249 100644
--- a/src/libs/HeyGen/Generated/HeyGen.ListsClient.V1AvatarList.g.cs
+++ b/src/libs/HeyGen/Generated/HeyGen.ListsClient.V1AvatarList.g.cs
@@ -350,17 +350,15 @@ await V1AvatarListAsResponseAsync(
}
catch (global::System.Exception __ex)
{
- throw new global::HeyGen.ApiException(
+ throw global::HeyGen.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
else
@@ -388,17 +386,15 @@ await V1AvatarListAsResponseAsync(
{
}
- throw new global::HeyGen.ApiException(
+ throw global::HeyGen.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
diff --git a/src/libs/HeyGen/Generated/HeyGen.ListsClient.V1VideoList.g.cs b/src/libs/HeyGen/Generated/HeyGen.ListsClient.V1VideoList.g.cs
index 4869c5f..9476e4d 100644
--- a/src/libs/HeyGen/Generated/HeyGen.ListsClient.V1VideoList.g.cs
+++ b/src/libs/HeyGen/Generated/HeyGen.ListsClient.V1VideoList.g.cs
@@ -350,17 +350,15 @@ await V1VideoListAsResponseAsync(
}
catch (global::System.Exception __ex)
{
- throw new global::HeyGen.ApiException(
+ throw global::HeyGen.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
else
@@ -388,17 +386,15 @@ await V1VideoListAsResponseAsync(
{
}
- throw new global::HeyGen.ApiException(
+ throw global::HeyGen.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
diff --git a/src/libs/HeyGen/Generated/HeyGen.ListsClient.V1VoiceList.g.cs b/src/libs/HeyGen/Generated/HeyGen.ListsClient.V1VoiceList.g.cs
index b0f6fc8..613717d 100644
--- a/src/libs/HeyGen/Generated/HeyGen.ListsClient.V1VoiceList.g.cs
+++ b/src/libs/HeyGen/Generated/HeyGen.ListsClient.V1VoiceList.g.cs
@@ -350,17 +350,15 @@ await V1VoiceListAsResponseAsync(
}
catch (global::System.Exception __ex)
{
- throw new global::HeyGen.ApiException(
+ throw global::HeyGen.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
else
@@ -388,17 +386,15 @@ await V1VoiceListAsResponseAsync(
{
}
- throw new global::HeyGen.ApiException(
+ throw global::HeyGen.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
diff --git a/src/libs/HeyGen/Generated/HeyGen.ListsClient.V2Avatars.g.cs b/src/libs/HeyGen/Generated/HeyGen.ListsClient.V2Avatars.g.cs
index 7a155e2..24b6315 100644
--- a/src/libs/HeyGen/Generated/HeyGen.ListsClient.V2Avatars.g.cs
+++ b/src/libs/HeyGen/Generated/HeyGen.ListsClient.V2Avatars.g.cs
@@ -350,17 +350,15 @@ await V2AvatarsAsResponseAsync(
}
catch (global::System.Exception __ex)
{
- throw new global::HeyGen.ApiException(
+ throw global::HeyGen.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
else
@@ -388,17 +386,15 @@ await V2AvatarsAsResponseAsync(
{
}
- throw new global::HeyGen.ApiException(
+ throw global::HeyGen.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
diff --git a/src/libs/HeyGen/Generated/HeyGen.ListsClient.V2Voices.g.cs b/src/libs/HeyGen/Generated/HeyGen.ListsClient.V2Voices.g.cs
index 0460233..5e73b84 100644
--- a/src/libs/HeyGen/Generated/HeyGen.ListsClient.V2Voices.g.cs
+++ b/src/libs/HeyGen/Generated/HeyGen.ListsClient.V2Voices.g.cs
@@ -350,17 +350,15 @@ await V2VoicesAsResponseAsync(
}
catch (global::System.Exception __ex)
{
- throw new global::HeyGen.ApiException(
+ throw global::HeyGen.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
else
@@ -388,17 +386,15 @@ await V2VoicesAsResponseAsync(
{
}
- throw new global::HeyGen.ApiException(
+ throw global::HeyGen.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
diff --git a/src/libs/HeyGen/Generated/HeyGen.PersonalizedVideoClient.PersonalizedVideoAddContact.g.cs b/src/libs/HeyGen/Generated/HeyGen.PersonalizedVideoClient.PersonalizedVideoAddContact.g.cs
index 31c5e42..1befc61 100644
--- a/src/libs/HeyGen/Generated/HeyGen.PersonalizedVideoClient.PersonalizedVideoAddContact.g.cs
+++ b/src/libs/HeyGen/Generated/HeyGen.PersonalizedVideoClient.PersonalizedVideoAddContact.g.cs
@@ -370,17 +370,15 @@ await PersonalizedVideoAddContactAsResponseAsync(
}
catch (global::System.Exception __ex)
{
- throw new global::HeyGen.ApiException(
+ throw global::HeyGen.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
else
@@ -408,17 +406,15 @@ await PersonalizedVideoAddContactAsResponseAsync(
{
}
- throw new global::HeyGen.ApiException(
+ throw global::HeyGen.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
diff --git a/src/libs/HeyGen/Generated/HeyGen.PersonalizedVideoClient.PersonalizedVideoAudienceDetail.g.cs b/src/libs/HeyGen/Generated/HeyGen.PersonalizedVideoClient.PersonalizedVideoAudienceDetail.g.cs
index da59bbd..ba3e983 100644
--- a/src/libs/HeyGen/Generated/HeyGen.PersonalizedVideoClient.PersonalizedVideoAudienceDetail.g.cs
+++ b/src/libs/HeyGen/Generated/HeyGen.PersonalizedVideoClient.PersonalizedVideoAudienceDetail.g.cs
@@ -366,17 +366,15 @@ await PersonalizedVideoAudienceDetailAsResponseAsync(
}
catch (global::System.Exception __ex)
{
- throw new global::HeyGen.ApiException(
+ throw global::HeyGen.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
else
@@ -404,17 +402,15 @@ await PersonalizedVideoAudienceDetailAsResponseAsync(
{
}
- throw new global::HeyGen.ApiException(
+ throw global::HeyGen.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
diff --git a/src/libs/HeyGen/Generated/HeyGen.PersonalizedVideoClient.PersonalizedVideoProjectDetail.g.cs b/src/libs/HeyGen/Generated/HeyGen.PersonalizedVideoClient.PersonalizedVideoProjectDetail.g.cs
index 14dd624..3c65a8e 100644
--- a/src/libs/HeyGen/Generated/HeyGen.PersonalizedVideoClient.PersonalizedVideoProjectDetail.g.cs
+++ b/src/libs/HeyGen/Generated/HeyGen.PersonalizedVideoClient.PersonalizedVideoProjectDetail.g.cs
@@ -366,17 +366,15 @@ await PersonalizedVideoProjectDetailAsResponseAsync(
}
catch (global::System.Exception __ex)
{
- throw new global::HeyGen.ApiException(
+ throw global::HeyGen.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
else
@@ -404,17 +402,15 @@ await PersonalizedVideoProjectDetailAsResponseAsync(
{
}
- throw new global::HeyGen.ApiException(
+ throw global::HeyGen.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
diff --git a/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingAvatarList.g.cs b/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingAvatarList.g.cs
index 0ee9f76..10a66d7 100644
--- a/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingAvatarList.g.cs
+++ b/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingAvatarList.g.cs
@@ -350,17 +350,15 @@ await StreamingAvatarListAsResponseAsync(
}
catch (global::System.Exception __ex)
{
- throw new global::HeyGen.ApiException(
+ throw global::HeyGen.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
else
@@ -388,17 +386,15 @@ await StreamingAvatarListAsResponseAsync(
{
}
- throw new global::HeyGen.ApiException(
+ throw global::HeyGen.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
diff --git a/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingCreateToken.g.cs b/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingCreateToken.g.cs
index 3bb92e8..ed2f7d1 100644
--- a/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingCreateToken.g.cs
+++ b/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingCreateToken.g.cs
@@ -370,17 +370,15 @@ await StreamingCreateTokenAsResponseAsync(
}
catch (global::System.Exception __ex)
{
- throw new global::HeyGen.ApiException(
+ throw global::HeyGen.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
else
@@ -408,17 +406,15 @@ await StreamingCreateTokenAsResponseAsync(
{
}
- throw new global::HeyGen.ApiException(
+ throw global::HeyGen.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
diff --git a/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingIce.g.cs b/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingIce.g.cs
index 25068b8..0af19cd 100644
--- a/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingIce.g.cs
+++ b/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingIce.g.cs
@@ -370,17 +370,15 @@ await StreamingIceAsResponseAsync(
}
catch (global::System.Exception __ex)
{
- throw new global::HeyGen.ApiException(
+ throw global::HeyGen.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
else
@@ -408,17 +406,15 @@ await StreamingIceAsResponseAsync(
{
}
- throw new global::HeyGen.ApiException(
+ throw global::HeyGen.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
diff --git a/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingInterrupt.g.cs b/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingInterrupt.g.cs
index c50aa23..bac718b 100644
--- a/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingInterrupt.g.cs
+++ b/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingInterrupt.g.cs
@@ -370,17 +370,15 @@ await StreamingInterruptAsResponseAsync(
}
catch (global::System.Exception __ex)
{
- throw new global::HeyGen.ApiException(
+ throw global::HeyGen.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
else
@@ -408,17 +406,15 @@ await StreamingInterruptAsResponseAsync(
{
}
- throw new global::HeyGen.ApiException(
+ throw global::HeyGen.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
diff --git a/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingList.g.cs b/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingList.g.cs
index ce819a6..5a91e37 100644
--- a/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingList.g.cs
+++ b/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingList.g.cs
@@ -350,17 +350,15 @@ await StreamingListAsResponseAsync(
}
catch (global::System.Exception __ex)
{
- throw new global::HeyGen.ApiException(
+ throw global::HeyGen.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
else
@@ -388,17 +386,15 @@ await StreamingListAsResponseAsync(
{
}
- throw new global::HeyGen.ApiException(
+ throw global::HeyGen.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
diff --git a/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingNew.g.cs b/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingNew.g.cs
index 9ddb133..1a8a88b 100644
--- a/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingNew.g.cs
+++ b/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingNew.g.cs
@@ -370,17 +370,15 @@ await StreamingNewAsResponseAsync(
}
catch (global::System.Exception __ex)
{
- throw new global::HeyGen.ApiException(
+ throw global::HeyGen.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
else
@@ -408,17 +406,15 @@ await StreamingNewAsResponseAsync(
{
}
- throw new global::HeyGen.ApiException(
+ throw global::HeyGen.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
diff --git a/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingStart.g.cs b/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingStart.g.cs
index 72ebd69..80c7752 100644
--- a/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingStart.g.cs
+++ b/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingStart.g.cs
@@ -370,17 +370,15 @@ await StreamingStartAsResponseAsync(
}
catch (global::System.Exception __ex)
{
- throw new global::HeyGen.ApiException(
+ throw global::HeyGen.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
else
@@ -408,17 +406,15 @@ await StreamingStartAsResponseAsync(
{
}
- throw new global::HeyGen.ApiException(
+ throw global::HeyGen.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
diff --git a/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingStop.g.cs b/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingStop.g.cs
index 978c142..522aa80 100644
--- a/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingStop.g.cs
+++ b/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingStop.g.cs
@@ -370,17 +370,15 @@ await StreamingStopAsResponseAsync(
}
catch (global::System.Exception __ex)
{
- throw new global::HeyGen.ApiException(
+ throw global::HeyGen.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
else
@@ -408,17 +406,15 @@ await StreamingStopAsResponseAsync(
{
}
- throw new global::HeyGen.ApiException(
+ throw global::HeyGen.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
diff --git a/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingTask.g.cs b/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingTask.g.cs
index 1693470..17db61e 100644
--- a/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingTask.g.cs
+++ b/src/libs/HeyGen/Generated/HeyGen.StreamingApiClient.StreamingTask.g.cs
@@ -370,17 +370,15 @@ await StreamingTaskAsResponseAsync(
}
catch (global::System.Exception __ex)
{
- throw new global::HeyGen.ApiException(
+ throw global::HeyGen.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
else
@@ -408,17 +406,15 @@ await StreamingTaskAsResponseAsync(
{
}
- throw new global::HeyGen.ApiException(
+ throw global::HeyGen.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
diff --git a/src/libs/HeyGen/Generated/HeyGen.TalkingPhotoClient.V1TalkingPhotoList.g.cs b/src/libs/HeyGen/Generated/HeyGen.TalkingPhotoClient.V1TalkingPhotoList.g.cs
index 30a9b28..2f46ad2 100644
--- a/src/libs/HeyGen/Generated/HeyGen.TalkingPhotoClient.V1TalkingPhotoList.g.cs
+++ b/src/libs/HeyGen/Generated/HeyGen.TalkingPhotoClient.V1TalkingPhotoList.g.cs
@@ -350,17 +350,15 @@ await V1TalkingPhotoListAsResponseAsync(
}
catch (global::System.Exception __ex)
{
- throw new global::HeyGen.ApiException(
+ throw global::HeyGen.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
else
@@ -388,17 +386,15 @@ await V1TalkingPhotoListAsResponseAsync(
{
}
- throw new global::HeyGen.ApiException(
+ throw global::HeyGen.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
diff --git a/src/libs/HeyGen/Generated/HeyGen.TalkingPhotoClient.V1TalkingPhotoUpload.g.cs b/src/libs/HeyGen/Generated/HeyGen.TalkingPhotoClient.V1TalkingPhotoUpload.g.cs
index 7868a47..931fba3 100644
--- a/src/libs/HeyGen/Generated/HeyGen.TalkingPhotoClient.V1TalkingPhotoUpload.g.cs
+++ b/src/libs/HeyGen/Generated/HeyGen.TalkingPhotoClient.V1TalkingPhotoUpload.g.cs
@@ -350,17 +350,15 @@ await V1TalkingPhotoUploadAsResponseAsync(
}
catch (global::System.Exception __ex)
{
- throw new global::HeyGen.ApiException(
+ throw global::HeyGen.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
else
@@ -388,17 +386,15 @@ await V1TalkingPhotoUploadAsResponseAsync(
{
}
- throw new global::HeyGen.ApiException(
+ throw global::HeyGen.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
diff --git a/src/libs/HeyGen/Generated/HeyGen.TalkingPhotoClient.V2TalkingPhotoIdDelete.g.cs b/src/libs/HeyGen/Generated/HeyGen.TalkingPhotoClient.V2TalkingPhotoIdDelete.g.cs
index 2e3a934..5ae40ba 100644
--- a/src/libs/HeyGen/Generated/HeyGen.TalkingPhotoClient.V2TalkingPhotoIdDelete.g.cs
+++ b/src/libs/HeyGen/Generated/HeyGen.TalkingPhotoClient.V2TalkingPhotoIdDelete.g.cs
@@ -350,17 +350,15 @@ await V2TalkingPhotoIdDeleteAsResponseAsync(
}
catch (global::System.Exception __ex)
{
- throw new global::HeyGen.ApiException(
+ throw global::HeyGen.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
else
@@ -388,17 +386,15 @@ await V2TalkingPhotoIdDeleteAsResponseAsync(
{
}
- throw new global::HeyGen.ApiException(
+ throw global::HeyGen.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
diff --git a/src/libs/HeyGen/Generated/HeyGen.TemplateApiClient.V2TemplateGenerate.g.cs b/src/libs/HeyGen/Generated/HeyGen.TemplateApiClient.V2TemplateGenerate.g.cs
index b54bd3f..02f683e 100644
--- a/src/libs/HeyGen/Generated/HeyGen.TemplateApiClient.V2TemplateGenerate.g.cs
+++ b/src/libs/HeyGen/Generated/HeyGen.TemplateApiClient.V2TemplateGenerate.g.cs
@@ -372,17 +372,15 @@ await V2TemplateGenerateAsResponseAsync(
}
catch (global::System.Exception __ex)
{
- throw new global::HeyGen.ApiException(
+ throw global::HeyGen.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
else
@@ -410,17 +408,15 @@ await V2TemplateGenerateAsResponseAsync(
{
}
- throw new global::HeyGen.ApiException(
+ throw global::HeyGen.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
diff --git a/src/libs/HeyGen/Generated/HeyGen.TemplateApiClient.V2TemplateId.g.cs b/src/libs/HeyGen/Generated/HeyGen.TemplateApiClient.V2TemplateId.g.cs
index 20a53f7..00904be 100644
--- a/src/libs/HeyGen/Generated/HeyGen.TemplateApiClient.V2TemplateId.g.cs
+++ b/src/libs/HeyGen/Generated/HeyGen.TemplateApiClient.V2TemplateId.g.cs
@@ -350,17 +350,15 @@ await V2TemplateIdAsResponseAsync(
}
catch (global::System.Exception __ex)
{
- throw new global::HeyGen.ApiException(
+ throw global::HeyGen.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
else
@@ -388,17 +386,15 @@ await V2TemplateIdAsResponseAsync(
{
}
- throw new global::HeyGen.ApiException(
+ throw global::HeyGen.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
diff --git a/src/libs/HeyGen/Generated/HeyGen.TemplateApiClient.V2Templates.g.cs b/src/libs/HeyGen/Generated/HeyGen.TemplateApiClient.V2Templates.g.cs
index 44a3dbe..844d80d 100644
--- a/src/libs/HeyGen/Generated/HeyGen.TemplateApiClient.V2Templates.g.cs
+++ b/src/libs/HeyGen/Generated/HeyGen.TemplateApiClient.V2Templates.g.cs
@@ -350,17 +350,15 @@ await V2TemplatesAsResponseAsync(
}
catch (global::System.Exception __ex)
{
- throw new global::HeyGen.ApiException(
+ throw global::HeyGen.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
else
@@ -388,17 +386,15 @@ await V2TemplatesAsResponseAsync(
{
}
- throw new global::HeyGen.ApiException(
+ throw global::HeyGen.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
diff --git a/src/libs/HeyGen/Generated/HeyGen.UserClient.V2UserRemainingQuota.g.cs b/src/libs/HeyGen/Generated/HeyGen.UserClient.V2UserRemainingQuota.g.cs
index b4056a5..0c86a3a 100644
--- a/src/libs/HeyGen/Generated/HeyGen.UserClient.V2UserRemainingQuota.g.cs
+++ b/src/libs/HeyGen/Generated/HeyGen.UserClient.V2UserRemainingQuota.g.cs
@@ -350,17 +350,15 @@ await V2UserRemainingQuotaAsResponseAsync(
}
catch (global::System.Exception __ex)
{
- throw new global::HeyGen.ApiException(
+ throw global::HeyGen.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
else
@@ -388,17 +386,15 @@ await V2UserRemainingQuotaAsResponseAsync(
{
}
- throw new global::HeyGen.ApiException(
+ throw global::HeyGen.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
diff --git a/src/libs/HeyGen/Generated/HeyGen.VideoTranslateApiClient.V2VideoTranslate.g.cs b/src/libs/HeyGen/Generated/HeyGen.VideoTranslateApiClient.V2VideoTranslate.g.cs
index 4f61f7c..4c153cc 100644
--- a/src/libs/HeyGen/Generated/HeyGen.VideoTranslateApiClient.V2VideoTranslate.g.cs
+++ b/src/libs/HeyGen/Generated/HeyGen.VideoTranslateApiClient.V2VideoTranslate.g.cs
@@ -370,17 +370,15 @@ await V2VideoTranslateAsResponseAsync(
}
catch (global::System.Exception __ex)
{
- throw new global::HeyGen.ApiException(
+ throw global::HeyGen.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
else
@@ -408,17 +406,15 @@ await V2VideoTranslateAsResponseAsync(
{
}
- throw new global::HeyGen.ApiException(
+ throw global::HeyGen.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
diff --git a/src/libs/HeyGen/Generated/HeyGen.VideoTranslateApiClient.V2VideoTranslateIdStatus.g.cs b/src/libs/HeyGen/Generated/HeyGen.VideoTranslateApiClient.V2VideoTranslateIdStatus.g.cs
index 7a1c5d8..e34edde 100644
--- a/src/libs/HeyGen/Generated/HeyGen.VideoTranslateApiClient.V2VideoTranslateIdStatus.g.cs
+++ b/src/libs/HeyGen/Generated/HeyGen.VideoTranslateApiClient.V2VideoTranslateIdStatus.g.cs
@@ -350,17 +350,15 @@ await V2VideoTranslateIdStatusAsResponseAsync(
}
catch (global::System.Exception __ex)
{
- throw new global::HeyGen.ApiException(
+ throw global::HeyGen.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
else
@@ -388,17 +386,15 @@ await V2VideoTranslateIdStatusAsResponseAsync(
{
}
- throw new global::HeyGen.ApiException(
+ throw global::HeyGen.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
diff --git a/src/libs/HeyGen/Generated/HeyGen.VideoTranslateApiClient.V2VideoTranslateTargetLanguages.g.cs b/src/libs/HeyGen/Generated/HeyGen.VideoTranslateApiClient.V2VideoTranslateTargetLanguages.g.cs
index 83f4d93..b513ef3 100644
--- a/src/libs/HeyGen/Generated/HeyGen.VideoTranslateApiClient.V2VideoTranslateTargetLanguages.g.cs
+++ b/src/libs/HeyGen/Generated/HeyGen.VideoTranslateApiClient.V2VideoTranslateTargetLanguages.g.cs
@@ -350,17 +350,15 @@ await V2VideoTranslateTargetLanguagesAsResponseAsync(
}
catch (global::System.Exception __ex)
{
- throw new global::HeyGen.ApiException(
+ throw global::HeyGen.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
else
@@ -388,17 +386,15 @@ await V2VideoTranslateTargetLanguagesAsResponseAsync(
{
}
- throw new global::HeyGen.ApiException(
+ throw global::HeyGen.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
diff --git a/src/libs/HeyGen/Generated/HeyGen.WebhooksClient.V1WebhookEndpointAdd.g.cs b/src/libs/HeyGen/Generated/HeyGen.WebhooksClient.V1WebhookEndpointAdd.g.cs
index 5c9c4c4..47e4693 100644
--- a/src/libs/HeyGen/Generated/HeyGen.WebhooksClient.V1WebhookEndpointAdd.g.cs
+++ b/src/libs/HeyGen/Generated/HeyGen.WebhooksClient.V1WebhookEndpointAdd.g.cs
@@ -370,17 +370,15 @@ await V1WebhookEndpointAddAsResponseAsync(
}
catch (global::System.Exception __ex)
{
- throw new global::HeyGen.ApiException(
+ throw global::HeyGen.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
else
@@ -408,17 +406,15 @@ await V1WebhookEndpointAddAsResponseAsync(
{
}
- throw new global::HeyGen.ApiException(
+ throw global::HeyGen.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
diff --git a/src/libs/HeyGen/Generated/HeyGen.WebhooksClient.V1WebhookEndpointDelete.g.cs b/src/libs/HeyGen/Generated/HeyGen.WebhooksClient.V1WebhookEndpointDelete.g.cs
index a9539a8..99c3ef2 100644
--- a/src/libs/HeyGen/Generated/HeyGen.WebhooksClient.V1WebhookEndpointDelete.g.cs
+++ b/src/libs/HeyGen/Generated/HeyGen.WebhooksClient.V1WebhookEndpointDelete.g.cs
@@ -366,17 +366,15 @@ await V1WebhookEndpointDeleteAsResponseAsync(
}
catch (global::System.Exception __ex)
{
- throw new global::HeyGen.ApiException(
+ throw global::HeyGen.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
else
@@ -404,17 +402,15 @@ await V1WebhookEndpointDeleteAsResponseAsync(
{
}
- throw new global::HeyGen.ApiException(
+ throw global::HeyGen.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
diff --git a/src/libs/HeyGen/Generated/HeyGen.WebhooksClient.V1WebhookEndpointList.g.cs b/src/libs/HeyGen/Generated/HeyGen.WebhooksClient.V1WebhookEndpointList.g.cs
index dfb4830..adec941 100644
--- a/src/libs/HeyGen/Generated/HeyGen.WebhooksClient.V1WebhookEndpointList.g.cs
+++ b/src/libs/HeyGen/Generated/HeyGen.WebhooksClient.V1WebhookEndpointList.g.cs
@@ -350,17 +350,15 @@ await V1WebhookEndpointListAsResponseAsync(
}
catch (global::System.Exception __ex)
{
- throw new global::HeyGen.ApiException(
+ throw global::HeyGen.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
else
@@ -388,17 +386,15 @@ await V1WebhookEndpointListAsResponseAsync(
{
}
- throw new global::HeyGen.ApiException(
+ throw global::HeyGen.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
diff --git a/src/libs/HeyGen/Generated/HeyGen.WebhooksClient.V1WebhookWebhookList.g.cs b/src/libs/HeyGen/Generated/HeyGen.WebhooksClient.V1WebhookWebhookList.g.cs
index c6b56c2..95082c8 100644
--- a/src/libs/HeyGen/Generated/HeyGen.WebhooksClient.V1WebhookWebhookList.g.cs
+++ b/src/libs/HeyGen/Generated/HeyGen.WebhooksClient.V1WebhookWebhookList.g.cs
@@ -350,17 +350,15 @@ await V1WebhookWebhookListAsResponseAsync(
}
catch (global::System.Exception __ex)
{
- throw new global::HeyGen.ApiException(
+ throw global::HeyGen.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
else
@@ -388,17 +386,15 @@ await V1WebhookWebhookListAsResponseAsync(
{
}
- throw new global::HeyGen.ApiException(
+ throw global::HeyGen.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}