diff --git a/src/libs/Picsart/Generated/Picsart.GenAIInpaintingImage2ImageClient.GenaiExpandImage.g.cs b/src/libs/Picsart/Generated/Picsart.GenAIInpaintingImage2ImageClient.GenaiExpandImage.g.cs index b94a287..4f2ba53 100644 --- a/src/libs/Picsart/Generated/Picsart.GenAIInpaintingImage2ImageClient.GenaiExpandImage.g.cs +++ b/src/libs/Picsart/Generated/Picsart.GenAIInpaintingImage2ImageClient.GenaiExpandImage.g.cs @@ -617,7 +617,6 @@ partial void ProcessGenaiExpandImageResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.GenAIInpaintingImage2ImageClient.GenaiGenerateImageBleed.g.cs b/src/libs/Picsart/Generated/Picsart.GenAIInpaintingImage2ImageClient.GenaiGenerateImageBleed.g.cs index 78f8e1f..9e802d1 100644 --- a/src/libs/Picsart/Generated/Picsart.GenAIInpaintingImage2ImageClient.GenaiGenerateImageBleed.g.cs +++ b/src/libs/Picsart/Generated/Picsart.GenAIInpaintingImage2ImageClient.GenaiGenerateImageBleed.g.cs @@ -615,7 +615,6 @@ partial void ProcessGenaiGenerateImageBleedResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.GenAIInpaintingImage2ImageClient.GenaiImageInpainting.g.cs b/src/libs/Picsart/Generated/Picsart.GenAIInpaintingImage2ImageClient.GenaiImageInpainting.g.cs index 04acb58..7e20409 100644 --- a/src/libs/Picsart/Generated/Picsart.GenAIInpaintingImage2ImageClient.GenaiImageInpainting.g.cs +++ b/src/libs/Picsart/Generated/Picsart.GenAIInpaintingImage2ImageClient.GenaiImageInpainting.g.cs @@ -613,7 +613,6 @@ partial void ProcessGenaiImageInpaintingResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.GenAIInpaintingImage2ImageClient.GenaiImageInpaintingGetresult.g.cs b/src/libs/Picsart/Generated/Picsart.GenAIInpaintingImage2ImageClient.GenaiImageInpaintingGetresult.g.cs index 872adfc..68fcb64 100644 --- a/src/libs/Picsart/Generated/Picsart.GenAIInpaintingImage2ImageClient.GenaiImageInpaintingGetresult.g.cs +++ b/src/libs/Picsart/Generated/Picsart.GenAIInpaintingImage2ImageClient.GenaiImageInpaintingGetresult.g.cs @@ -610,7 +610,6 @@ partial void ProcessGenaiImageInpaintingGetresultResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.GenAIInpaintingImage2ImageClient.GenaiImageOutpainting.g.cs b/src/libs/Picsart/Generated/Picsart.GenAIInpaintingImage2ImageClient.GenaiImageOutpainting.g.cs index bd2c959..4cfb952 100644 --- a/src/libs/Picsart/Generated/Picsart.GenAIInpaintingImage2ImageClient.GenaiImageOutpainting.g.cs +++ b/src/libs/Picsart/Generated/Picsart.GenAIInpaintingImage2ImageClient.GenaiImageOutpainting.g.cs @@ -619,7 +619,6 @@ partial void ProcessGenaiImageOutpaintingResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.GenAIInpaintingImage2ImageClient.GenaiRemoveObject.g.cs b/src/libs/Picsart/Generated/Picsart.GenAIInpaintingImage2ImageClient.GenaiRemoveObject.g.cs index 3c6db58..3fb3cf4 100644 --- a/src/libs/Picsart/Generated/Picsart.GenAIInpaintingImage2ImageClient.GenaiRemoveObject.g.cs +++ b/src/libs/Picsart/Generated/Picsart.GenAIInpaintingImage2ImageClient.GenaiRemoveObject.g.cs @@ -615,7 +615,6 @@ partial void ProcessGenaiRemoveObjectResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.GenAIInpaintingImage2ImageClient.GenaiSmartBackground.g.cs b/src/libs/Picsart/Generated/Picsart.GenAIInpaintingImage2ImageClient.GenaiSmartBackground.g.cs index 1a28974..63b4c8e 100644 --- a/src/libs/Picsart/Generated/Picsart.GenAIInpaintingImage2ImageClient.GenaiSmartBackground.g.cs +++ b/src/libs/Picsart/Generated/Picsart.GenAIInpaintingImage2ImageClient.GenaiSmartBackground.g.cs @@ -621,7 +621,6 @@ partial void ProcessGenaiSmartBackgroundResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.GenAIText2AudioClient.GenaiText2audioGetresult.g.cs b/src/libs/Picsart/Generated/Picsart.GenAIText2AudioClient.GenaiText2audioGetresult.g.cs index 85af411..e3b1911 100644 --- a/src/libs/Picsart/Generated/Picsart.GenAIText2AudioClient.GenaiText2audioGetresult.g.cs +++ b/src/libs/Picsart/Generated/Picsart.GenAIText2AudioClient.GenaiText2audioGetresult.g.cs @@ -608,7 +608,6 @@ partial void ProcessGenaiText2audioGetresultResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.GenAIText2AudioClient.GenaiText2sound.g.cs b/src/libs/Picsart/Generated/Picsart.GenAIText2AudioClient.GenaiText2sound.g.cs index 59c8b79..e760eb2 100644 --- a/src/libs/Picsart/Generated/Picsart.GenAIText2AudioClient.GenaiText2sound.g.cs +++ b/src/libs/Picsart/Generated/Picsart.GenAIText2AudioClient.GenaiText2sound.g.cs @@ -617,7 +617,6 @@ partial void ProcessGenaiText2soundResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.GenAIText2AudioClient.GenaiText2speech.g.cs b/src/libs/Picsart/Generated/Picsart.GenAIText2AudioClient.GenaiText2speech.g.cs index 85a90b5..277b55a 100644 --- a/src/libs/Picsart/Generated/Picsart.GenAIText2AudioClient.GenaiText2speech.g.cs +++ b/src/libs/Picsart/Generated/Picsart.GenAIText2AudioClient.GenaiText2speech.g.cs @@ -617,7 +617,6 @@ partial void ProcessGenaiText2speechResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.GenAIText2ImageClient.GenaiGenerateLogo.g.cs b/src/libs/Picsart/Generated/Picsart.GenAIText2ImageClient.GenaiGenerateLogo.g.cs index 30172a0..31601f8 100644 --- a/src/libs/Picsart/Generated/Picsart.GenAIText2ImageClient.GenaiGenerateLogo.g.cs +++ b/src/libs/Picsart/Generated/Picsart.GenAIText2ImageClient.GenaiGenerateLogo.g.cs @@ -613,7 +613,6 @@ partial void ProcessGenaiGenerateLogoResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.GenAIText2ImageClient.GenaiGenerateLogoGetresult.g.cs b/src/libs/Picsart/Generated/Picsart.GenAIText2ImageClient.GenaiGenerateLogoGetresult.g.cs index c946ef8..c02cec7 100644 --- a/src/libs/Picsart/Generated/Picsart.GenAIText2ImageClient.GenaiGenerateLogoGetresult.g.cs +++ b/src/libs/Picsart/Generated/Picsart.GenAIText2ImageClient.GenaiGenerateLogoGetresult.g.cs @@ -608,7 +608,6 @@ partial void ProcessGenaiGenerateLogoGetresultResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.GenAIText2ImageClient.GenaiText2image.g.cs b/src/libs/Picsart/Generated/Picsart.GenAIText2ImageClient.GenaiText2image.g.cs index c38901a..aafc703 100644 --- a/src/libs/Picsart/Generated/Picsart.GenAIText2ImageClient.GenaiText2image.g.cs +++ b/src/libs/Picsart/Generated/Picsart.GenAIText2ImageClient.GenaiText2image.g.cs @@ -619,7 +619,6 @@ partial void ProcessGenaiText2imageResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.GenAIText2ImageClient.GenaiText2imageGetresult.g.cs b/src/libs/Picsart/Generated/Picsart.GenAIText2ImageClient.GenaiText2imageGetresult.g.cs index 5377fe3..af21647 100644 --- a/src/libs/Picsart/Generated/Picsart.GenAIText2ImageClient.GenaiText2imageGetresult.g.cs +++ b/src/libs/Picsart/Generated/Picsart.GenAIText2ImageClient.GenaiText2imageGetresult.g.cs @@ -608,7 +608,6 @@ partial void ProcessGenaiText2imageGetresultResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.GenAIText2ImageClient.GenaiText2sticker.g.cs b/src/libs/Picsart/Generated/Picsart.GenAIText2ImageClient.GenaiText2sticker.g.cs index c289b24..5f5c87d 100644 --- a/src/libs/Picsart/Generated/Picsart.GenAIText2ImageClient.GenaiText2sticker.g.cs +++ b/src/libs/Picsart/Generated/Picsart.GenAIText2ImageClient.GenaiText2sticker.g.cs @@ -619,7 +619,6 @@ partial void ProcessGenaiText2stickerResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.GenAIText2ImageClient.GenaiText2stickerGetresult.g.cs b/src/libs/Picsart/Generated/Picsart.GenAIText2ImageClient.GenaiText2stickerGetresult.g.cs index f0c6589..ea63018 100644 --- a/src/libs/Picsart/Generated/Picsart.GenAIText2ImageClient.GenaiText2stickerGetresult.g.cs +++ b/src/libs/Picsart/Generated/Picsart.GenAIText2ImageClient.GenaiText2stickerGetresult.g.cs @@ -608,7 +608,6 @@ partial void ProcessGenaiText2stickerGetresultResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.GenAIText2ImageClient.GenaiText2stickerLaserEngraving.g.cs b/src/libs/Picsart/Generated/Picsart.GenAIText2ImageClient.GenaiText2stickerLaserEngraving.g.cs index b4c0dcf..c14e369 100644 --- a/src/libs/Picsart/Generated/Picsart.GenAIText2ImageClient.GenaiText2stickerLaserEngraving.g.cs +++ b/src/libs/Picsart/Generated/Picsart.GenAIText2ImageClient.GenaiText2stickerLaserEngraving.g.cs @@ -619,7 +619,6 @@ partial void ProcessGenaiText2stickerLaserEngravingResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.GenAIText2TextClient.GenaiText2textCompletions.g.cs b/src/libs/Picsart/Generated/Picsart.GenAIText2TextClient.GenaiText2textCompletions.g.cs index 2568135..73f11a2 100644 --- a/src/libs/Picsart/Generated/Picsart.GenAIText2TextClient.GenaiText2textCompletions.g.cs +++ b/src/libs/Picsart/Generated/Picsart.GenAIText2TextClient.GenaiText2textCompletions.g.cs @@ -617,7 +617,6 @@ partial void ProcessGenaiText2textCompletionsResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.GenAIText2VideoImage2VideoClient.GenaiImage2video.g.cs b/src/libs/Picsart/Generated/Picsart.GenAIText2VideoImage2VideoClient.GenaiImage2video.g.cs index 02239d8..224b21b 100644 --- a/src/libs/Picsart/Generated/Picsart.GenAIText2VideoImage2VideoClient.GenaiImage2video.g.cs +++ b/src/libs/Picsart/Generated/Picsart.GenAIText2VideoImage2VideoClient.GenaiImage2video.g.cs @@ -621,7 +621,6 @@ partial void ProcessGenaiImage2videoResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.GenAIText2VideoImage2VideoClient.GenaiText2video.g.cs b/src/libs/Picsart/Generated/Picsart.GenAIText2VideoImage2VideoClient.GenaiText2video.g.cs index ec0e116..bb413d9 100644 --- a/src/libs/Picsart/Generated/Picsart.GenAIText2VideoImage2VideoClient.GenaiText2video.g.cs +++ b/src/libs/Picsart/Generated/Picsart.GenAIText2VideoImage2VideoClient.GenaiText2video.g.cs @@ -621,7 +621,6 @@ partial void ProcessGenaiText2videoResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.GenAIText2VideoImage2VideoClient.GenaiText2videoGetresult.g.cs b/src/libs/Picsart/Generated/Picsart.GenAIText2VideoImage2VideoClient.GenaiText2videoGetresult.g.cs index 9ff6571..24f90fb 100644 --- a/src/libs/Picsart/Generated/Picsart.GenAIText2VideoImage2VideoClient.GenaiText2videoGetresult.g.cs +++ b/src/libs/Picsart/Generated/Picsart.GenAIText2VideoImage2VideoClient.GenaiText2videoGetresult.g.cs @@ -608,7 +608,6 @@ partial void ProcessGenaiText2videoGetresultResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.GenAIUtilitiesClient.GenaiCreditsBalance.g.cs b/src/libs/Picsart/Generated/Picsart.GenAIUtilitiesClient.GenaiCreditsBalance.g.cs index 9da128d..6101ce1 100644 --- a/src/libs/Picsart/Generated/Picsart.GenAIUtilitiesClient.GenaiCreditsBalance.g.cs +++ b/src/libs/Picsart/Generated/Picsart.GenAIUtilitiesClient.GenaiCreditsBalance.g.cs @@ -603,7 +603,6 @@ partial void ProcessGenaiCreditsBalanceResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.ImageClassificationClient.ImageCarsClassifier.g.cs b/src/libs/Picsart/Generated/Picsart.ImageClassificationClient.ImageCarsClassifier.g.cs index 897486d..36633d8 100644 --- a/src/libs/Picsart/Generated/Picsart.ImageClassificationClient.ImageCarsClassifier.g.cs +++ b/src/libs/Picsart/Generated/Picsart.ImageClassificationClient.ImageCarsClassifier.g.cs @@ -684,7 +684,6 @@ partial void ProcessImageCarsClassifierResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.ImageClassificationClient.ImageDescriber.g.cs b/src/libs/Picsart/Generated/Picsart.ImageClassificationClient.ImageDescriber.g.cs index 360daf2..df19abc 100644 --- a/src/libs/Picsart/Generated/Picsart.ImageClassificationClient.ImageDescriber.g.cs +++ b/src/libs/Picsart/Generated/Picsart.ImageClassificationClient.ImageDescriber.g.cs @@ -682,7 +682,6 @@ partial void ProcessImageDescriberResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.ImageClassificationClient.ImageExtractColors.g.cs b/src/libs/Picsart/Generated/Picsart.ImageClassificationClient.ImageExtractColors.g.cs index 973f65d..33c859f 100644 --- a/src/libs/Picsart/Generated/Picsart.ImageClassificationClient.ImageExtractColors.g.cs +++ b/src/libs/Picsart/Generated/Picsart.ImageClassificationClient.ImageExtractColors.g.cs @@ -684,7 +684,6 @@ partial void ProcessImageExtractColorsResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.ImageClassificationClient.ImageSegmentation.g.cs b/src/libs/Picsart/Generated/Picsart.ImageClassificationClient.ImageSegmentation.g.cs index 2c04387..816cb05 100644 --- a/src/libs/Picsart/Generated/Picsart.ImageClassificationClient.ImageSegmentation.g.cs +++ b/src/libs/Picsart/Generated/Picsart.ImageClassificationClient.ImageSegmentation.g.cs @@ -651,7 +651,6 @@ partial void ProcessImageSegmentationResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.ImageClassificationClient.ImageTagging.g.cs b/src/libs/Picsart/Generated/Picsart.ImageClassificationClient.ImageTagging.g.cs index 5b2c48a..c64efd0 100644 --- a/src/libs/Picsart/Generated/Picsart.ImageClassificationClient.ImageTagging.g.cs +++ b/src/libs/Picsart/Generated/Picsart.ImageClassificationClient.ImageTagging.g.cs @@ -682,7 +682,6 @@ partial void ProcessImageTaggingResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.ImageContentGenerationClient.ImageGeneratePattern.g.cs b/src/libs/Picsart/Generated/Picsart.ImageContentGenerationClient.ImageGeneratePattern.g.cs index 391d77c..fecacc4 100644 --- a/src/libs/Picsart/Generated/Picsart.ImageContentGenerationClient.ImageGeneratePattern.g.cs +++ b/src/libs/Picsart/Generated/Picsart.ImageContentGenerationClient.ImageGeneratePattern.g.cs @@ -651,7 +651,6 @@ partial void ProcessImageGeneratePatternResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.ImageConversionClient.ImageDesignImport.g.cs b/src/libs/Picsart/Generated/Picsart.ImageConversionClient.ImageDesignImport.g.cs index 300c318..ccd13db 100644 --- a/src/libs/Picsart/Generated/Picsart.ImageConversionClient.ImageDesignImport.g.cs +++ b/src/libs/Picsart/Generated/Picsart.ImageConversionClient.ImageDesignImport.g.cs @@ -683,7 +683,6 @@ partial void ProcessImageDesignImportResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.ImageConversionClient.ImageDesignImportGetresult.g.cs b/src/libs/Picsart/Generated/Picsart.ImageConversionClient.ImageDesignImportGetresult.g.cs index 0b95717..462e963 100644 --- a/src/libs/Picsart/Generated/Picsart.ImageConversionClient.ImageDesignImportGetresult.g.cs +++ b/src/libs/Picsart/Generated/Picsart.ImageConversionClient.ImageDesignImportGetresult.g.cs @@ -646,7 +646,6 @@ partial void ProcessImageDesignImportGetresultResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.ImageConversionClient.ImageVectorizeRasterToSvg.g.cs b/src/libs/Picsart/Generated/Picsart.ImageConversionClient.ImageVectorizeRasterToSvg.g.cs index 6e1e7d1..19fc4cd 100644 --- a/src/libs/Picsart/Generated/Picsart.ImageConversionClient.ImageVectorizeRasterToSvg.g.cs +++ b/src/libs/Picsart/Generated/Picsart.ImageConversionClient.ImageVectorizeRasterToSvg.g.cs @@ -651,7 +651,6 @@ partial void ProcessImageVectorizeRasterToSvgResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.ImageEditingClient.ImageBlend.g.cs b/src/libs/Picsart/Generated/Picsart.ImageEditingClient.ImageBlend.g.cs index 3a87b9c..fe782bf 100644 --- a/src/libs/Picsart/Generated/Picsart.ImageEditingClient.ImageBlend.g.cs +++ b/src/libs/Picsart/Generated/Picsart.ImageEditingClient.ImageBlend.g.cs @@ -655,7 +655,6 @@ partial void ProcessImageBlendResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.ImageEditingClient.ImageEdit.g.cs b/src/libs/Picsart/Generated/Picsart.ImageEditingClient.ImageEdit.g.cs index a0b6b08..ef39b6c 100644 --- a/src/libs/Picsart/Generated/Picsart.ImageEditingClient.ImageEdit.g.cs +++ b/src/libs/Picsart/Generated/Picsart.ImageEditingClient.ImageEdit.g.cs @@ -651,7 +651,6 @@ partial void ProcessImageEditResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.ImageEditingClient.ImageSmartCrop.g.cs b/src/libs/Picsart/Generated/Picsart.ImageEditingClient.ImageSmartCrop.g.cs index 768c05a..36e71be 100644 --- a/src/libs/Picsart/Generated/Picsart.ImageEditingClient.ImageSmartCrop.g.cs +++ b/src/libs/Picsart/Generated/Picsart.ImageEditingClient.ImageSmartCrop.g.cs @@ -651,7 +651,6 @@ partial void ProcessImageSmartCropResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.ImageEditingClient.ImageZoom.g.cs b/src/libs/Picsart/Generated/Picsart.ImageEditingClient.ImageZoom.g.cs index c793aca..5fbe5ac 100644 --- a/src/libs/Picsart/Generated/Picsart.ImageEditingClient.ImageZoom.g.cs +++ b/src/libs/Picsart/Generated/Picsart.ImageEditingClient.ImageZoom.g.cs @@ -651,7 +651,6 @@ partial void ProcessImageZoomResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.ImageEffectsClient.ImageAdjust.g.cs b/src/libs/Picsart/Generated/Picsart.ImageEffectsClient.ImageAdjust.g.cs index 8bce352..30749e4 100644 --- a/src/libs/Picsart/Generated/Picsart.ImageEffectsClient.ImageAdjust.g.cs +++ b/src/libs/Picsart/Generated/Picsart.ImageEffectsClient.ImageAdjust.g.cs @@ -651,7 +651,6 @@ partial void ProcessImageAdjustResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.ImageEffectsClient.ImageApplyAiEffect.g.cs b/src/libs/Picsart/Generated/Picsart.ImageEffectsClient.ImageApplyAiEffect.g.cs index b43f2d9..eb28178 100644 --- a/src/libs/Picsart/Generated/Picsart.ImageEffectsClient.ImageApplyAiEffect.g.cs +++ b/src/libs/Picsart/Generated/Picsart.ImageEffectsClient.ImageApplyAiEffect.g.cs @@ -651,7 +651,6 @@ partial void ProcessImageApplyAiEffectResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.ImageEffectsClient.ImageApplyEffect.g.cs b/src/libs/Picsart/Generated/Picsart.ImageEffectsClient.ImageApplyEffect.g.cs index 471aa85..e4c253e 100644 --- a/src/libs/Picsart/Generated/Picsart.ImageEffectsClient.ImageApplyEffect.g.cs +++ b/src/libs/Picsart/Generated/Picsart.ImageEffectsClient.ImageApplyEffect.g.cs @@ -651,7 +651,6 @@ partial void ProcessImageApplyEffectResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.ImageEffectsClient.ImageApplyLaserEngravingEffect.g.cs b/src/libs/Picsart/Generated/Picsart.ImageEffectsClient.ImageApplyLaserEngravingEffect.g.cs index 954539e..5da16dc 100644 --- a/src/libs/Picsart/Generated/Picsart.ImageEffectsClient.ImageApplyLaserEngravingEffect.g.cs +++ b/src/libs/Picsart/Generated/Picsart.ImageEffectsClient.ImageApplyLaserEngravingEffect.g.cs @@ -651,7 +651,6 @@ partial void ProcessImageApplyLaserEngravingEffectResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.ImageEffectsClient.ImageApplyMask.g.cs b/src/libs/Picsart/Generated/Picsart.ImageEffectsClient.ImageApplyMask.g.cs index 3f6cd67..b99ef05 100644 --- a/src/libs/Picsart/Generated/Picsart.ImageEffectsClient.ImageApplyMask.g.cs +++ b/src/libs/Picsart/Generated/Picsart.ImageEffectsClient.ImageApplyMask.g.cs @@ -651,7 +651,6 @@ partial void ProcessImageApplyMaskResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.ImageEffectsClient.ImageCreateEffectPreviews.g.cs b/src/libs/Picsart/Generated/Picsart.ImageEffectsClient.ImageCreateEffectPreviews.g.cs index 6d5dcd7..b4002bf 100644 --- a/src/libs/Picsart/Generated/Picsart.ImageEffectsClient.ImageCreateEffectPreviews.g.cs +++ b/src/libs/Picsart/Generated/Picsart.ImageEffectsClient.ImageCreateEffectPreviews.g.cs @@ -651,7 +651,6 @@ partial void ProcessImageCreateEffectPreviewsResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.ImageEffectsClient.ImageCreateMaskPreviews.g.cs b/src/libs/Picsart/Generated/Picsart.ImageEffectsClient.ImageCreateMaskPreviews.g.cs index a6743ac..562c59a 100644 --- a/src/libs/Picsart/Generated/Picsart.ImageEffectsClient.ImageCreateMaskPreviews.g.cs +++ b/src/libs/Picsart/Generated/Picsart.ImageEffectsClient.ImageCreateMaskPreviews.g.cs @@ -651,7 +651,6 @@ partial void ProcessImageCreateMaskPreviewsResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.ImageEffectsClient.ImageListAiEffectNames.g.cs b/src/libs/Picsart/Generated/Picsart.ImageEffectsClient.ImageListAiEffectNames.g.cs index e1de560..63af7e4 100644 --- a/src/libs/Picsart/Generated/Picsart.ImageEffectsClient.ImageListAiEffectNames.g.cs +++ b/src/libs/Picsart/Generated/Picsart.ImageEffectsClient.ImageListAiEffectNames.g.cs @@ -637,7 +637,6 @@ partial void ProcessImageListAiEffectNamesResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.ImageEffectsClient.ImageListEffectNames.g.cs b/src/libs/Picsart/Generated/Picsart.ImageEffectsClient.ImageListEffectNames.g.cs index 4b08ce2..df45348 100644 --- a/src/libs/Picsart/Generated/Picsart.ImageEffectsClient.ImageListEffectNames.g.cs +++ b/src/libs/Picsart/Generated/Picsart.ImageEffectsClient.ImageListEffectNames.g.cs @@ -637,7 +637,6 @@ partial void ProcessImageListEffectNamesResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.ImageEffectsClient.ImageSelectiveBlur.g.cs b/src/libs/Picsart/Generated/Picsart.ImageEffectsClient.ImageSelectiveBlur.g.cs index 3c6c917..5496ba6 100644 --- a/src/libs/Picsart/Generated/Picsart.ImageEffectsClient.ImageSelectiveBlur.g.cs +++ b/src/libs/Picsart/Generated/Picsart.ImageEffectsClient.ImageSelectiveBlur.g.cs @@ -651,7 +651,6 @@ partial void ProcessImageSelectiveBlurResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.ImageEffectsClient.ImageTransferColor.g.cs b/src/libs/Picsart/Generated/Picsart.ImageEffectsClient.ImageTransferColor.g.cs index 1bc7bbf..9f63b59 100644 --- a/src/libs/Picsart/Generated/Picsart.ImageEffectsClient.ImageTransferColor.g.cs +++ b/src/libs/Picsart/Generated/Picsart.ImageEffectsClient.ImageTransferColor.g.cs @@ -651,7 +651,6 @@ partial void ProcessImageTransferColorResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.ImageEffectsClient.ImageTransferStyle.g.cs b/src/libs/Picsart/Generated/Picsart.ImageEffectsClient.ImageTransferStyle.g.cs index 526ad04..d69fba3 100644 --- a/src/libs/Picsart/Generated/Picsart.ImageEffectsClient.ImageTransferStyle.g.cs +++ b/src/libs/Picsart/Generated/Picsart.ImageEffectsClient.ImageTransferStyle.g.cs @@ -651,7 +651,6 @@ partial void ProcessImageTransferStyleResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.ImagePhotoEnhancementClient.ImageFaceEnhance.g.cs b/src/libs/Picsart/Generated/Picsart.ImagePhotoEnhancementClient.ImageFaceEnhance.g.cs index f340db0..99542c6 100644 --- a/src/libs/Picsart/Generated/Picsart.ImagePhotoEnhancementClient.ImageFaceEnhance.g.cs +++ b/src/libs/Picsart/Generated/Picsart.ImagePhotoEnhancementClient.ImageFaceEnhance.g.cs @@ -651,7 +651,6 @@ partial void ProcessImageFaceEnhanceResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.ImagePhotoEnhancementClient.ImageUltraEnhance.g.cs b/src/libs/Picsart/Generated/Picsart.ImagePhotoEnhancementClient.ImageUltraEnhance.g.cs index 702ded1..524954b 100644 --- a/src/libs/Picsart/Generated/Picsart.ImagePhotoEnhancementClient.ImageUltraEnhance.g.cs +++ b/src/libs/Picsart/Generated/Picsart.ImagePhotoEnhancementClient.ImageUltraEnhance.g.cs @@ -673,7 +673,6 @@ partial void ProcessImageUltraEnhanceResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.ImagePhotoEnhancementClient.ImageUltraUpscale.g.cs b/src/libs/Picsart/Generated/Picsart.ImagePhotoEnhancementClient.ImageUltraUpscale.g.cs index 8c0a382..a0e423d 100644 --- a/src/libs/Picsart/Generated/Picsart.ImagePhotoEnhancementClient.ImageUltraUpscale.g.cs +++ b/src/libs/Picsart/Generated/Picsart.ImagePhotoEnhancementClient.ImageUltraUpscale.g.cs @@ -651,7 +651,6 @@ partial void ProcessImageUltraUpscaleResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.ImagePhotoEnhancementClient.ImageUltraUpscaleGetresult.g.cs b/src/libs/Picsart/Generated/Picsart.ImagePhotoEnhancementClient.ImageUltraUpscaleGetresult.g.cs index 1e8b546..4a57641 100644 --- a/src/libs/Picsart/Generated/Picsart.ImagePhotoEnhancementClient.ImageUltraUpscaleGetresult.g.cs +++ b/src/libs/Picsart/Generated/Picsart.ImagePhotoEnhancementClient.ImageUltraUpscaleGetresult.g.cs @@ -646,7 +646,6 @@ partial void ProcessImageUltraUpscaleGetresultResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.ImagePhotoEnhancementClient.ImageUpscale.g.cs b/src/libs/Picsart/Generated/Picsart.ImagePhotoEnhancementClient.ImageUpscale.g.cs index db701f9..095f36a 100644 --- a/src/libs/Picsart/Generated/Picsart.ImagePhotoEnhancementClient.ImageUpscale.g.cs +++ b/src/libs/Picsart/Generated/Picsart.ImagePhotoEnhancementClient.ImageUpscale.g.cs @@ -651,7 +651,6 @@ partial void ProcessImageUpscaleResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.ImageRemoveBackgroundClient.ImageRemoveBackground.g.cs b/src/libs/Picsart/Generated/Picsart.ImageRemoveBackgroundClient.ImageRemoveBackground.g.cs index 0cff714..f3d4700 100644 --- a/src/libs/Picsart/Generated/Picsart.ImageRemoveBackgroundClient.ImageRemoveBackground.g.cs +++ b/src/libs/Picsart/Generated/Picsart.ImageRemoveBackgroundClient.ImageRemoveBackground.g.cs @@ -651,7 +651,6 @@ partial void ProcessImageRemoveBackgroundResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.ImageSurfacemapClient.ImageSurfacemap.g.cs b/src/libs/Picsart/Generated/Picsart.ImageSurfacemapClient.ImageSurfacemap.g.cs index 3aac40d..ab63e89 100644 --- a/src/libs/Picsart/Generated/Picsart.ImageSurfacemapClient.ImageSurfacemap.g.cs +++ b/src/libs/Picsart/Generated/Picsart.ImageSurfacemapClient.ImageSurfacemap.g.cs @@ -651,7 +651,6 @@ partial void ProcessImageSurfacemapResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.ImageUtilitiesClient.ImageCreditsBalance.g.cs b/src/libs/Picsart/Generated/Picsart.ImageUtilitiesClient.ImageCreditsBalance.g.cs index 734559e..870ab83 100644 --- a/src/libs/Picsart/Generated/Picsart.ImageUtilitiesClient.ImageCreditsBalance.g.cs +++ b/src/libs/Picsart/Generated/Picsart.ImageUtilitiesClient.ImageCreditsBalance.g.cs @@ -637,7 +637,6 @@ partial void ProcessImageCreditsBalanceResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.ImageUtilitiesClient.ImageUpload.g.cs b/src/libs/Picsart/Generated/Picsart.ImageUtilitiesClient.ImageUpload.g.cs index f816242..b6762bf 100644 --- a/src/libs/Picsart/Generated/Picsart.ImageUtilitiesClient.ImageUpload.g.cs +++ b/src/libs/Picsart/Generated/Picsart.ImageUtilitiesClient.ImageUpload.g.cs @@ -683,7 +683,6 @@ partial void ProcessImageUploadResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.ImageWatermarkClient.ImageAddWatermark.g.cs b/src/libs/Picsart/Generated/Picsart.ImageWatermarkClient.ImageAddWatermark.g.cs index 5906231..a257ba7 100644 --- a/src/libs/Picsart/Generated/Picsart.ImageWatermarkClient.ImageAddWatermark.g.cs +++ b/src/libs/Picsart/Generated/Picsart.ImageWatermarkClient.ImageAddWatermark.g.cs @@ -613,7 +613,6 @@ partial void ProcessImageAddWatermarkResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.Polyfills.g.cs b/src/libs/Picsart/Generated/Picsart.Polyfills.g.cs index 7e55ea2..5613079 100644 --- a/src/libs/Picsart/Generated/Picsart.Polyfills.g.cs +++ b/src/libs/Picsart/Generated/Picsart.Polyfills.g.cs @@ -1,5 +1,4 @@ -#if !NET6_0_OR_GREATER #nullable enable namespace Picsart @@ -9,6 +8,7 @@ namespace Picsart /// public static partial class AutoSdkPolyfills { +#if !NET6_0_OR_GREATER /// /// /// @@ -48,6 +48,128 @@ public static partial class AutoSdkPolyfills content = content ?? throw new global::System.ArgumentNullException(nameof(content)); return content.ReadAsByteArrayAsync(); } +#endif + + /// + /// Creates a JSON request content instance. + /// + public static global::System.Net.Http.HttpContent CreateJsonContent( + T inputValue, + string mediaType, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions) + { + if (string.IsNullOrWhiteSpace(mediaType)) + { + throw new global::System.ArgumentException("Media type is required.", nameof(mediaType)); + } + +#if NET5_0_OR_GREATER + return global::System.Net.Http.Json.JsonContent.Create( + inputValue: inputValue, + mediaType: new global::System.Net.Http.Headers.MediaTypeHeaderValue(mediaType), + options: jsonSerializerOptions); +#else + var json = global::System.Text.Json.JsonSerializer.Serialize(inputValue, jsonSerializerOptions); + var stringContent = new global::System.Net.Http.StringContent( + content: json, + encoding: global::System.Text.Encoding.UTF8); + stringContent.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue(mediaType) + { + CharSet = global::System.Text.Encoding.UTF8.WebName, + }; + return stringContent; +#endif + } + + /// + /// Creates a JSON request content instance using a source-generated serializer context. + /// + public static global::System.Net.Http.HttpContent CreateJsonContent( + object? inputValue, + global::System.Type inputType, + string mediaType, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + inputType = inputType ?? throw new global::System.ArgumentNullException(nameof(inputType)); + jsonSerializerContext = jsonSerializerContext ?? throw new global::System.ArgumentNullException(nameof(jsonSerializerContext)); + + if (string.IsNullOrWhiteSpace(mediaType)) + { + throw new global::System.ArgumentException("Media type is required.", nameof(mediaType)); + } + +#if NET5_0_OR_GREATER + var jsonTypeInfo = jsonSerializerContext.GetTypeInfo(inputType) ?? + throw new global::System.InvalidOperationException($"No JsonTypeInfo registered for '{inputType}'."); + return global::System.Net.Http.Json.JsonContent.Create( + inputValue: inputValue, + jsonTypeInfo: jsonTypeInfo, + mediaType: new global::System.Net.Http.Headers.MediaTypeHeaderValue(mediaType)); +#else + var json = global::System.Text.Json.JsonSerializer.Serialize( + value: inputValue, + inputType: inputType, + jsonSerializerContext); + var stringContent = new global::System.Net.Http.StringContent( + content: json, + encoding: global::System.Text.Encoding.UTF8); + stringContent.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue(mediaType) + { + CharSet = global::System.Text.Encoding.UTF8.WebName, + }; + return stringContent; +#endif + } + + /// + /// Reads JSON content into the specified type using serializer options. + /// + public static async global::System.Threading.Tasks.Task ReadFromJsonAsync( + this global::System.Net.Http.HttpContent content, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions, + global::System.Threading.CancellationToken cancellationToken) + { + content = content ?? throw new global::System.ArgumentNullException(nameof(content)); + +#if NET5_0_OR_GREATER + return await global::System.Net.Http.Json.HttpContentJsonExtensions.ReadFromJsonAsync( + content, + jsonSerializerOptions, + cancellationToken).ConfigureAwait(false); +#else + using var stream = await AutoSdkPolyfills.ReadAsStreamAsync(content, cancellationToken).ConfigureAwait(false); + return await global::System.Text.Json.JsonSerializer.DeserializeAsync( + utf8Json: stream, + options: jsonSerializerOptions, + cancellationToken: cancellationToken).ConfigureAwait(false); +#endif + } + + /// + /// Reads JSON content into the specified type using a source-generated serializer context. + /// + public static async global::System.Threading.Tasks.Task ReadFromJsonAsync( + this global::System.Net.Http.HttpContent content, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext, + global::System.Threading.CancellationToken cancellationToken) + { + content = content ?? throw new global::System.ArgumentNullException(nameof(content)); + jsonSerializerContext = jsonSerializerContext ?? throw new global::System.ArgumentNullException(nameof(jsonSerializerContext)); + +#if NET5_0_OR_GREATER + return (T?)await global::System.Net.Http.Json.HttpContentJsonExtensions.ReadFromJsonAsync( + content, + typeof(T), + jsonSerializerContext, + cancellationToken).ConfigureAwait(false); +#else + using var stream = await AutoSdkPolyfills.ReadAsStreamAsync(content, cancellationToken).ConfigureAwait(false); + return (T?)await global::System.Text.Json.JsonSerializer.DeserializeAsync( + utf8Json: stream, + returnType: typeof(T), + jsonSerializerContext, + cancellationToken: cancellationToken).ConfigureAwait(false); +#endif + } } } -#endif \ No newline at end of file diff --git a/src/libs/Picsart/Generated/Picsart.VdReplayClient.VdExportReplay.g.cs b/src/libs/Picsart/Generated/Picsart.VdReplayClient.VdExportReplay.g.cs index aa987cc..ec3e098 100644 --- a/src/libs/Picsart/Generated/Picsart.VdReplayClient.VdExportReplay.g.cs +++ b/src/libs/Picsart/Generated/Picsart.VdReplayClient.VdExportReplay.g.cs @@ -651,7 +651,6 @@ partial void ProcessVdExportReplayResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.VdReplayClient.VdExportReplayGetresult.g.cs b/src/libs/Picsart/Generated/Picsart.VdReplayClient.VdExportReplayGetresult.g.cs index 156202d..ab4ac2f 100644 --- a/src/libs/Picsart/Generated/Picsart.VdReplayClient.VdExportReplayGetresult.g.cs +++ b/src/libs/Picsart/Generated/Picsart.VdReplayClient.VdExportReplayGetresult.g.cs @@ -646,7 +646,6 @@ partial void ProcessVdExportReplayGetresultResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.VdUtilitiesClient.VdCreditsBalance.g.cs b/src/libs/Picsart/Generated/Picsart.VdUtilitiesClient.VdCreditsBalance.g.cs index a9b8328..2ac4ce0 100644 --- a/src/libs/Picsart/Generated/Picsart.VdUtilitiesClient.VdCreditsBalance.g.cs +++ b/src/libs/Picsart/Generated/Picsart.VdUtilitiesClient.VdCreditsBalance.g.cs @@ -637,7 +637,6 @@ partial void ProcessVdCreditsBalanceResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.VdVariableDataContentClient.VdDescribeVariableDataContent.g.cs b/src/libs/Picsart/Generated/Picsart.VdVariableDataContentClient.VdDescribeVariableDataContent.g.cs index 9926e95..754b06b 100644 --- a/src/libs/Picsart/Generated/Picsart.VdVariableDataContentClient.VdDescribeVariableDataContent.g.cs +++ b/src/libs/Picsart/Generated/Picsart.VdVariableDataContentClient.VdDescribeVariableDataContent.g.cs @@ -680,7 +680,6 @@ partial void ProcessVdDescribeVariableDataContentResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.VdVariableDataContentClient.VdExportVariableDataContent.g.cs b/src/libs/Picsart/Generated/Picsart.VdVariableDataContentClient.VdExportVariableDataContent.g.cs index 4b39307..2d3caf8 100644 --- a/src/libs/Picsart/Generated/Picsart.VdVariableDataContentClient.VdExportVariableDataContent.g.cs +++ b/src/libs/Picsart/Generated/Picsart.VdVariableDataContentClient.VdExportVariableDataContent.g.cs @@ -653,7 +653,6 @@ partial void ProcessVdExportVariableDataContentResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.VdVariableDataContentClient.VdExportVariableDataContentGetresult.g.cs b/src/libs/Picsart/Generated/Picsart.VdVariableDataContentClient.VdExportVariableDataContentGetresult.g.cs index 7094c87..0dee860 100644 --- a/src/libs/Picsart/Generated/Picsart.VdVariableDataContentClient.VdExportVariableDataContentGetresult.g.cs +++ b/src/libs/Picsart/Generated/Picsart.VdVariableDataContentClient.VdExportVariableDataContentGetresult.g.cs @@ -646,7 +646,6 @@ partial void ProcessVdExportVariableDataContentGetresultResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.VideoAdsClient.VideoEncodeCtv.g.cs b/src/libs/Picsart/Generated/Picsart.VideoAdsClient.VideoEncodeCtv.g.cs index 26c6f52..215769f 100644 --- a/src/libs/Picsart/Generated/Picsart.VideoAdsClient.VideoEncodeCtv.g.cs +++ b/src/libs/Picsart/Generated/Picsart.VideoAdsClient.VideoEncodeCtv.g.cs @@ -619,7 +619,6 @@ partial void ProcessVideoEncodeCtvResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.VideoAudioClient.VideoAdjustAudio.g.cs b/src/libs/Picsart/Generated/Picsart.VideoAudioClient.VideoAdjustAudio.g.cs index c45f2a5..9ebf842 100644 --- a/src/libs/Picsart/Generated/Picsart.VideoAudioClient.VideoAdjustAudio.g.cs +++ b/src/libs/Picsart/Generated/Picsart.VideoAudioClient.VideoAdjustAudio.g.cs @@ -617,7 +617,6 @@ partial void ProcessVideoAdjustAudioResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.VideoAudioClient.VideoExtractAudio.g.cs b/src/libs/Picsart/Generated/Picsart.VideoAudioClient.VideoExtractAudio.g.cs index 82f27f9..ea8c007 100644 --- a/src/libs/Picsart/Generated/Picsart.VideoAudioClient.VideoExtractAudio.g.cs +++ b/src/libs/Picsart/Generated/Picsart.VideoAudioClient.VideoExtractAudio.g.cs @@ -617,7 +617,6 @@ partial void ProcessVideoExtractAudioResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.VideoEditClient.VideoConcat.g.cs b/src/libs/Picsart/Generated/Picsart.VideoEditClient.VideoConcat.g.cs index 9fcbec2..cbcb1e9 100644 --- a/src/libs/Picsart/Generated/Picsart.VideoEditClient.VideoConcat.g.cs +++ b/src/libs/Picsart/Generated/Picsart.VideoEditClient.VideoConcat.g.cs @@ -617,7 +617,6 @@ partial void ProcessVideoConcatResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.VideoEditClient.VideoConcatHighlights.g.cs b/src/libs/Picsart/Generated/Picsart.VideoEditClient.VideoConcatHighlights.g.cs index 7bd931e..8795065 100644 --- a/src/libs/Picsart/Generated/Picsart.VideoEditClient.VideoConcatHighlights.g.cs +++ b/src/libs/Picsart/Generated/Picsart.VideoEditClient.VideoConcatHighlights.g.cs @@ -615,7 +615,6 @@ partial void ProcessVideoConcatHighlightsResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.VideoEditClient.VideoCrop.g.cs b/src/libs/Picsart/Generated/Picsart.VideoEditClient.VideoCrop.g.cs index 7d03425..8eb511b 100644 --- a/src/libs/Picsart/Generated/Picsart.VideoEditClient.VideoCrop.g.cs +++ b/src/libs/Picsart/Generated/Picsart.VideoEditClient.VideoCrop.g.cs @@ -617,7 +617,6 @@ partial void ProcessVideoCropResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.VideoEditClient.VideoEdit.g.cs b/src/libs/Picsart/Generated/Picsart.VideoEditClient.VideoEdit.g.cs index 39311f2..ecbac85 100644 --- a/src/libs/Picsart/Generated/Picsart.VideoEditClient.VideoEdit.g.cs +++ b/src/libs/Picsart/Generated/Picsart.VideoEditClient.VideoEdit.g.cs @@ -617,7 +617,6 @@ partial void ProcessVideoEditResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.VideoEditClient.VideoFit.g.cs b/src/libs/Picsart/Generated/Picsart.VideoEditClient.VideoFit.g.cs index 759589e..3a112be 100644 --- a/src/libs/Picsart/Generated/Picsart.VideoEditClient.VideoFit.g.cs +++ b/src/libs/Picsart/Generated/Picsart.VideoEditClient.VideoFit.g.cs @@ -617,7 +617,6 @@ partial void ProcessVideoFitResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.VideoEditClient.VideoTrim.g.cs b/src/libs/Picsart/Generated/Picsart.VideoEditClient.VideoTrim.g.cs index 1028835..575fbb9 100644 --- a/src/libs/Picsart/Generated/Picsart.VideoEditClient.VideoTrim.g.cs +++ b/src/libs/Picsart/Generated/Picsart.VideoEditClient.VideoTrim.g.cs @@ -617,7 +617,6 @@ partial void ProcessVideoTrimResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.VideoEffectsClient.VideoAdjust.g.cs b/src/libs/Picsart/Generated/Picsart.VideoEffectsClient.VideoAdjust.g.cs index e450519..1424369 100644 --- a/src/libs/Picsart/Generated/Picsart.VideoEffectsClient.VideoAdjust.g.cs +++ b/src/libs/Picsart/Generated/Picsart.VideoEffectsClient.VideoAdjust.g.cs @@ -639,7 +639,6 @@ partial void ProcessVideoAdjustResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.VideoEffectsClient.VideoApplyEffect.g.cs b/src/libs/Picsart/Generated/Picsart.VideoEffectsClient.VideoApplyEffect.g.cs index 7da9ce2..5bcfddf 100644 --- a/src/libs/Picsart/Generated/Picsart.VideoEffectsClient.VideoApplyEffect.g.cs +++ b/src/libs/Picsart/Generated/Picsart.VideoEffectsClient.VideoApplyEffect.g.cs @@ -617,7 +617,6 @@ partial void ProcessVideoApplyEffectResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.VideoMetadataClient.VideoGetThumbnail.g.cs b/src/libs/Picsart/Generated/Picsart.VideoMetadataClient.VideoGetThumbnail.g.cs index 40835d8..984721a 100644 --- a/src/libs/Picsart/Generated/Picsart.VideoMetadataClient.VideoGetThumbnail.g.cs +++ b/src/libs/Picsart/Generated/Picsart.VideoMetadataClient.VideoGetThumbnail.g.cs @@ -617,7 +617,6 @@ partial void ProcessVideoGetThumbnailResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.VideoMetadataClient.VideoMetadata.g.cs b/src/libs/Picsart/Generated/Picsart.VideoMetadataClient.VideoMetadata.g.cs index f1ce6dd..984f103 100644 --- a/src/libs/Picsart/Generated/Picsart.VideoMetadataClient.VideoMetadata.g.cs +++ b/src/libs/Picsart/Generated/Picsart.VideoMetadataClient.VideoMetadata.g.cs @@ -619,7 +619,6 @@ partial void ProcessVideoMetadataResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.VideoMetadataClient.VideoSetThumbnail.g.cs b/src/libs/Picsart/Generated/Picsart.VideoMetadataClient.VideoSetThumbnail.g.cs index da8b163..b7ac170 100644 --- a/src/libs/Picsart/Generated/Picsart.VideoMetadataClient.VideoSetThumbnail.g.cs +++ b/src/libs/Picsart/Generated/Picsart.VideoMetadataClient.VideoSetThumbnail.g.cs @@ -617,7 +617,6 @@ partial void ProcessVideoSetThumbnailResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.VideoMetadataClient.VideoSetThumbnailGetresult.g.cs b/src/libs/Picsart/Generated/Picsart.VideoMetadataClient.VideoSetThumbnailGetresult.g.cs index bdd89ae..07f8a44 100644 --- a/src/libs/Picsart/Generated/Picsart.VideoMetadataClient.VideoSetThumbnailGetresult.g.cs +++ b/src/libs/Picsart/Generated/Picsart.VideoMetadataClient.VideoSetThumbnailGetresult.g.cs @@ -608,7 +608,6 @@ partial void ProcessVideoSetThumbnailGetresultResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.VideoRemoveBackgroundClient.VideoRemoveBackground.g.cs b/src/libs/Picsart/Generated/Picsart.VideoRemoveBackgroundClient.VideoRemoveBackground.g.cs index de91a86..6f1fa7b 100644 --- a/src/libs/Picsart/Generated/Picsart.VideoRemoveBackgroundClient.VideoRemoveBackground.g.cs +++ b/src/libs/Picsart/Generated/Picsart.VideoRemoveBackgroundClient.VideoRemoveBackground.g.cs @@ -575,7 +575,6 @@ partial void ProcessVideoRemoveBackgroundResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.VideoTranscriptionsClient.VideoTranscribeAudio.g.cs b/src/libs/Picsart/Generated/Picsart.VideoTranscriptionsClient.VideoTranscribeAudio.g.cs index 7f7b9aa..0f236c4 100644 --- a/src/libs/Picsart/Generated/Picsart.VideoTranscriptionsClient.VideoTranscribeAudio.g.cs +++ b/src/libs/Picsart/Generated/Picsart.VideoTranscriptionsClient.VideoTranscribeAudio.g.cs @@ -635,7 +635,6 @@ partial void ProcessVideoTranscribeAudioResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.VideoTranscriptionsClient.VideoTranscribeAudioGetresult.g.cs b/src/libs/Picsart/Generated/Picsart.VideoTranscriptionsClient.VideoTranscribeAudioGetresult.g.cs index 504a9d0..68e23b1 100644 --- a/src/libs/Picsart/Generated/Picsart.VideoTranscriptionsClient.VideoTranscribeAudioGetresult.g.cs +++ b/src/libs/Picsart/Generated/Picsart.VideoTranscriptionsClient.VideoTranscribeAudioGetresult.g.cs @@ -646,7 +646,6 @@ partial void ProcessVideoTranscribeAudioGetresultResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.VideoUtilitiesClient.VideoCreditsBalance.g.cs b/src/libs/Picsart/Generated/Picsart.VideoUtilitiesClient.VideoCreditsBalance.g.cs index bbc6a17..660acaa 100644 --- a/src/libs/Picsart/Generated/Picsart.VideoUtilitiesClient.VideoCreditsBalance.g.cs +++ b/src/libs/Picsart/Generated/Picsart.VideoUtilitiesClient.VideoCreditsBalance.g.cs @@ -637,7 +637,6 @@ partial void ProcessVideoCreditsBalanceResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.VideoUtilitiesClient.VideoGetaudioresult.g.cs b/src/libs/Picsart/Generated/Picsart.VideoUtilitiesClient.VideoGetaudioresult.g.cs index f8e998b..eaa6f07 100644 --- a/src/libs/Picsart/Generated/Picsart.VideoUtilitiesClient.VideoGetaudioresult.g.cs +++ b/src/libs/Picsart/Generated/Picsart.VideoUtilitiesClient.VideoGetaudioresult.g.cs @@ -570,7 +570,6 @@ partial void ProcessVideoGetaudioresultResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.VideoUtilitiesClient.VideoGetresult.g.cs b/src/libs/Picsart/Generated/Picsart.VideoUtilitiesClient.VideoGetresult.g.cs index 31fd0eb..2a25025 100644 --- a/src/libs/Picsart/Generated/Picsart.VideoUtilitiesClient.VideoGetresult.g.cs +++ b/src/libs/Picsart/Generated/Picsart.VideoUtilitiesClient.VideoGetresult.g.cs @@ -570,7 +570,6 @@ partial void ProcessVideoGetresultResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.VideoUtilitiesClient.VideoUpload.g.cs b/src/libs/Picsart/Generated/Picsart.VideoUtilitiesClient.VideoUpload.g.cs index 94ed5f0..2cbd38a 100644 --- a/src/libs/Picsart/Generated/Picsart.VideoUtilitiesClient.VideoUpload.g.cs +++ b/src/libs/Picsart/Generated/Picsart.VideoUtilitiesClient.VideoUpload.g.cs @@ -590,7 +590,6 @@ partial void ProcessVideoUploadResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.VideoVideoEnhancementClient.VideoUpscaleFps.g.cs b/src/libs/Picsart/Generated/Picsart.VideoVideoEnhancementClient.VideoUpscaleFps.g.cs index 1635453..7ee4975 100644 --- a/src/libs/Picsart/Generated/Picsart.VideoVideoEnhancementClient.VideoUpscaleFps.g.cs +++ b/src/libs/Picsart/Generated/Picsart.VideoVideoEnhancementClient.VideoUpscaleFps.g.cs @@ -660,7 +660,6 @@ partial void ProcessVideoUpscaleFpsResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.VideoVideoEnhancementClient.VideoUpscaleFpsGetresult.g.cs b/src/libs/Picsart/Generated/Picsart.VideoVideoEnhancementClient.VideoUpscaleFpsGetresult.g.cs index 4b5e83b..991d773 100644 --- a/src/libs/Picsart/Generated/Picsart.VideoVideoEnhancementClient.VideoUpscaleFpsGetresult.g.cs +++ b/src/libs/Picsart/Generated/Picsart.VideoVideoEnhancementClient.VideoUpscaleFpsGetresult.g.cs @@ -608,7 +608,6 @@ partial void ProcessVideoUpscaleFpsGetresultResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken diff --git a/src/libs/Picsart/Generated/Picsart.VideoWatermarkClient.VideoAddWatermark.g.cs b/src/libs/Picsart/Generated/Picsart.VideoWatermarkClient.VideoAddWatermark.g.cs index a6b7149..ffb038b 100644 --- a/src/libs/Picsart/Generated/Picsart.VideoWatermarkClient.VideoAddWatermark.g.cs +++ b/src/libs/Picsart/Generated/Picsart.VideoWatermarkClient.VideoAddWatermark.g.cs @@ -613,7 +613,6 @@ partial void ProcessVideoAddWatermarkResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER cancellationToken