diff --git a/src/libs/Recraft/Generated/Recraft.ImageClient.ClarityUpscale.g.cs b/src/libs/Recraft/Generated/Recraft.ImageClient.ClarityUpscale.g.cs index 5440a99..6cafa54 100644 --- a/src/libs/Recraft/Generated/Recraft.ImageClient.ClarityUpscale.g.cs +++ b/src/libs/Recraft/Generated/Recraft.ImageClient.ClarityUpscale.g.cs @@ -151,12 +151,10 @@ partial void ProcessClarityUpscaleResponseContent( }; } - using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - - var __responseValue = await global::Recraft.ProcessImageResponse.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false); + using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); return - __responseValue ?? + await global::Recraft.ProcessImageResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } } diff --git a/src/libs/Recraft/Generated/Recraft.ImageClient.GenerateImage.g.cs b/src/libs/Recraft/Generated/Recraft.ImageClient.GenerateImage.g.cs index a9d4027..a20a571 100644 --- a/src/libs/Recraft/Generated/Recraft.ImageClient.GenerateImage.g.cs +++ b/src/libs/Recraft/Generated/Recraft.ImageClient.GenerateImage.g.cs @@ -145,12 +145,10 @@ partial void ProcessGenerateImageResponseContent( }; } - using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - - var __responseValue = await global::Recraft.GenerateImageResponse.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false); + using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); return - __responseValue ?? + await global::Recraft.GenerateImageResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } } diff --git a/src/libs/Recraft/Generated/Recraft.ImageClient.GenerativeUpscale.g.cs b/src/libs/Recraft/Generated/Recraft.ImageClient.GenerativeUpscale.g.cs index bfdf7e0..59d17cf 100644 --- a/src/libs/Recraft/Generated/Recraft.ImageClient.GenerativeUpscale.g.cs +++ b/src/libs/Recraft/Generated/Recraft.ImageClient.GenerativeUpscale.g.cs @@ -151,12 +151,10 @@ partial void ProcessGenerativeUpscaleResponseContent( }; } - using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - - var __responseValue = await global::Recraft.ProcessImageResponse.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false); + using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); return - __responseValue ?? + await global::Recraft.ProcessImageResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } } diff --git a/src/libs/Recraft/Generated/Recraft.ImageClient.RemoveBackground.g.cs b/src/libs/Recraft/Generated/Recraft.ImageClient.RemoveBackground.g.cs index 3b91b80..4aa5481 100644 --- a/src/libs/Recraft/Generated/Recraft.ImageClient.RemoveBackground.g.cs +++ b/src/libs/Recraft/Generated/Recraft.ImageClient.RemoveBackground.g.cs @@ -151,12 +151,10 @@ partial void ProcessRemoveBackgroundResponseContent( }; } - using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - - var __responseValue = await global::Recraft.ProcessImageResponse.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false); + using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); return - __responseValue ?? + await global::Recraft.ProcessImageResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } } diff --git a/src/libs/Recraft/Generated/Recraft.ImageClient.VectorizeImage.g.cs b/src/libs/Recraft/Generated/Recraft.ImageClient.VectorizeImage.g.cs index e39c9dc..9b44740 100644 --- a/src/libs/Recraft/Generated/Recraft.ImageClient.VectorizeImage.g.cs +++ b/src/libs/Recraft/Generated/Recraft.ImageClient.VectorizeImage.g.cs @@ -151,12 +151,10 @@ partial void ProcessVectorizeImageResponseContent( }; } - using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - - var __responseValue = await global::Recraft.ProcessImageResponse.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false); + using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); return - __responseValue ?? + await global::Recraft.ProcessImageResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } } diff --git a/src/libs/Recraft/Generated/Recraft.StyleClient.CreateStyle.g.cs b/src/libs/Recraft/Generated/Recraft.StyleClient.CreateStyle.g.cs index f5aa9b2..8df2b87 100644 --- a/src/libs/Recraft/Generated/Recraft.StyleClient.CreateStyle.g.cs +++ b/src/libs/Recraft/Generated/Recraft.StyleClient.CreateStyle.g.cs @@ -153,12 +153,10 @@ partial void ProcessCreateStyleResponseContent( }; } - using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - - var __responseValue = await global::Recraft.Style.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false); + using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); return - __responseValue ?? + await global::Recraft.Style.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } } diff --git a/src/libs/Recraft/Generated/Recraft.StyleClient.DeleteStyle.g.cs b/src/libs/Recraft/Generated/Recraft.StyleClient.DeleteStyle.g.cs index 8a00754..22538f0 100644 --- a/src/libs/Recraft/Generated/Recraft.StyleClient.DeleteStyle.g.cs +++ b/src/libs/Recraft/Generated/Recraft.StyleClient.DeleteStyle.g.cs @@ -113,7 +113,7 @@ partial void ProcessDeleteStyleResponseContent( }; } - return __content; + return __content; } else { @@ -135,13 +135,9 @@ partial void ProcessDeleteStyleResponseContent( }; } - using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - - var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(string), JsonSerializerContext).ConfigureAwait(false) as string; + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - return - __responseValue ?? - throw new global::System.InvalidOperationException("Response deserialization failed."); + return __content; } } } diff --git a/src/libs/Recraft/Generated/Recraft.StyleClient.GetStyle.g.cs b/src/libs/Recraft/Generated/Recraft.StyleClient.GetStyle.g.cs index 3fb8ee8..af42d2b 100644 --- a/src/libs/Recraft/Generated/Recraft.StyleClient.GetStyle.g.cs +++ b/src/libs/Recraft/Generated/Recraft.StyleClient.GetStyle.g.cs @@ -137,12 +137,10 @@ partial void ProcessGetStyleResponseContent( }; } - using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - - var __responseValue = await global::Recraft.Style.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false); + using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); return - __responseValue ?? + await global::Recraft.Style.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } } diff --git a/src/libs/Recraft/Generated/Recraft.StyleClient.ListStyles.g.cs b/src/libs/Recraft/Generated/Recraft.StyleClient.ListStyles.g.cs index 6c416f0..2b54b5c 100644 --- a/src/libs/Recraft/Generated/Recraft.StyleClient.ListStyles.g.cs +++ b/src/libs/Recraft/Generated/Recraft.StyleClient.ListStyles.g.cs @@ -131,12 +131,10 @@ partial void ProcessListStylesResponseContent( }; } - using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - - var __responseValue = await global::Recraft.ListStylesResponse.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false); + using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); return - __responseValue ?? + await global::Recraft.ListStylesResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } } diff --git a/src/libs/Recraft/Generated/Recraft.UserClient.GetCurrentUser.g.cs b/src/libs/Recraft/Generated/Recraft.UserClient.GetCurrentUser.g.cs index 3c81591..fb23732 100644 --- a/src/libs/Recraft/Generated/Recraft.UserClient.GetCurrentUser.g.cs +++ b/src/libs/Recraft/Generated/Recraft.UserClient.GetCurrentUser.g.cs @@ -131,12 +131,10 @@ partial void ProcessGetCurrentUserResponseContent( }; } - using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - - var __responseValue = await global::Recraft.User.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false); + using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); return - __responseValue ?? + await global::Recraft.User.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } }