diff --git a/src/libs/PlayHT/Generated/PlayHT.TextToSpeechClient.CreateSpeech.g.cs b/src/libs/PlayHT/Generated/PlayHT.TextToSpeechClient.CreateSpeech.g.cs index 6223388..0aa6d85 100644 --- a/src/libs/PlayHT/Generated/PlayHT.TextToSpeechClient.CreateSpeech.g.cs +++ b/src/libs/PlayHT/Generated/PlayHT.TextToSpeechClient.CreateSpeech.g.cs @@ -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) @@ -373,7 +373,7 @@ partial void ProcessCreateSpeechResponseContent( throw global::PlayHT.ApiException.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, @@ -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( @@ -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( diff --git a/src/libs/PlayHT/Generated/PlayHT.TextToSpeechClient.GetSpeechJob.g.cs b/src/libs/PlayHT/Generated/PlayHT.TextToSpeechClient.GetSpeechJob.g.cs index 960eaf3..1d28c67 100644 --- a/src/libs/PlayHT/Generated/PlayHT.TextToSpeechClient.GetSpeechJob.g.cs +++ b/src/libs/PlayHT/Generated/PlayHT.TextToSpeechClient.GetSpeechJob.g.cs @@ -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) @@ -360,7 +360,7 @@ partial void ProcessGetSpeechJobResponseContent( throw global::PlayHT.ApiException.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, @@ -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( @@ -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( diff --git a/src/libs/PlayHT/Generated/PlayHT.TextToSpeechClient.StreamSpeech.g.cs b/src/libs/PlayHT/Generated/PlayHT.TextToSpeechClient.StreamSpeech.g.cs index 158bc80..1b47db9 100644 --- a/src/libs/PlayHT/Generated/PlayHT.TextToSpeechClient.StreamSpeech.g.cs +++ b/src/libs/PlayHT/Generated/PlayHT.TextToSpeechClient.StreamSpeech.g.cs @@ -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) @@ -371,7 +371,7 @@ partial void ProcessStreamSpeechResponseContent( throw global::PlayHT.ApiException.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, @@ -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( @@ -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) @@ -735,7 +735,7 @@ partial void ProcessStreamSpeechResponseContent( throw global::PlayHT.ApiException.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, @@ -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( @@ -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) @@ -1102,7 +1102,7 @@ partial void ProcessStreamSpeechResponseContent( throw global::PlayHT.ApiException.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, @@ -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( diff --git a/src/libs/PlayHT/Generated/PlayHT.VoicesClient.ListVoices.g.cs b/src/libs/PlayHT/Generated/PlayHT.VoicesClient.ListVoices.g.cs index d114b72..e21209c 100644 --- a/src/libs/PlayHT/Generated/PlayHT.VoicesClient.ListVoices.g.cs +++ b/src/libs/PlayHT/Generated/PlayHT.VoicesClient.ListVoices.g.cs @@ -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( @@ -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( diff --git a/src/libs/PlayHT/Generated/PlayHT.WebSocketClient.CreateWebSocketAuth.g.cs b/src/libs/PlayHT/Generated/PlayHT.WebSocketClient.CreateWebSocketAuth.g.cs index 22d4f5b..5def124 100644 --- a/src/libs/PlayHT/Generated/PlayHT.WebSocketClient.CreateWebSocketAuth.g.cs +++ b/src/libs/PlayHT/Generated/PlayHT.WebSocketClient.CreateWebSocketAuth.g.cs @@ -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( @@ -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(