From 4de4656e6734874cb15ccebc4b58f42d9baae443 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 24 May 2026 04:16:56 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- .../Generated/Sightengine.Exceptions.g.cs | 134 +++++++++++++++ ....SightengineClient.CheckImageByUpload.g.cs | 162 ++++++++---------- ...ine.SightengineClient.CheckImageByUrl.g.cs | 54 +++--- ...ghtengine.SightengineClient.CheckText.g.cs | 54 +++--- ...ine.SightengineClient.CheckVideoAsync.g.cs | 54 +++--- ...gine.SightengineClient.CheckVideoSync.g.cs | 54 +++--- ...ghtengineClient.CheckWorkflowByUpload.g.cs | 162 ++++++++---------- ....SightengineClient.CheckWorkflowByUrl.g.cs | 54 +++--- ...gine.SightengineClient.SubmitFeedback.g.cs | 54 +++--- 9 files changed, 422 insertions(+), 360 deletions(-) diff --git a/src/libs/Sightengine/Generated/Sightengine.Exceptions.g.cs b/src/libs/Sightengine/Generated/Sightengine.Exceptions.g.cs index 04319fb..af563fe 100644 --- a/src/libs/Sightengine/Generated/Sightengine.Exceptions.g.cs +++ b/src/libs/Sightengine/Generated/Sightengine.Exceptions.g.cs @@ -12,16 +12,19 @@ public partial class ApiException : global::System.Exception /// The HTTP status code of the response. /// public global::System.Net.HttpStatusCode StatusCode { get; } + /// /// The response body as a string, or null if the body could not be read. /// This is always populated for error responses regardless of the ReadResponseAsString setting. /// For success-path failures (e.g. deserialization errors), the client attempts a best-effort read. /// public string? ResponseBody { get; set; } + /// /// The response headers. /// public global::System.Collections.Generic.Dictionary>? ResponseHeaders { get; set; } + /// /// Initializes a new instance of the class. /// @@ -49,6 +52,103 @@ public ApiException(string message, global::System.Exception? innerException, gl { StatusCode = statusCode; } + + /// + /// Constructs an instance whose runtime type matches the response status code when the typed exception hierarchy is enabled. Always returns a plain when the hierarchy is disabled. + /// + /// The HTTP status code of the response. + /// The error message. + /// An inner exception, when one is available. + /// The response headers; consulted for 429 Retry-After parsing when present. + public static global::Sightengine.ApiException Create( + global::System.Net.HttpStatusCode statusCode, + string message, + global::System.Exception? innerException = null, + global::System.Collections.Generic.IDictionary>? responseHeaders = null) + { + return new global::Sightengine.ApiException(message, innerException, statusCode); + } + + /// + /// Convenience overload that constructs an with response body and headers populated. + /// + public static global::Sightengine.ApiException Create( + global::System.Net.HttpStatusCode statusCode, + string message, + global::System.Exception? innerException, + string? responseBody, + global::System.Collections.Generic.Dictionary>? responseHeaders) + { + var exception = global::Sightengine.ApiException.Create(statusCode, message, innerException, responseHeaders); + exception.ResponseBody = responseBody; + exception.ResponseHeaders = responseHeaders; + return exception; + } + + /// + /// Parses a Retry-After response header (delta-seconds or HTTP-date) into a . + /// Returns null when the header is missing or unparseable. Public so consumer code that observes + /// directly can recover the value without re-implementing the parser. + /// + public static global::System.TimeSpan? TryParseRetryAfter( + global::System.Collections.Generic.IDictionary>? headers) + { + if (headers == null) + { + return null; + } + + global::System.Collections.Generic.IEnumerable? values = null; + foreach (var entry in headers) + { + if (string.Equals(entry.Key, "Retry-After", global::System.StringComparison.OrdinalIgnoreCase)) + { + values = entry.Value; + break; + } + } + + if (values == null) + { + return null; + } + + string? raw = null; + foreach (var value in values) + { + if (!string.IsNullOrWhiteSpace(value)) + { + raw = value.Trim(); + break; + } + } + + if (string.IsNullOrEmpty(raw)) + { + return null; + } + + if (int.TryParse( + raw, + global::System.Globalization.NumberStyles.Integer, + global::System.Globalization.CultureInfo.InvariantCulture, + out var seconds) && seconds >= 0) + { + return global::System.TimeSpan.FromSeconds(seconds); + } + + if (global::System.DateTimeOffset.TryParse( + raw, + global::System.Globalization.CultureInfo.InvariantCulture, + global::System.Globalization.DateTimeStyles.AssumeUniversal | global::System.Globalization.DateTimeStyles.AdjustToUniversal, + out var when)) + { + var delta = when - global::System.DateTimeOffset.UtcNow; + return delta > global::System.TimeSpan.Zero ? delta : global::System.TimeSpan.Zero; + } + + return null; + } } /// @@ -88,5 +188,39 @@ public ApiException(string message, global::System.Net.HttpStatusCode statusCode public ApiException(string message, global::System.Exception? innerException, global::System.Net.HttpStatusCode statusCode) : base(message, innerException, statusCode) { } + + /// + /// Constructs an whose runtime type matches the response status code when the typed exception hierarchy is enabled. + /// + /// The HTTP status code of the response. + /// The error message. + /// An inner exception, when one is available. + /// The response headers; consulted for 429 Retry-After parsing when present. + public static new global::Sightengine.ApiException Create( + global::System.Net.HttpStatusCode statusCode, + string message, + global::System.Exception? innerException = null, + global::System.Collections.Generic.IDictionary>? responseHeaders = null) + { + return new global::Sightengine.ApiException(message, innerException, statusCode); + } + + /// + /// Convenience overload that constructs an with response body, object, and headers populated. + /// + public static global::Sightengine.ApiException Create( + global::System.Net.HttpStatusCode statusCode, + string message, + global::System.Exception? innerException, + string? responseBody, + T? responseObject, + global::System.Collections.Generic.Dictionary>? responseHeaders) + { + var exception = global::Sightengine.ApiException.Create(statusCode, message, innerException, responseHeaders); + exception.ResponseBody = responseBody; + exception.ResponseObject = responseObject; + exception.ResponseHeaders = responseHeaders; + return exception; + } } } \ No newline at end of file diff --git a/src/libs/Sightengine/Generated/Sightengine.SightengineClient.CheckImageByUpload.g.cs b/src/libs/Sightengine/Generated/Sightengine.SightengineClient.CheckImageByUpload.g.cs index 9d1d5a5..3d6a905 100644 --- a/src/libs/Sightengine/Generated/Sightengine.SightengineClient.CheckImageByUpload.g.cs +++ b/src/libs/Sightengine/Generated/Sightengine.SightengineClient.CheckImageByUpload.g.cs @@ -408,18 +408,17 @@ request.Medianame is null __exception_400 = __ex; } - throw new global::Sightengine.ApiException( + + throw global::Sightengine.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Unauthorized — invalid credentials. if ((int)__response.StatusCode == 401) @@ -446,18 +445,17 @@ request.Medianame is null __exception_401 = __ex; } - throw new global::Sightengine.ApiException( + + throw global::Sightengine.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -491,17 +489,15 @@ request.Medianame is null } catch (global::System.Exception __ex) { - throw new global::Sightengine.ApiException( + throw global::Sightengine.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -538,17 +534,15 @@ request.Medianame is null { } - throw new global::Sightengine.ApiException( + throw global::Sightengine.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } @@ -960,18 +954,17 @@ request.Medianame is null __exception_400 = __ex; } - throw new global::Sightengine.ApiException( + + throw global::Sightengine.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Unauthorized — invalid credentials. if ((int)__response.StatusCode == 401) @@ -998,18 +991,17 @@ request.Medianame is null __exception_401 = __ex; } - throw new global::Sightengine.ApiException( + + throw global::Sightengine.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -1039,17 +1031,15 @@ request.Medianame is null } catch (global::System.Exception __ex) { - throw new global::Sightengine.ApiException( + throw global::Sightengine.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -1082,17 +1072,15 @@ request.Medianame is null { } - throw new global::Sightengine.ApiException( + throw global::Sightengine.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } @@ -1462,18 +1450,17 @@ request.Medianame is null __exception_400 = __ex; } - throw new global::Sightengine.ApiException( + + throw global::Sightengine.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Unauthorized — invalid credentials. if ((int)__response.StatusCode == 401) @@ -1500,18 +1487,17 @@ request.Medianame is null __exception_401 = __ex; } - throw new global::Sightengine.ApiException( + + throw global::Sightengine.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -1545,17 +1531,15 @@ request.Medianame is null } catch (global::System.Exception __ex) { - throw new global::Sightengine.ApiException( + throw global::Sightengine.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -1592,17 +1576,15 @@ request.Medianame is null { } - throw new global::Sightengine.ApiException( + throw global::Sightengine.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Sightengine/Generated/Sightengine.SightengineClient.CheckImageByUrl.g.cs b/src/libs/Sightengine/Generated/Sightengine.SightengineClient.CheckImageByUrl.g.cs index a860e7d..2fba5ce 100644 --- a/src/libs/Sightengine/Generated/Sightengine.SightengineClient.CheckImageByUrl.g.cs +++ b/src/libs/Sightengine/Generated/Sightengine.SightengineClient.CheckImageByUrl.g.cs @@ -370,18 +370,17 @@ partial void ProcessCheckImageByUrlResponseContent( __exception_400 = __ex; } - throw new global::Sightengine.ApiException( + + throw global::Sightengine.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Unauthorized. if ((int)__response.StatusCode == 401) @@ -408,18 +407,17 @@ partial void ProcessCheckImageByUrlResponseContent( __exception_401 = __ex; } - throw new global::Sightengine.ApiException( + + throw global::Sightengine.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -453,17 +451,15 @@ partial void ProcessCheckImageByUrlResponseContent( } catch (global::System.Exception __ex) { - throw new global::Sightengine.ApiException( + throw global::Sightengine.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -500,17 +496,15 @@ partial void ProcessCheckImageByUrlResponseContent( { } - throw new global::Sightengine.ApiException( + throw global::Sightengine.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Sightengine/Generated/Sightengine.SightengineClient.CheckText.g.cs b/src/libs/Sightengine/Generated/Sightengine.SightengineClient.CheckText.g.cs index 917b913..d0447ba 100644 --- a/src/libs/Sightengine/Generated/Sightengine.SightengineClient.CheckText.g.cs +++ b/src/libs/Sightengine/Generated/Sightengine.SightengineClient.CheckText.g.cs @@ -368,18 +368,17 @@ partial void ProcessCheckTextResponseContent( __exception_400 = __ex; } - throw new global::Sightengine.ApiException( + + throw global::Sightengine.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Unauthorized. if ((int)__response.StatusCode == 401) @@ -406,18 +405,17 @@ partial void ProcessCheckTextResponseContent( __exception_401 = __ex; } - throw new global::Sightengine.ApiException( + + throw global::Sightengine.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -451,17 +449,15 @@ partial void ProcessCheckTextResponseContent( } catch (global::System.Exception __ex) { - throw new global::Sightengine.ApiException( + throw global::Sightengine.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -498,17 +494,15 @@ partial void ProcessCheckTextResponseContent( { } - throw new global::Sightengine.ApiException( + throw global::Sightengine.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Sightengine/Generated/Sightengine.SightengineClient.CheckVideoAsync.g.cs b/src/libs/Sightengine/Generated/Sightengine.SightengineClient.CheckVideoAsync.g.cs index b2be5ec..a629265 100644 --- a/src/libs/Sightengine/Generated/Sightengine.SightengineClient.CheckVideoAsync.g.cs +++ b/src/libs/Sightengine/Generated/Sightengine.SightengineClient.CheckVideoAsync.g.cs @@ -428,18 +428,17 @@ request.Medianame is null __exception_400 = __ex; } - throw new global::Sightengine.ApiException( + + throw global::Sightengine.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Unauthorized. if ((int)__response.StatusCode == 401) @@ -466,18 +465,17 @@ request.Medianame is null __exception_401 = __ex; } - throw new global::Sightengine.ApiException( + + throw global::Sightengine.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -511,17 +509,15 @@ request.Medianame is null } catch (global::System.Exception __ex) { - throw new global::Sightengine.ApiException( + throw global::Sightengine.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -558,17 +554,15 @@ request.Medianame is null { } - throw new global::Sightengine.ApiException( + throw global::Sightengine.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Sightengine/Generated/Sightengine.SightengineClient.CheckVideoSync.g.cs b/src/libs/Sightengine/Generated/Sightengine.SightengineClient.CheckVideoSync.g.cs index aa16f31..7f5015e 100644 --- a/src/libs/Sightengine/Generated/Sightengine.SightengineClient.CheckVideoSync.g.cs +++ b/src/libs/Sightengine/Generated/Sightengine.SightengineClient.CheckVideoSync.g.cs @@ -416,18 +416,17 @@ request.Medianame is null __exception_400 = __ex; } - throw new global::Sightengine.ApiException( + + throw global::Sightengine.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Unauthorized. if ((int)__response.StatusCode == 401) @@ -454,18 +453,17 @@ request.Medianame is null __exception_401 = __ex; } - throw new global::Sightengine.ApiException( + + throw global::Sightengine.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -499,17 +497,15 @@ request.Medianame is null } catch (global::System.Exception __ex) { - throw new global::Sightengine.ApiException( + throw global::Sightengine.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -546,17 +542,15 @@ request.Medianame is null { } - throw new global::Sightengine.ApiException( + throw global::Sightengine.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Sightengine/Generated/Sightengine.SightengineClient.CheckWorkflowByUpload.g.cs b/src/libs/Sightengine/Generated/Sightengine.SightengineClient.CheckWorkflowByUpload.g.cs index 473ad24..c2782c8 100644 --- a/src/libs/Sightengine/Generated/Sightengine.SightengineClient.CheckWorkflowByUpload.g.cs +++ b/src/libs/Sightengine/Generated/Sightengine.SightengineClient.CheckWorkflowByUpload.g.cs @@ -404,18 +404,17 @@ request.Medianame is null __exception_400 = __ex; } - throw new global::Sightengine.ApiException( + + throw global::Sightengine.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Unauthorized. if ((int)__response.StatusCode == 401) @@ -442,18 +441,17 @@ request.Medianame is null __exception_401 = __ex; } - throw new global::Sightengine.ApiException( + + throw global::Sightengine.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -487,17 +485,15 @@ request.Medianame is null } catch (global::System.Exception __ex) { - throw new global::Sightengine.ApiException( + throw global::Sightengine.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -534,17 +530,15 @@ request.Medianame is null { } - throw new global::Sightengine.ApiException( + throw global::Sightengine.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } @@ -946,18 +940,17 @@ request.Medianame is null __exception_400 = __ex; } - throw new global::Sightengine.ApiException( + + throw global::Sightengine.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Unauthorized. if ((int)__response.StatusCode == 401) @@ -984,18 +977,17 @@ request.Medianame is null __exception_401 = __ex; } - throw new global::Sightengine.ApiException( + + throw global::Sightengine.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -1025,17 +1017,15 @@ request.Medianame is null } catch (global::System.Exception __ex) { - throw new global::Sightengine.ApiException( + throw global::Sightengine.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -1068,17 +1058,15 @@ request.Medianame is null { } - throw new global::Sightengine.ApiException( + throw global::Sightengine.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } @@ -1443,18 +1431,17 @@ request.Medianame is null __exception_400 = __ex; } - throw new global::Sightengine.ApiException( + + throw global::Sightengine.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Unauthorized. if ((int)__response.StatusCode == 401) @@ -1481,18 +1468,17 @@ request.Medianame is null __exception_401 = __ex; } - throw new global::Sightengine.ApiException( + + throw global::Sightengine.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -1526,17 +1512,15 @@ request.Medianame is null } catch (global::System.Exception __ex) { - throw new global::Sightengine.ApiException( + throw global::Sightengine.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -1573,17 +1557,15 @@ request.Medianame is null { } - throw new global::Sightengine.ApiException( + throw global::Sightengine.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Sightengine/Generated/Sightengine.SightengineClient.CheckWorkflowByUrl.g.cs b/src/libs/Sightengine/Generated/Sightengine.SightengineClient.CheckWorkflowByUrl.g.cs index 8c49a89..0483afc 100644 --- a/src/libs/Sightengine/Generated/Sightengine.SightengineClient.CheckWorkflowByUrl.g.cs +++ b/src/libs/Sightengine/Generated/Sightengine.SightengineClient.CheckWorkflowByUrl.g.cs @@ -366,18 +366,17 @@ partial void ProcessCheckWorkflowByUrlResponseContent( __exception_400 = __ex; } - throw new global::Sightengine.ApiException( + + throw global::Sightengine.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Unauthorized. if ((int)__response.StatusCode == 401) @@ -404,18 +403,17 @@ partial void ProcessCheckWorkflowByUrlResponseContent( __exception_401 = __ex; } - throw new global::Sightengine.ApiException( + + throw global::Sightengine.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -449,17 +447,15 @@ partial void ProcessCheckWorkflowByUrlResponseContent( } catch (global::System.Exception __ex) { - throw new global::Sightengine.ApiException( + throw global::Sightengine.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -496,17 +492,15 @@ partial void ProcessCheckWorkflowByUrlResponseContent( { } - throw new global::Sightengine.ApiException( + throw global::Sightengine.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Sightengine/Generated/Sightengine.SightengineClient.SubmitFeedback.g.cs b/src/libs/Sightengine/Generated/Sightengine.SightengineClient.SubmitFeedback.g.cs index fb5d0ed..9482028 100644 --- a/src/libs/Sightengine/Generated/Sightengine.SightengineClient.SubmitFeedback.g.cs +++ b/src/libs/Sightengine/Generated/Sightengine.SightengineClient.SubmitFeedback.g.cs @@ -422,18 +422,17 @@ request.Medianame is null __exception_400 = __ex; } - throw new global::Sightengine.ApiException( + + throw global::Sightengine.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Unauthorized. if ((int)__response.StatusCode == 401) @@ -460,18 +459,17 @@ request.Medianame is null __exception_401 = __ex; } - throw new global::Sightengine.ApiException( + + throw global::Sightengine.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -505,17 +503,15 @@ request.Medianame is null } catch (global::System.Exception __ex) { - throw new global::Sightengine.ApiException( + throw global::Sightengine.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -552,17 +548,15 @@ request.Medianame is null { } - throw new global::Sightengine.ApiException( + throw global::Sightengine.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } }