Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion src/libs/HeyGen/Generated/HeyGen.AssetsClient.V1AssetUpload.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,25 @@ partial void ProcessV1AssetUploadResponse(
}
catch (global::System.Exception __ex)
{
string? __content = null;
try
{
__content = await __response.Content.ReadAsStringAsync(
#if NET5_0_OR_GREATER
cancellationToken
#endif
).ConfigureAwait(false);
}
catch (global::System.Exception)
{
}

throw new global::HeyGen.ApiException(
message: __response.ReasonPhrase ?? string.Empty,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
statusCode: __response.StatusCode)
{
ResponseBody = __content,
ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,25 @@ partial void ProcessV1VideoDeleteResponse(
}
catch (global::System.Exception __ex)
{
string? __content = null;
try
{
__content = await __response.Content.ReadAsStringAsync(
#if NET5_0_OR_GREATER
cancellationToken
#endif
).ConfigureAwait(false);
}
catch (global::System.Exception)
{
}

throw new global::HeyGen.ApiException(
message: __response.ReasonPhrase ?? string.Empty,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
statusCode: __response.StatusCode)
{
ResponseBody = __content,
ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,25 @@ partial void ProcessV2VideoGenerateResponse(
}
catch (global::System.Exception __ex)
{
string? __content = null;
try
{
__content = await __response.Content.ReadAsStringAsync(
#if NET5_0_OR_GREATER
cancellationToken
#endif
).ConfigureAwait(false);
}
catch (global::System.Exception)
{
}

throw new global::HeyGen.ApiException(
message: __response.ReasonPhrase ?? string.Empty,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
statusCode: __response.StatusCode)
{
ResponseBody = __content,
ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
Expand Down
4 changes: 3 additions & 1 deletion src/libs/HeyGen/Generated/HeyGen.Exceptions.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ public partial class ApiException : global::System.Exception
/// </summary>
public global::System.Net.HttpStatusCode StatusCode { get; }
/// <summary>
/// The response body.
/// The response body as a string, or <c>null</c> if the body could not be read.
/// This is always populated for error responses regardless of the <c>ReadResponseAsString</c> setting.
/// For success-path failures (e.g. deserialization errors), the client attempts a best-effort read.
/// </summary>
public string? ResponseBody { get; set; }
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,25 @@ partial void ProcessV1VideoStatusGetResponse(
}
catch (global::System.Exception __ex)
{
string? __content = null;
try
{
__content = await __response.Content.ReadAsStringAsync(
#if NET5_0_OR_GREATER
cancellationToken
#endif
).ConfigureAwait(false);
}
catch (global::System.Exception)
{
}

throw new global::HeyGen.ApiException(
message: __response.ReasonPhrase ?? string.Empty,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
statusCode: __response.StatusCode)
{
ResponseBody = __content,
ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
Expand Down
3 changes: 3 additions & 0 deletions src/libs/HeyGen/Generated/HeyGen.IAssetsClient.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ public partial interface IAssetsClient : global::System.IDisposable
/// <summary>
/// Gets or sets a value indicating whether the response content should be read as a string.
/// True by default in debug builds, false otherwise.
/// When false, successful responses are deserialized directly from the response stream for better performance.
/// Error responses are always read as strings regardless of this setting,
/// ensuring <see cref="ApiException.ResponseBody"/> is populated.
/// </summary>
public bool ReadResponseAsString { get; set; }

Expand Down
3 changes: 3 additions & 0 deletions src/libs/HeyGen/Generated/HeyGen.ICreateVideoApiClient.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ public partial interface ICreateVideoApiClient : global::System.IDisposable
/// <summary>
/// Gets or sets a value indicating whether the response content should be read as a string.
/// True by default in debug builds, false otherwise.
/// When false, successful responses are deserialized directly from the response stream for better performance.
/// Error responses are always read as strings regardless of this setting,
/// ensuring <see cref="ApiException.ResponseBody"/> is populated.
/// </summary>
public bool ReadResponseAsString { get; set; }

Expand Down
3 changes: 3 additions & 0 deletions src/libs/HeyGen/Generated/HeyGen.IHeyGenClient.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ public partial interface IHeyGenClient : global::System.IDisposable
/// <summary>
/// Gets or sets a value indicating whether the response content should be read as a string.
/// True by default in debug builds, false otherwise.
/// When false, successful responses are deserialized directly from the response stream for better performance.
/// Error responses are always read as strings regardless of this setting,
/// ensuring <see cref="ApiException.ResponseBody"/> is populated.
/// </summary>
public bool ReadResponseAsString { get; set; }

Expand Down
3 changes: 3 additions & 0 deletions src/libs/HeyGen/Generated/HeyGen.IListsClient.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ public partial interface IListsClient : global::System.IDisposable
/// <summary>
/// Gets or sets a value indicating whether the response content should be read as a string.
/// True by default in debug builds, false otherwise.
/// When false, successful responses are deserialized directly from the response stream for better performance.
/// Error responses are always read as strings regardless of this setting,
/// ensuring <see cref="ApiException.ResponseBody"/> is populated.
/// </summary>
public bool ReadResponseAsString { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ public partial interface IPersonalizedVideoClient : global::System.IDisposable
/// <summary>
/// Gets or sets a value indicating whether the response content should be read as a string.
/// True by default in debug builds, false otherwise.
/// When false, successful responses are deserialized directly from the response stream for better performance.
/// Error responses are always read as strings regardless of this setting,
/// ensuring <see cref="ApiException.ResponseBody"/> is populated.
/// </summary>
public bool ReadResponseAsString { get; set; }

Expand Down
3 changes: 3 additions & 0 deletions src/libs/HeyGen/Generated/HeyGen.IStreamingApiClient.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ public partial interface IStreamingApiClient : global::System.IDisposable
/// <summary>
/// Gets or sets a value indicating whether the response content should be read as a string.
/// True by default in debug builds, false otherwise.
/// When false, successful responses are deserialized directly from the response stream for better performance.
/// Error responses are always read as strings regardless of this setting,
/// ensuring <see cref="ApiException.ResponseBody"/> is populated.
/// </summary>
public bool ReadResponseAsString { get; set; }

Expand Down
3 changes: 3 additions & 0 deletions src/libs/HeyGen/Generated/HeyGen.ITalkingPhotoClient.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ public partial interface ITalkingPhotoClient : global::System.IDisposable
/// <summary>
/// Gets or sets a value indicating whether the response content should be read as a string.
/// True by default in debug builds, false otherwise.
/// When false, successful responses are deserialized directly from the response stream for better performance.
/// Error responses are always read as strings regardless of this setting,
/// ensuring <see cref="ApiException.ResponseBody"/> is populated.
/// </summary>
public bool ReadResponseAsString { get; set; }

Expand Down
3 changes: 3 additions & 0 deletions src/libs/HeyGen/Generated/HeyGen.ITemplateApiClient.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ public partial interface ITemplateApiClient : global::System.IDisposable
/// <summary>
/// Gets or sets a value indicating whether the response content should be read as a string.
/// True by default in debug builds, false otherwise.
/// When false, successful responses are deserialized directly from the response stream for better performance.
/// Error responses are always read as strings regardless of this setting,
/// ensuring <see cref="ApiException.ResponseBody"/> is populated.
/// </summary>
public bool ReadResponseAsString { get; set; }

Expand Down
3 changes: 3 additions & 0 deletions src/libs/HeyGen/Generated/HeyGen.IUserClient.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ public partial interface IUserClient : global::System.IDisposable
/// <summary>
/// Gets or sets a value indicating whether the response content should be read as a string.
/// True by default in debug builds, false otherwise.
/// When false, successful responses are deserialized directly from the response stream for better performance.
/// Error responses are always read as strings regardless of this setting,
/// ensuring <see cref="ApiException.ResponseBody"/> is populated.
/// </summary>
public bool ReadResponseAsString { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ public partial interface IVideoTranslateApiClient : global::System.IDisposable
/// <summary>
/// Gets or sets a value indicating whether the response content should be read as a string.
/// True by default in debug builds, false otherwise.
/// When false, successful responses are deserialized directly from the response stream for better performance.
/// Error responses are always read as strings regardless of this setting,
/// ensuring <see cref="ApiException.ResponseBody"/> is populated.
/// </summary>
public bool ReadResponseAsString { get; set; }

Expand Down
3 changes: 3 additions & 0 deletions src/libs/HeyGen/Generated/HeyGen.IWebhooksClient.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ public partial interface IWebhooksClient : global::System.IDisposable
/// <summary>
/// Gets or sets a value indicating whether the response content should be read as a string.
/// True by default in debug builds, false otherwise.
/// When false, successful responses are deserialized directly from the response stream for better performance.
/// Error responses are always read as strings regardless of this setting,
/// ensuring <see cref="ApiException.ResponseBody"/> is populated.
/// </summary>
public bool ReadResponseAsString { get; set; }

Expand Down
16 changes: 15 additions & 1 deletion src/libs/HeyGen/Generated/HeyGen.ListsClient.V1AvatarList.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,25 @@ partial void ProcessV1AvatarListResponse(
}
catch (global::System.Exception __ex)
{
string? __content = null;
try
{
__content = await __response.Content.ReadAsStringAsync(
#if NET5_0_OR_GREATER
cancellationToken
#endif
).ConfigureAwait(false);
}
catch (global::System.Exception)
{
}

throw new global::HeyGen.ApiException(
message: __response.ReasonPhrase ?? string.Empty,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
statusCode: __response.StatusCode)
{
ResponseBody = __content,
ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
Expand Down
16 changes: 15 additions & 1 deletion src/libs/HeyGen/Generated/HeyGen.ListsClient.V1VideoList.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,25 @@ partial void ProcessV1VideoListResponse(
}
catch (global::System.Exception __ex)
{
string? __content = null;
try
{
__content = await __response.Content.ReadAsStringAsync(
#if NET5_0_OR_GREATER
cancellationToken
#endif
).ConfigureAwait(false);
}
catch (global::System.Exception)
{
}

throw new global::HeyGen.ApiException(
message: __response.ReasonPhrase ?? string.Empty,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
statusCode: __response.StatusCode)
{
ResponseBody = __content,
ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
Expand Down
16 changes: 15 additions & 1 deletion src/libs/HeyGen/Generated/HeyGen.ListsClient.V1VoiceList.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,25 @@ partial void ProcessV1VoiceListResponse(
}
catch (global::System.Exception __ex)
{
string? __content = null;
try
{
__content = await __response.Content.ReadAsStringAsync(
#if NET5_0_OR_GREATER
cancellationToken
#endif
).ConfigureAwait(false);
}
catch (global::System.Exception)
{
}

throw new global::HeyGen.ApiException(
message: __response.ReasonPhrase ?? string.Empty,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
statusCode: __response.StatusCode)
{
ResponseBody = __content,
ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
Expand Down
16 changes: 15 additions & 1 deletion src/libs/HeyGen/Generated/HeyGen.ListsClient.V2Avatars.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,25 @@ partial void ProcessV2AvatarsResponse(
}
catch (global::System.Exception __ex)
{
string? __content = null;
try
{
__content = await __response.Content.ReadAsStringAsync(
#if NET5_0_OR_GREATER
cancellationToken
#endif
).ConfigureAwait(false);
}
catch (global::System.Exception)
{
}

throw new global::HeyGen.ApiException(
message: __response.ReasonPhrase ?? string.Empty,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
statusCode: __response.StatusCode)
{
ResponseBody = __content,
ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
Expand Down
16 changes: 15 additions & 1 deletion src/libs/HeyGen/Generated/HeyGen.ListsClient.V2Voices.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,25 @@ partial void ProcessV2VoicesResponse(
}
catch (global::System.Exception __ex)
{
string? __content = null;
try
{
__content = await __response.Content.ReadAsStringAsync(
#if NET5_0_OR_GREATER
cancellationToken
#endif
).ConfigureAwait(false);
}
catch (global::System.Exception)
{
}

throw new global::HeyGen.ApiException(
message: __response.ReasonPhrase ?? string.Empty,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
statusCode: __response.StatusCode)
{
ResponseBody = __content,
ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,25 @@ partial void ProcessPersonalizedVideoAddContactResponse(
}
catch (global::System.Exception __ex)
{
string? __content = null;
try
{
__content = await __response.Content.ReadAsStringAsync(
#if NET5_0_OR_GREATER
cancellationToken
#endif
).ConfigureAwait(false);
}
catch (global::System.Exception)
{
}

throw new global::HeyGen.ApiException(
message: __response.ReasonPhrase ?? string.Empty,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
statusCode: __response.StatusCode)
{
ResponseBody = __content,
ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
Expand Down
Loading