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
Original file line number Diff line number Diff line change
Expand Up @@ -356,13 +356,13 @@ partial void ProcessCreateSpeechResponseContent(
if (__effectiveReadResponseAsString)
{
__content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
__value_400 = global::PlayHT.ErrorResponse.FromJson(__content_400, JsonSerializerContext);
__value_400 = __content_400 is not { Length: > 0 } ? null : global::PlayHT.ErrorResponse.FromJson(__content_400, JsonSerializerContext);
}
else
{
__content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);

__value_400 = global::PlayHT.ErrorResponse.FromJson(__content_400, JsonSerializerContext);
__value_400 = __content_400 is not { Length: > 0 } ? null : global::PlayHT.ErrorResponse.FromJson(__content_400, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
Expand All @@ -373,7 +373,7 @@ partial void ProcessCreateSpeechResponseContent(

throw global::PlayHT.ApiException<global::PlayHT.ErrorResponse>.Create(
statusCode: __response.StatusCode,
message: __content_400 ?? __response.ReasonPhrase ?? string.Empty,
message: __content_400 is { Length: > 0 } ? __content_400 : __response.ReasonPhrase ?? string.Empty,
innerException: __exception_400,
responseBody: __content_400,
responseObject: __value_400,
Expand Down Expand Up @@ -416,7 +416,7 @@ partial void ProcessCreateSpeechResponseContent(
{
throw global::PlayHT.ApiException.Create(
statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
message: __content is { Length: > 0 } ? __content : __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
responseBody: __content,
responseHeaders: global::System.Linq.Enumerable.ToDictionary(
Expand Down Expand Up @@ -461,7 +461,7 @@ partial void ProcessCreateSpeechResponseContent(

throw global::PlayHT.ApiException.Create(
statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
message: __content is { Length: > 0 } ? __content : __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
responseBody: __content,
responseHeaders: global::System.Linq.Enumerable.ToDictionary(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -343,13 +343,13 @@ partial void ProcessGetSpeechJobResponseContent(
if (__effectiveReadResponseAsString)
{
__content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
__value_404 = global::PlayHT.ErrorResponse.FromJson(__content_404, JsonSerializerContext);
__value_404 = __content_404 is not { Length: > 0 } ? null : global::PlayHT.ErrorResponse.FromJson(__content_404, JsonSerializerContext);
}
else
{
__content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);

__value_404 = global::PlayHT.ErrorResponse.FromJson(__content_404, JsonSerializerContext);
__value_404 = __content_404 is not { Length: > 0 } ? null : global::PlayHT.ErrorResponse.FromJson(__content_404, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
Expand All @@ -360,7 +360,7 @@ partial void ProcessGetSpeechJobResponseContent(

throw global::PlayHT.ApiException<global::PlayHT.ErrorResponse>.Create(
statusCode: __response.StatusCode,
message: __content_404 ?? __response.ReasonPhrase ?? string.Empty,
message: __content_404 is { Length: > 0 } ? __content_404 : __response.ReasonPhrase ?? string.Empty,
innerException: __exception_404,
responseBody: __content_404,
responseObject: __value_404,
Expand Down Expand Up @@ -403,7 +403,7 @@ partial void ProcessGetSpeechJobResponseContent(
{
throw global::PlayHT.ApiException.Create(
statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
message: __content is { Length: > 0 } ? __content : __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
responseBody: __content,
responseHeaders: global::System.Linq.Enumerable.ToDictionary(
Expand Down Expand Up @@ -448,7 +448,7 @@ partial void ProcessGetSpeechJobResponseContent(

throw global::PlayHT.ApiException.Create(
statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
message: __content is { Length: > 0 } ? __content : __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
responseBody: __content,
responseHeaders: global::System.Linq.Enumerable.ToDictionary(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -354,13 +354,13 @@ partial void ProcessStreamSpeechResponseContent(
if (__effectiveReadResponseAsString)
{
__content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
__value_400 = global::PlayHT.ErrorResponse.FromJson(__content_400, JsonSerializerContext);
__value_400 = __content_400 is not { Length: > 0 } ? null : global::PlayHT.ErrorResponse.FromJson(__content_400, JsonSerializerContext);
}
else
{
__content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);

__value_400 = global::PlayHT.ErrorResponse.FromJson(__content_400, JsonSerializerContext);
__value_400 = __content_400 is not { Length: > 0 } ? null : global::PlayHT.ErrorResponse.FromJson(__content_400, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
Expand All @@ -371,7 +371,7 @@ partial void ProcessStreamSpeechResponseContent(

throw global::PlayHT.ApiException<global::PlayHT.ErrorResponse>.Create(
statusCode: __response.StatusCode,
message: __content_400 ?? __response.ReasonPhrase ?? string.Empty,
message: __content_400 is { Length: > 0 } ? __content_400 : __response.ReasonPhrase ?? string.Empty,
innerException: __exception_400,
responseBody: __content_400,
responseObject: __value_400,
Expand Down Expand Up @@ -414,7 +414,7 @@ partial void ProcessStreamSpeechResponseContent(

throw global::PlayHT.ApiException.Create(
statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
message: __content is { Length: > 0 } ? __content : __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
responseBody: __content,
responseHeaders: global::System.Linq.Enumerable.ToDictionary(
Expand Down Expand Up @@ -718,13 +718,13 @@ partial void ProcessStreamSpeechResponseContent(
if (__effectiveReadResponseAsString)
{
__content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
__value_400 = global::PlayHT.ErrorResponse.FromJson(__content_400, JsonSerializerContext);
__value_400 = __content_400 is not { Length: > 0 } ? null : global::PlayHT.ErrorResponse.FromJson(__content_400, JsonSerializerContext);
}
else
{
__content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);

__value_400 = global::PlayHT.ErrorResponse.FromJson(__content_400, JsonSerializerContext);
__value_400 = __content_400 is not { Length: > 0 } ? null : global::PlayHT.ErrorResponse.FromJson(__content_400, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
Expand All @@ -735,7 +735,7 @@ partial void ProcessStreamSpeechResponseContent(

throw global::PlayHT.ApiException<global::PlayHT.ErrorResponse>.Create(
statusCode: __response.StatusCode,
message: __content_400 ?? __response.ReasonPhrase ?? string.Empty,
message: __content_400 is { Length: > 0 } ? __content_400 : __response.ReasonPhrase ?? string.Empty,
innerException: __exception_400,
responseBody: __content_400,
responseObject: __value_400,
Expand Down Expand Up @@ -782,7 +782,7 @@ partial void ProcessStreamSpeechResponseContent(

throw global::PlayHT.ApiException.Create(
statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
message: __content is { Length: > 0 } ? __content : __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
responseBody: __content,
responseHeaders: global::System.Linq.Enumerable.ToDictionary(
Expand Down Expand Up @@ -1085,13 +1085,13 @@ partial void ProcessStreamSpeechResponseContent(
if (__effectiveReadResponseAsString)
{
__content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
__value_400 = global::PlayHT.ErrorResponse.FromJson(__content_400, JsonSerializerContext);
__value_400 = __content_400 is not { Length: > 0 } ? null : global::PlayHT.ErrorResponse.FromJson(__content_400, JsonSerializerContext);
}
else
{
__content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);

__value_400 = global::PlayHT.ErrorResponse.FromJson(__content_400, JsonSerializerContext);
__value_400 = __content_400 is not { Length: > 0 } ? null : global::PlayHT.ErrorResponse.FromJson(__content_400, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
Expand All @@ -1102,7 +1102,7 @@ partial void ProcessStreamSpeechResponseContent(

throw global::PlayHT.ApiException<global::PlayHT.ErrorResponse>.Create(
statusCode: __response.StatusCode,
message: __content_400 ?? __response.ReasonPhrase ?? string.Empty,
message: __content_400 is { Length: > 0 } ? __content_400 : __response.ReasonPhrase ?? string.Empty,
innerException: __exception_400,
responseBody: __content_400,
responseObject: __value_400,
Expand Down Expand Up @@ -1182,7 +1182,7 @@ partial void ProcessStreamSpeechResponseContent(

throw global::PlayHT.ApiException.Create(
statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
message: __content is { Length: > 0 } ? __content : __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
responseBody: __content,
responseHeaders: global::System.Linq.Enumerable.ToDictionary(
Expand Down
4 changes: 2 additions & 2 deletions src/libs/PlayHT/Generated/PlayHT.VoicesClient.ListVoices.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ partial void ProcessListVoicesResponseContent(
{
throw global::PlayHT.ApiException.Create(
statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
message: __content is { Length: > 0 } ? __content : __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
responseBody: __content,
responseHeaders: global::System.Linq.Enumerable.ToDictionary(
Expand Down Expand Up @@ -402,7 +402,7 @@ partial void ProcessListVoicesResponseContent(

throw global::PlayHT.ApiException.Create(
statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
message: __content is { Length: > 0 } ? __content : __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
responseBody: __content,
responseHeaders: global::System.Linq.Enumerable.ToDictionary(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ partial void ProcessCreateWebSocketAuthResponseContent(
{
throw global::PlayHT.ApiException.Create(
statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
message: __content is { Length: > 0 } ? __content : __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
responseBody: __content,
responseHeaders: global::System.Linq.Enumerable.ToDictionary(
Expand Down Expand Up @@ -402,7 +402,7 @@ partial void ProcessCreateWebSocketAuthResponseContent(

throw global::PlayHT.ApiException.Create(
statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
message: __content is { Length: > 0 } ? __content : __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
responseBody: __content,
responseHeaders: global::System.Linq.Enumerable.ToDictionary(
Expand Down
Loading