diff --git a/src/libs/Sightengine/Generated/Sightengine.SightengineClient.CheckImageByUpload.g.cs b/src/libs/Sightengine/Generated/Sightengine.SightengineClient.CheckImageByUpload.g.cs index 5a73771..6769fa6 100644 --- a/src/libs/Sightengine/Generated/Sightengine.SightengineClient.CheckImageByUpload.g.cs +++ b/src/libs/Sightengine/Generated/Sightengine.SightengineClient.CheckImageByUpload.g.cs @@ -122,6 +122,34 @@ partial void ProcessCheckImageByUploadResponseContent( } var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); var __contentMedia = new global::System.Net.Http.ByteArrayContent(request.Media ?? global::System.Array.Empty()); + __contentMedia.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( + request.Medianame is null + ? "application/octet-stream" + : (global::System.IO.Path.GetExtension(request.Medianame) ?? string.Empty).ToLowerInvariant() switch + { + ".aac" => "audio/aac", + ".flac" => "audio/flac", + ".gif" => "image/gif", + ".jpeg" => "image/jpeg", + ".jpg" => "image/jpeg", + ".json" => "application/json", + ".m4a" => "audio/mp4", + ".mp3" => "audio/mpeg", + ".mp4" => "video/mp4", + ".mpeg" => "audio/mpeg", + ".mpga" => "audio/mpeg", + ".oga" => "audio/ogg", + ".ogg" => "audio/ogg", + ".opus" => "audio/ogg", + ".pdf" => "application/pdf", + ".png" => "image/png", + ".txt" => "text/plain", + ".wav" => "audio/wav", + ".weba" => "audio/webm", + ".webm" => "video/webm", + ".webp" => "image/webp", + _ => "application/octet-stream", + }); __httpRequestContent.Add( content: __contentMedia, name: "\"media\"", @@ -131,7 +159,7 @@ partial void ProcessCheckImageByUploadResponseContent( __contentMedia.Headers.ContentDisposition.FileNameStar = null; } __httpRequestContent.Add( - content: new global::System.Net.Http.StringContent($"{request.Models}"), + content: new global::System.Net.Http.StringContent(request.Models ?? string.Empty), name: "\"models\""); __httpRequest.Content = __httpRequestContent; global::Sightengine.AutoSDKRequestOptionsSupport.ApplyHeaders( diff --git a/src/libs/Sightengine/Generated/Sightengine.SightengineClient.CheckImageByUrl.g.cs b/src/libs/Sightengine/Generated/Sightengine.SightengineClient.CheckImageByUrl.g.cs index 475b4b8..949a9ba 100644 --- a/src/libs/Sightengine/Generated/Sightengine.SightengineClient.CheckImageByUrl.g.cs +++ b/src/libs/Sightengine/Generated/Sightengine.SightengineClient.CheckImageByUrl.g.cs @@ -137,8 +137,8 @@ partial void ProcessCheckImageByUrlResponseContent( PrepareCheckImageByUrlRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - url: url, - models: models); + url: url!, + models: models!); return __httpRequest; } diff --git a/src/libs/Sightengine/Generated/Sightengine.SightengineClient.CheckVideoAsync.g.cs b/src/libs/Sightengine/Generated/Sightengine.SightengineClient.CheckVideoAsync.g.cs index 7949389..8bac1ad 100644 --- a/src/libs/Sightengine/Generated/Sightengine.SightengineClient.CheckVideoAsync.g.cs +++ b/src/libs/Sightengine/Generated/Sightengine.SightengineClient.CheckVideoAsync.g.cs @@ -125,6 +125,34 @@ partial void ProcessCheckVideoAsyncResponseContent( { var __contentMedia = new global::System.Net.Http.ByteArrayContent(request.Media ?? global::System.Array.Empty()); + __contentMedia.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( + request.Medianame is null + ? "application/octet-stream" + : (global::System.IO.Path.GetExtension(request.Medianame) ?? string.Empty).ToLowerInvariant() switch + { + ".aac" => "audio/aac", + ".flac" => "audio/flac", + ".gif" => "image/gif", + ".jpeg" => "image/jpeg", + ".jpg" => "image/jpeg", + ".json" => "application/json", + ".m4a" => "audio/mp4", + ".mp3" => "audio/mpeg", + ".mp4" => "video/mp4", + ".mpeg" => "audio/mpeg", + ".mpga" => "audio/mpeg", + ".oga" => "audio/ogg", + ".ogg" => "audio/ogg", + ".opus" => "audio/ogg", + ".pdf" => "application/pdf", + ".png" => "image/png", + ".txt" => "text/plain", + ".wav" => "audio/wav", + ".weba" => "audio/webm", + ".webm" => "video/webm", + ".webp" => "image/webp", + _ => "application/octet-stream", + }); __httpRequestContent.Add( content: __contentMedia, name: "\"media\"", @@ -138,18 +166,18 @@ partial void ProcessCheckVideoAsyncResponseContent( { __httpRequestContent.Add( - content: new global::System.Net.Http.StringContent($"{request.StreamUrl}"), + content: new global::System.Net.Http.StringContent(request.StreamUrl ?? string.Empty), name: "\"stream_url\""); } if (request.CallbackUrl != default) { __httpRequestContent.Add( - content: new global::System.Net.Http.StringContent($"{request.CallbackUrl}"), + content: new global::System.Net.Http.StringContent(request.CallbackUrl ?? string.Empty), name: "\"callback_url\""); } __httpRequestContent.Add( - content: new global::System.Net.Http.StringContent($"{request.Models}"), + content: new global::System.Net.Http.StringContent(request.Models ?? string.Empty), name: "\"models\""); __httpRequest.Content = __httpRequestContent; global::Sightengine.AutoSDKRequestOptionsSupport.ApplyHeaders( diff --git a/src/libs/Sightengine/Generated/Sightengine.SightengineClient.CheckVideoSync.g.cs b/src/libs/Sightengine/Generated/Sightengine.SightengineClient.CheckVideoSync.g.cs index cf4a8dd..3167037 100644 --- a/src/libs/Sightengine/Generated/Sightengine.SightengineClient.CheckVideoSync.g.cs +++ b/src/libs/Sightengine/Generated/Sightengine.SightengineClient.CheckVideoSync.g.cs @@ -123,6 +123,34 @@ partial void ProcessCheckVideoSyncResponseContent( { var __contentMedia = new global::System.Net.Http.ByteArrayContent(request.Media ?? global::System.Array.Empty()); + __contentMedia.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( + request.Medianame is null + ? "application/octet-stream" + : (global::System.IO.Path.GetExtension(request.Medianame) ?? string.Empty).ToLowerInvariant() switch + { + ".aac" => "audio/aac", + ".flac" => "audio/flac", + ".gif" => "image/gif", + ".jpeg" => "image/jpeg", + ".jpg" => "image/jpeg", + ".json" => "application/json", + ".m4a" => "audio/mp4", + ".mp3" => "audio/mpeg", + ".mp4" => "video/mp4", + ".mpeg" => "audio/mpeg", + ".mpga" => "audio/mpeg", + ".oga" => "audio/ogg", + ".ogg" => "audio/ogg", + ".opus" => "audio/ogg", + ".pdf" => "application/pdf", + ".png" => "image/png", + ".txt" => "text/plain", + ".wav" => "audio/wav", + ".weba" => "audio/webm", + ".webm" => "video/webm", + ".webp" => "image/webp", + _ => "application/octet-stream", + }); __httpRequestContent.Add( content: __contentMedia, name: "\"media\"", @@ -136,11 +164,11 @@ partial void ProcessCheckVideoSyncResponseContent( { __httpRequestContent.Add( - content: new global::System.Net.Http.StringContent($"{request.StreamUrl}"), + content: new global::System.Net.Http.StringContent(request.StreamUrl ?? string.Empty), name: "\"stream_url\""); } __httpRequestContent.Add( - content: new global::System.Net.Http.StringContent($"{request.Models}"), + content: new global::System.Net.Http.StringContent(request.Models ?? string.Empty), name: "\"models\""); __httpRequest.Content = __httpRequestContent; global::Sightengine.AutoSDKRequestOptionsSupport.ApplyHeaders( diff --git a/src/libs/Sightengine/Generated/Sightengine.SightengineClient.CheckWorkflowByUpload.g.cs b/src/libs/Sightengine/Generated/Sightengine.SightengineClient.CheckWorkflowByUpload.g.cs index 340574d..bbce4c9 100644 --- a/src/libs/Sightengine/Generated/Sightengine.SightengineClient.CheckWorkflowByUpload.g.cs +++ b/src/libs/Sightengine/Generated/Sightengine.SightengineClient.CheckWorkflowByUpload.g.cs @@ -120,6 +120,34 @@ partial void ProcessCheckWorkflowByUploadResponseContent( } var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); var __contentMedia = new global::System.Net.Http.ByteArrayContent(request.Media ?? global::System.Array.Empty()); + __contentMedia.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( + request.Medianame is null + ? "application/octet-stream" + : (global::System.IO.Path.GetExtension(request.Medianame) ?? string.Empty).ToLowerInvariant() switch + { + ".aac" => "audio/aac", + ".flac" => "audio/flac", + ".gif" => "image/gif", + ".jpeg" => "image/jpeg", + ".jpg" => "image/jpeg", + ".json" => "application/json", + ".m4a" => "audio/mp4", + ".mp3" => "audio/mpeg", + ".mp4" => "video/mp4", + ".mpeg" => "audio/mpeg", + ".mpga" => "audio/mpeg", + ".oga" => "audio/ogg", + ".ogg" => "audio/ogg", + ".opus" => "audio/ogg", + ".pdf" => "application/pdf", + ".png" => "image/png", + ".txt" => "text/plain", + ".wav" => "audio/wav", + ".weba" => "audio/webm", + ".webm" => "video/webm", + ".webp" => "image/webp", + _ => "application/octet-stream", + }); __httpRequestContent.Add( content: __contentMedia, name: "\"media\"", @@ -129,7 +157,7 @@ partial void ProcessCheckWorkflowByUploadResponseContent( __contentMedia.Headers.ContentDisposition.FileNameStar = null; } __httpRequestContent.Add( - content: new global::System.Net.Http.StringContent($"{request.Workflow}"), + content: new global::System.Net.Http.StringContent(request.Workflow ?? string.Empty), name: "\"workflow\""); __httpRequest.Content = __httpRequestContent; global::Sightengine.AutoSDKRequestOptionsSupport.ApplyHeaders( diff --git a/src/libs/Sightengine/Generated/Sightengine.SightengineClient.CheckWorkflowByUrl.g.cs b/src/libs/Sightengine/Generated/Sightengine.SightengineClient.CheckWorkflowByUrl.g.cs index fce5cab..4914c38 100644 --- a/src/libs/Sightengine/Generated/Sightengine.SightengineClient.CheckWorkflowByUrl.g.cs +++ b/src/libs/Sightengine/Generated/Sightengine.SightengineClient.CheckWorkflowByUrl.g.cs @@ -135,8 +135,8 @@ partial void ProcessCheckWorkflowByUrlResponseContent( PrepareCheckWorkflowByUrlRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - url: url, - workflow: workflow); + url: url!, + workflow: workflow!); return __httpRequest; } diff --git a/src/libs/Sightengine/Generated/Sightengine.SightengineClient.SubmitFeedback.g.cs b/src/libs/Sightengine/Generated/Sightengine.SightengineClient.SubmitFeedback.g.cs index f3fd7fa..6493f78 100644 --- a/src/libs/Sightengine/Generated/Sightengine.SightengineClient.SubmitFeedback.g.cs +++ b/src/libs/Sightengine/Generated/Sightengine.SightengineClient.SubmitFeedback.g.cs @@ -124,13 +124,41 @@ partial void ProcessSubmitFeedbackResponseContent( { __httpRequestContent.Add( - content: new global::System.Net.Http.StringContent($"{request.Url}"), + content: new global::System.Net.Http.StringContent(request.Url ?? string.Empty), name: "\"url\""); } if (request.Media != default) { var __contentMedia = new global::System.Net.Http.ByteArrayContent(request.Media ?? global::System.Array.Empty()); + __contentMedia.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( + request.Medianame is null + ? "application/octet-stream" + : (global::System.IO.Path.GetExtension(request.Medianame) ?? string.Empty).ToLowerInvariant() switch + { + ".aac" => "audio/aac", + ".flac" => "audio/flac", + ".gif" => "image/gif", + ".jpeg" => "image/jpeg", + ".jpg" => "image/jpeg", + ".json" => "application/json", + ".m4a" => "audio/mp4", + ".mp3" => "audio/mpeg", + ".mp4" => "video/mp4", + ".mpeg" => "audio/mpeg", + ".mpga" => "audio/mpeg", + ".oga" => "audio/ogg", + ".ogg" => "audio/ogg", + ".opus" => "audio/ogg", + ".pdf" => "application/pdf", + ".png" => "image/png", + ".txt" => "text/plain", + ".wav" => "audio/wav", + ".weba" => "audio/webm", + ".webm" => "video/webm", + ".webp" => "image/webp", + _ => "application/octet-stream", + }); __httpRequestContent.Add( content: __contentMedia, name: "\"media\"", @@ -141,10 +169,10 @@ partial void ProcessSubmitFeedbackResponseContent( } } __httpRequestContent.Add( - content: new global::System.Net.Http.StringContent($"{request.Model}"), + content: new global::System.Net.Http.StringContent(request.Model ?? string.Empty), name: "\"model\""); __httpRequestContent.Add( - content: new global::System.Net.Http.StringContent($"{request.Class}"), + content: new global::System.Net.Http.StringContent(request.Class ?? string.Empty), name: "\"class\""); __httpRequest.Content = __httpRequestContent; global::Sightengine.AutoSDKRequestOptionsSupport.ApplyHeaders(