diff --git a/src/libs/Krea/Generated/Krea.AssetsClient.DeleteAsset.g.cs b/src/libs/Krea/Generated/Krea.AssetsClient.DeleteAsset.g.cs index 952ee80..3b86cd6 100644 --- a/src/libs/Krea/Generated/Krea.AssetsClient.DeleteAsset.g.cs +++ b/src/libs/Krea/Generated/Krea.AssetsClient.DeleteAsset.g.cs @@ -349,18 +349,17 @@ partial void ProcessDeleteAssetResponseContent( __exception_404 = __ex; } - throw new global::Krea.ApiException( + + throw global::Krea.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -394,17 +393,15 @@ partial void ProcessDeleteAssetResponseContent( } catch (global::System.Exception __ex) { - throw new global::Krea.ApiException( + throw global::Krea.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 @@ -441,17 +438,15 @@ partial void ProcessDeleteAssetResponseContent( { } - throw new global::Krea.ApiException( + throw global::Krea.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/Krea/Generated/Krea.AssetsClient.GetAsset.g.cs b/src/libs/Krea/Generated/Krea.AssetsClient.GetAsset.g.cs index cc4cd84..841fe6c 100644 --- a/src/libs/Krea/Generated/Krea.AssetsClient.GetAsset.g.cs +++ b/src/libs/Krea/Generated/Krea.AssetsClient.GetAsset.g.cs @@ -349,18 +349,17 @@ partial void ProcessGetAssetResponseContent( __exception_404 = __ex; } - throw new global::Krea.ApiException( + + throw global::Krea.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -394,17 +393,15 @@ partial void ProcessGetAssetResponseContent( } catch (global::System.Exception __ex) { - throw new global::Krea.ApiException( + throw global::Krea.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 @@ -441,17 +438,15 @@ partial void ProcessGetAssetResponseContent( { } - throw new global::Krea.ApiException( + throw global::Krea.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/Krea/Generated/Krea.AssetsClient.ListAssets.g.cs b/src/libs/Krea/Generated/Krea.AssetsClient.ListAssets.g.cs index d48fdd7..bb54f81 100644 --- a/src/libs/Krea/Generated/Krea.AssetsClient.ListAssets.g.cs +++ b/src/libs/Krea/Generated/Krea.AssetsClient.ListAssets.g.cs @@ -366,18 +366,17 @@ partial void ProcessListAssetsResponseContent( __exception_401 = __ex; } - throw new global::Krea.ApiException( + + throw global::Krea.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) @@ -411,17 +410,15 @@ partial void ProcessListAssetsResponseContent( } catch (global::System.Exception __ex) { - throw new global::Krea.ApiException( + throw global::Krea.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 @@ -458,17 +455,15 @@ partial void ProcessListAssetsResponseContent( { } - throw new global::Krea.ApiException( + throw global::Krea.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/Krea/Generated/Krea.AssetsClient.UploadAsset.g.cs b/src/libs/Krea/Generated/Krea.AssetsClient.UploadAsset.g.cs index e9997fc..ff6a3e5 100644 --- a/src/libs/Krea/Generated/Krea.AssetsClient.UploadAsset.g.cs +++ b/src/libs/Krea/Generated/Krea.AssetsClient.UploadAsset.g.cs @@ -411,18 +411,17 @@ request.Filename is null __exception_400 = __ex; } - throw new global::Krea.ApiException( + + throw global::Krea.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) @@ -449,18 +448,17 @@ request.Filename is null __exception_401 = __ex; } - throw new global::Krea.ApiException( + + throw global::Krea.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) @@ -494,17 +492,15 @@ request.Filename is null } catch (global::System.Exception __ex) { - throw new global::Krea.ApiException( + throw global::Krea.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 @@ -541,17 +537,15 @@ request.Filename is null { } - throw new global::Krea.ApiException( + throw global::Krea.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.Filename is null __exception_400 = __ex; } - throw new global::Krea.ApiException( + + throw global::Krea.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) @@ -998,18 +991,17 @@ request.Filename is null __exception_401 = __ex; } - throw new global::Krea.ApiException( + + throw global::Krea.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.Filename is null } catch (global::System.Exception __ex) { - throw new global::Krea.ApiException( + throw global::Krea.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.Filename is null { } - throw new global::Krea.ApiException( + throw global::Krea.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)); } } @@ -1463,18 +1451,17 @@ request.Filename is null __exception_400 = __ex; } - throw new global::Krea.ApiException( + + throw global::Krea.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) @@ -1501,18 +1488,17 @@ request.Filename is null __exception_401 = __ex; } - throw new global::Krea.ApiException( + + throw global::Krea.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) @@ -1546,17 +1532,15 @@ request.Filename is null } catch (global::System.Exception __ex) { - throw new global::Krea.ApiException( + throw global::Krea.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 @@ -1593,17 +1577,15 @@ request.Filename is null { } - throw new global::Krea.ApiException( + throw global::Krea.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/Krea/Generated/Krea.EnhanceClient.EnhanceTopazBloom.g.cs b/src/libs/Krea/Generated/Krea.EnhanceClient.EnhanceTopazBloom.g.cs index b0f2596..bc733c3 100644 --- a/src/libs/Krea/Generated/Krea.EnhanceClient.EnhanceTopazBloom.g.cs +++ b/src/libs/Krea/Generated/Krea.EnhanceClient.EnhanceTopazBloom.g.cs @@ -367,17 +367,15 @@ partial void ProcessEnhanceTopazBloomResponseContent( } catch (global::System.Exception __ex) { - throw new global::Krea.ApiException( + throw global::Krea.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 @@ -414,17 +412,15 @@ partial void ProcessEnhanceTopazBloomResponseContent( { } - throw new global::Krea.ApiException( + throw global::Krea.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/Krea/Generated/Krea.EnhanceClient.EnhanceTopazGenerative.g.cs b/src/libs/Krea/Generated/Krea.EnhanceClient.EnhanceTopazGenerative.g.cs index de423fb..13d3012 100644 --- a/src/libs/Krea/Generated/Krea.EnhanceClient.EnhanceTopazGenerative.g.cs +++ b/src/libs/Krea/Generated/Krea.EnhanceClient.EnhanceTopazGenerative.g.cs @@ -367,17 +367,15 @@ partial void ProcessEnhanceTopazGenerativeResponseContent( } catch (global::System.Exception __ex) { - throw new global::Krea.ApiException( + throw global::Krea.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 @@ -414,17 +412,15 @@ partial void ProcessEnhanceTopazGenerativeResponseContent( { } - throw new global::Krea.ApiException( + throw global::Krea.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/Krea/Generated/Krea.EnhanceClient.EnhanceTopazStandard.g.cs b/src/libs/Krea/Generated/Krea.EnhanceClient.EnhanceTopazStandard.g.cs index 1309239..b1009a7 100644 --- a/src/libs/Krea/Generated/Krea.EnhanceClient.EnhanceTopazStandard.g.cs +++ b/src/libs/Krea/Generated/Krea.EnhanceClient.EnhanceTopazStandard.g.cs @@ -367,17 +367,15 @@ partial void ProcessEnhanceTopazStandardResponseContent( } catch (global::System.Exception __ex) { - throw new global::Krea.ApiException( + throw global::Krea.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 @@ -414,17 +412,15 @@ partial void ProcessEnhanceTopazStandardResponseContent( { } - throw new global::Krea.ApiException( + throw global::Krea.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/Krea/Generated/Krea.Exceptions.g.cs b/src/libs/Krea/Generated/Krea.Exceptions.g.cs index 3e3cd70..1739b7b 100644 --- a/src/libs/Krea/Generated/Krea.Exceptions.g.cs +++ b/src/libs/Krea/Generated/Krea.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::Krea.ApiException Create( + global::System.Net.HttpStatusCode statusCode, + string message, + global::System.Exception? innerException = null, + global::System.Collections.Generic.IDictionary>? responseHeaders = null) + { + return new global::Krea.ApiException(message, innerException, statusCode); + } + + /// + /// Convenience overload that constructs an with response body and headers populated. + /// + public static global::Krea.ApiException Create( + global::System.Net.HttpStatusCode statusCode, + string message, + global::System.Exception? innerException, + string? responseBody, + global::System.Collections.Generic.Dictionary>? responseHeaders) + { + var exception = global::Krea.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::Krea.ApiException Create( + global::System.Net.HttpStatusCode statusCode, + string message, + global::System.Exception? innerException = null, + global::System.Collections.Generic.IDictionary>? responseHeaders = null) + { + return new global::Krea.ApiException(message, innerException, statusCode); + } + + /// + /// Convenience overload that constructs an with response body, object, and headers populated. + /// + public static global::Krea.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::Krea.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/Krea/Generated/Krea.ImageClient.GenerateChatGptImage.g.cs b/src/libs/Krea/Generated/Krea.ImageClient.GenerateChatGptImage.g.cs index fa66ff3..2e8c5e4 100644 --- a/src/libs/Krea/Generated/Krea.ImageClient.GenerateChatGptImage.g.cs +++ b/src/libs/Krea/Generated/Krea.ImageClient.GenerateChatGptImage.g.cs @@ -367,17 +367,15 @@ partial void ProcessGenerateChatGptImageResponseContent( } catch (global::System.Exception __ex) { - throw new global::Krea.ApiException( + throw global::Krea.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 @@ -414,17 +412,15 @@ partial void ProcessGenerateChatGptImageResponseContent( { } - throw new global::Krea.ApiException( + throw global::Krea.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/Krea/Generated/Krea.ImageClient.GenerateFlux.g.cs b/src/libs/Krea/Generated/Krea.ImageClient.GenerateFlux.g.cs index dd3fd84..71ecdab 100644 --- a/src/libs/Krea/Generated/Krea.ImageClient.GenerateFlux.g.cs +++ b/src/libs/Krea/Generated/Krea.ImageClient.GenerateFlux.g.cs @@ -367,17 +367,15 @@ partial void ProcessGenerateFluxResponseContent( } catch (global::System.Exception __ex) { - throw new global::Krea.ApiException( + throw global::Krea.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 @@ -414,17 +412,15 @@ partial void ProcessGenerateFluxResponseContent( { } - throw new global::Krea.ApiException( + throw global::Krea.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/Krea/Generated/Krea.ImageClient.GenerateFlux11Pro.g.cs b/src/libs/Krea/Generated/Krea.ImageClient.GenerateFlux11Pro.g.cs index 04a0397..61697ef 100644 --- a/src/libs/Krea/Generated/Krea.ImageClient.GenerateFlux11Pro.g.cs +++ b/src/libs/Krea/Generated/Krea.ImageClient.GenerateFlux11Pro.g.cs @@ -382,17 +382,15 @@ partial void ProcessGenerateFlux11ProResponseContent( } catch (global::System.Exception __ex) { - throw new global::Krea.ApiException( + throw global::Krea.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 @@ -429,17 +427,15 @@ partial void ProcessGenerateFlux11ProResponseContent( { } - throw new global::Krea.ApiException( + throw global::Krea.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/Krea/Generated/Krea.ImageClient.GenerateFlux11ProUltra.g.cs b/src/libs/Krea/Generated/Krea.ImageClient.GenerateFlux11ProUltra.g.cs index 7ccfec7..eeffa51 100644 --- a/src/libs/Krea/Generated/Krea.ImageClient.GenerateFlux11ProUltra.g.cs +++ b/src/libs/Krea/Generated/Krea.ImageClient.GenerateFlux11ProUltra.g.cs @@ -367,17 +367,15 @@ partial void ProcessGenerateFlux11ProUltraResponseContent( } catch (global::System.Exception __ex) { - throw new global::Krea.ApiException( + throw global::Krea.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 @@ -414,17 +412,15 @@ partial void ProcessGenerateFlux11ProUltraResponseContent( { } - throw new global::Krea.ApiException( + throw global::Krea.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/Krea/Generated/Krea.ImageClient.GenerateFluxKontext.g.cs b/src/libs/Krea/Generated/Krea.ImageClient.GenerateFluxKontext.g.cs index 0535bc4..811bbba 100644 --- a/src/libs/Krea/Generated/Krea.ImageClient.GenerateFluxKontext.g.cs +++ b/src/libs/Krea/Generated/Krea.ImageClient.GenerateFluxKontext.g.cs @@ -369,17 +369,15 @@ partial void ProcessGenerateFluxKontextResponseContent( } catch (global::System.Exception __ex) { - throw new global::Krea.ApiException( + throw global::Krea.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 @@ -416,17 +414,15 @@ partial void ProcessGenerateFluxKontextResponseContent( { } - throw new global::Krea.ApiException( + throw global::Krea.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/Krea/Generated/Krea.ImageClient.GenerateIdeogram2Turbo.g.cs b/src/libs/Krea/Generated/Krea.ImageClient.GenerateIdeogram2Turbo.g.cs index 2532478..df673f1 100644 --- a/src/libs/Krea/Generated/Krea.ImageClient.GenerateIdeogram2Turbo.g.cs +++ b/src/libs/Krea/Generated/Krea.ImageClient.GenerateIdeogram2Turbo.g.cs @@ -367,17 +367,15 @@ partial void ProcessGenerateIdeogram2TurboResponseContent( } catch (global::System.Exception __ex) { - throw new global::Krea.ApiException( + throw global::Krea.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 @@ -414,17 +412,15 @@ partial void ProcessGenerateIdeogram2TurboResponseContent( { } - throw new global::Krea.ApiException( + throw global::Krea.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/Krea/Generated/Krea.ImageClient.GenerateIdeogram3.g.cs b/src/libs/Krea/Generated/Krea.ImageClient.GenerateIdeogram3.g.cs index f6b4e43..399760f 100644 --- a/src/libs/Krea/Generated/Krea.ImageClient.GenerateIdeogram3.g.cs +++ b/src/libs/Krea/Generated/Krea.ImageClient.GenerateIdeogram3.g.cs @@ -367,17 +367,15 @@ partial void ProcessGenerateIdeogram3ResponseContent( } catch (global::System.Exception __ex) { - throw new global::Krea.ApiException( + throw global::Krea.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 @@ -414,17 +412,15 @@ partial void ProcessGenerateIdeogram3ResponseContent( { } - throw new global::Krea.ApiException( + throw global::Krea.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/Krea/Generated/Krea.ImageClient.GenerateImagen3.g.cs b/src/libs/Krea/Generated/Krea.ImageClient.GenerateImagen3.g.cs index ea94a0a..6727090 100644 --- a/src/libs/Krea/Generated/Krea.ImageClient.GenerateImagen3.g.cs +++ b/src/libs/Krea/Generated/Krea.ImageClient.GenerateImagen3.g.cs @@ -367,17 +367,15 @@ partial void ProcessGenerateImagen3ResponseContent( } catch (global::System.Exception __ex) { - throw new global::Krea.ApiException( + throw global::Krea.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 @@ -414,17 +412,15 @@ partial void ProcessGenerateImagen3ResponseContent( { } - throw new global::Krea.ApiException( + throw global::Krea.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/Krea/Generated/Krea.ImageClient.GenerateImagen4.g.cs b/src/libs/Krea/Generated/Krea.ImageClient.GenerateImagen4.g.cs index 74cdcbc..26e1844 100644 --- a/src/libs/Krea/Generated/Krea.ImageClient.GenerateImagen4.g.cs +++ b/src/libs/Krea/Generated/Krea.ImageClient.GenerateImagen4.g.cs @@ -367,17 +367,15 @@ partial void ProcessGenerateImagen4ResponseContent( } catch (global::System.Exception __ex) { - throw new global::Krea.ApiException( + throw global::Krea.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 @@ -414,17 +412,15 @@ partial void ProcessGenerateImagen4ResponseContent( { } - throw new global::Krea.ApiException( + throw global::Krea.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/Krea/Generated/Krea.ImageClient.GenerateImagen4Fast.g.cs b/src/libs/Krea/Generated/Krea.ImageClient.GenerateImagen4Fast.g.cs index a8f9814..d593cda 100644 --- a/src/libs/Krea/Generated/Krea.ImageClient.GenerateImagen4Fast.g.cs +++ b/src/libs/Krea/Generated/Krea.ImageClient.GenerateImagen4Fast.g.cs @@ -367,17 +367,15 @@ partial void ProcessGenerateImagen4FastResponseContent( } catch (global::System.Exception __ex) { - throw new global::Krea.ApiException( + throw global::Krea.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 @@ -414,17 +412,15 @@ partial void ProcessGenerateImagen4FastResponseContent( { } - throw new global::Krea.ApiException( + throw global::Krea.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/Krea/Generated/Krea.ImageClient.GenerateImagen4Ultra.g.cs b/src/libs/Krea/Generated/Krea.ImageClient.GenerateImagen4Ultra.g.cs index 4b72fe3..9751cb1 100644 --- a/src/libs/Krea/Generated/Krea.ImageClient.GenerateImagen4Ultra.g.cs +++ b/src/libs/Krea/Generated/Krea.ImageClient.GenerateImagen4Ultra.g.cs @@ -367,17 +367,15 @@ partial void ProcessGenerateImagen4UltraResponseContent( } catch (global::System.Exception __ex) { - throw new global::Krea.ApiException( + throw global::Krea.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 @@ -414,17 +412,15 @@ partial void ProcessGenerateImagen4UltraResponseContent( { } - throw new global::Krea.ApiException( + throw global::Krea.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/Krea/Generated/Krea.ImageClient.GenerateNanoBanana.g.cs b/src/libs/Krea/Generated/Krea.ImageClient.GenerateNanoBanana.g.cs index 231585d..7076a2b 100644 --- a/src/libs/Krea/Generated/Krea.ImageClient.GenerateNanoBanana.g.cs +++ b/src/libs/Krea/Generated/Krea.ImageClient.GenerateNanoBanana.g.cs @@ -367,17 +367,15 @@ partial void ProcessGenerateNanoBananaResponseContent( } catch (global::System.Exception __ex) { - throw new global::Krea.ApiException( + throw global::Krea.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 @@ -414,17 +412,15 @@ partial void ProcessGenerateNanoBananaResponseContent( { } - throw new global::Krea.ApiException( + throw global::Krea.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/Krea/Generated/Krea.ImageClient.GenerateNanoBanana2.g.cs b/src/libs/Krea/Generated/Krea.ImageClient.GenerateNanoBanana2.g.cs index 529fe1c..14bff3f 100644 --- a/src/libs/Krea/Generated/Krea.ImageClient.GenerateNanoBanana2.g.cs +++ b/src/libs/Krea/Generated/Krea.ImageClient.GenerateNanoBanana2.g.cs @@ -367,17 +367,15 @@ partial void ProcessGenerateNanoBanana2ResponseContent( } catch (global::System.Exception __ex) { - throw new global::Krea.ApiException( + throw global::Krea.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 @@ -414,17 +412,15 @@ partial void ProcessGenerateNanoBanana2ResponseContent( { } - throw new global::Krea.ApiException( + throw global::Krea.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/Krea/Generated/Krea.ImageClient.GenerateNanoBananaPro.g.cs b/src/libs/Krea/Generated/Krea.ImageClient.GenerateNanoBananaPro.g.cs index 84f56d6..62bbe51 100644 --- a/src/libs/Krea/Generated/Krea.ImageClient.GenerateNanoBananaPro.g.cs +++ b/src/libs/Krea/Generated/Krea.ImageClient.GenerateNanoBananaPro.g.cs @@ -367,17 +367,15 @@ partial void ProcessGenerateNanoBananaProResponseContent( } catch (global::System.Exception __ex) { - throw new global::Krea.ApiException( + throw global::Krea.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 @@ -414,17 +412,15 @@ partial void ProcessGenerateNanoBananaProResponseContent( { } - throw new global::Krea.ApiException( + throw global::Krea.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/Krea/Generated/Krea.ImageClient.GenerateQwen2512.g.cs b/src/libs/Krea/Generated/Krea.ImageClient.GenerateQwen2512.g.cs index 1710e6f..aebda98 100644 --- a/src/libs/Krea/Generated/Krea.ImageClient.GenerateQwen2512.g.cs +++ b/src/libs/Krea/Generated/Krea.ImageClient.GenerateQwen2512.g.cs @@ -367,17 +367,15 @@ partial void ProcessGenerateQwen2512ResponseContent( } catch (global::System.Exception __ex) { - throw new global::Krea.ApiException( + throw global::Krea.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 @@ -414,17 +412,15 @@ partial void ProcessGenerateQwen2512ResponseContent( { } - throw new global::Krea.ApiException( + throw global::Krea.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/Krea/Generated/Krea.ImageClient.GenerateRunwayGen4Image.g.cs b/src/libs/Krea/Generated/Krea.ImageClient.GenerateRunwayGen4Image.g.cs index 9e6415f..c165040 100644 --- a/src/libs/Krea/Generated/Krea.ImageClient.GenerateRunwayGen4Image.g.cs +++ b/src/libs/Krea/Generated/Krea.ImageClient.GenerateRunwayGen4Image.g.cs @@ -367,17 +367,15 @@ partial void ProcessGenerateRunwayGen4ImageResponseContent( } catch (global::System.Exception __ex) { - throw new global::Krea.ApiException( + throw global::Krea.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 @@ -414,17 +412,15 @@ partial void ProcessGenerateRunwayGen4ImageResponseContent( { } - throw new global::Krea.ApiException( + throw global::Krea.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/Krea/Generated/Krea.ImageClient.GenerateSeedEdit.g.cs b/src/libs/Krea/Generated/Krea.ImageClient.GenerateSeedEdit.g.cs index 80b4ea2..dcbaf4a 100644 --- a/src/libs/Krea/Generated/Krea.ImageClient.GenerateSeedEdit.g.cs +++ b/src/libs/Krea/Generated/Krea.ImageClient.GenerateSeedEdit.g.cs @@ -367,17 +367,15 @@ partial void ProcessGenerateSeedEditResponseContent( } catch (global::System.Exception __ex) { - throw new global::Krea.ApiException( + throw global::Krea.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 @@ -414,17 +412,15 @@ partial void ProcessGenerateSeedEditResponseContent( { } - throw new global::Krea.ApiException( + throw global::Krea.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/Krea/Generated/Krea.ImageClient.GenerateSeedream3.g.cs b/src/libs/Krea/Generated/Krea.ImageClient.GenerateSeedream3.g.cs index 524c226..ffacfed 100644 --- a/src/libs/Krea/Generated/Krea.ImageClient.GenerateSeedream3.g.cs +++ b/src/libs/Krea/Generated/Krea.ImageClient.GenerateSeedream3.g.cs @@ -367,17 +367,15 @@ partial void ProcessGenerateSeedream3ResponseContent( } catch (global::System.Exception __ex) { - throw new global::Krea.ApiException( + throw global::Krea.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 @@ -414,17 +412,15 @@ partial void ProcessGenerateSeedream3ResponseContent( { } - throw new global::Krea.ApiException( + throw global::Krea.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/Krea/Generated/Krea.ImageClient.GenerateSeedream4.g.cs b/src/libs/Krea/Generated/Krea.ImageClient.GenerateSeedream4.g.cs index 1022170..03cdc39 100644 --- a/src/libs/Krea/Generated/Krea.ImageClient.GenerateSeedream4.g.cs +++ b/src/libs/Krea/Generated/Krea.ImageClient.GenerateSeedream4.g.cs @@ -367,17 +367,15 @@ partial void ProcessGenerateSeedream4ResponseContent( } catch (global::System.Exception __ex) { - throw new global::Krea.ApiException( + throw global::Krea.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 @@ -414,17 +412,15 @@ partial void ProcessGenerateSeedream4ResponseContent( { } - throw new global::Krea.ApiException( + throw global::Krea.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/Krea/Generated/Krea.ImageClient.GenerateSeedream5Lite.g.cs b/src/libs/Krea/Generated/Krea.ImageClient.GenerateSeedream5Lite.g.cs index 0d0019b..5cd270b 100644 --- a/src/libs/Krea/Generated/Krea.ImageClient.GenerateSeedream5Lite.g.cs +++ b/src/libs/Krea/Generated/Krea.ImageClient.GenerateSeedream5Lite.g.cs @@ -367,17 +367,15 @@ partial void ProcessGenerateSeedream5LiteResponseContent( } catch (global::System.Exception __ex) { - throw new global::Krea.ApiException( + throw global::Krea.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 @@ -414,17 +412,15 @@ partial void ProcessGenerateSeedream5LiteResponseContent( { } - throw new global::Krea.ApiException( + throw global::Krea.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/Krea/Generated/Krea.ImageClient.GenerateZImage.g.cs b/src/libs/Krea/Generated/Krea.ImageClient.GenerateZImage.g.cs index c812598..ac5c8d7 100644 --- a/src/libs/Krea/Generated/Krea.ImageClient.GenerateZImage.g.cs +++ b/src/libs/Krea/Generated/Krea.ImageClient.GenerateZImage.g.cs @@ -367,17 +367,15 @@ partial void ProcessGenerateZImageResponseContent( } catch (global::System.Exception __ex) { - throw new global::Krea.ApiException( + throw global::Krea.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 @@ -414,17 +412,15 @@ partial void ProcessGenerateZImageResponseContent( { } - throw new global::Krea.ApiException( + throw global::Krea.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/Krea/Generated/Krea.JobsClient.DeleteJob.g.cs b/src/libs/Krea/Generated/Krea.JobsClient.DeleteJob.g.cs index 0081e8b..3d9b3c5 100644 --- a/src/libs/Krea/Generated/Krea.JobsClient.DeleteJob.g.cs +++ b/src/libs/Krea/Generated/Krea.JobsClient.DeleteJob.g.cs @@ -344,18 +344,17 @@ await DeleteJobAsResponseAsync( __exception_404 = __ex; } - throw new global::Krea.ApiException( + + throw global::Krea.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -382,17 +381,15 @@ await DeleteJobAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Krea.ApiException( + throw global::Krea.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 @@ -420,17 +417,15 @@ await DeleteJobAsResponseAsync( { } - throw new global::Krea.ApiException( + throw global::Krea.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/Krea/Generated/Krea.JobsClient.GetJob.g.cs b/src/libs/Krea/Generated/Krea.JobsClient.GetJob.g.cs index e3c8dd4..9a84be1 100644 --- a/src/libs/Krea/Generated/Krea.JobsClient.GetJob.g.cs +++ b/src/libs/Krea/Generated/Krea.JobsClient.GetJob.g.cs @@ -351,18 +351,17 @@ partial void ProcessGetJobResponseContent( __exception_404 = __ex; } - throw new global::Krea.ApiException( + + throw global::Krea.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -396,17 +395,15 @@ partial void ProcessGetJobResponseContent( } catch (global::System.Exception __ex) { - throw new global::Krea.ApiException( + throw global::Krea.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 @@ -443,17 +440,15 @@ partial void ProcessGetJobResponseContent( { } - throw new global::Krea.ApiException( + throw global::Krea.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/Krea/Generated/Krea.JobsClient.ListJobs.g.cs b/src/libs/Krea/Generated/Krea.JobsClient.ListJobs.g.cs index c947711..1055a9d 100644 --- a/src/libs/Krea/Generated/Krea.JobsClient.ListJobs.g.cs +++ b/src/libs/Krea/Generated/Krea.JobsClient.ListJobs.g.cs @@ -392,18 +392,17 @@ partial void ProcessListJobsResponseContent( __exception_401 = __ex; } - throw new global::Krea.ApiException( + + throw global::Krea.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) @@ -437,17 +436,15 @@ partial void ProcessListJobsResponseContent( } catch (global::System.Exception __ex) { - throw new global::Krea.ApiException( + throw global::Krea.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 @@ -484,17 +481,15 @@ partial void ProcessListJobsResponseContent( { } - throw new global::Krea.ApiException( + throw global::Krea.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/Krea/Generated/Krea.NodeAppsClient.ExecuteNodeApp.g.cs b/src/libs/Krea/Generated/Krea.NodeAppsClient.ExecuteNodeApp.g.cs index b802aa9..a08ecf2 100644 --- a/src/libs/Krea/Generated/Krea.NodeAppsClient.ExecuteNodeApp.g.cs +++ b/src/libs/Krea/Generated/Krea.NodeAppsClient.ExecuteNodeApp.g.cs @@ -378,17 +378,15 @@ partial void ProcessExecuteNodeAppResponseContent( } catch (global::System.Exception __ex) { - throw new global::Krea.ApiException( + throw global::Krea.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 @@ -425,17 +423,15 @@ partial void ProcessExecuteNodeAppResponseContent( { } - throw new global::Krea.ApiException( + throw global::Krea.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/Krea/Generated/Krea.NodeAppsClient.GetNodeApp.g.cs b/src/libs/Krea/Generated/Krea.NodeAppsClient.GetNodeApp.g.cs index 6412190..907fdcc 100644 --- a/src/libs/Krea/Generated/Krea.NodeAppsClient.GetNodeApp.g.cs +++ b/src/libs/Krea/Generated/Krea.NodeAppsClient.GetNodeApp.g.cs @@ -356,17 +356,15 @@ partial void ProcessGetNodeAppResponseContent( } catch (global::System.Exception __ex) { - throw new global::Krea.ApiException( + throw global::Krea.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 @@ -403,17 +401,15 @@ partial void ProcessGetNodeAppResponseContent( { } - throw new global::Krea.ApiException( + throw global::Krea.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/Krea/Generated/Krea.StylesClient.GetStyle.g.cs b/src/libs/Krea/Generated/Krea.StylesClient.GetStyle.g.cs index 8b8dd07..6bfd42a 100644 --- a/src/libs/Krea/Generated/Krea.StylesClient.GetStyle.g.cs +++ b/src/libs/Krea/Generated/Krea.StylesClient.GetStyle.g.cs @@ -356,17 +356,15 @@ partial void ProcessGetStyleResponseContent( } catch (global::System.Exception __ex) { - throw new global::Krea.ApiException( + throw global::Krea.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 @@ -403,17 +401,15 @@ partial void ProcessGetStyleResponseContent( { } - throw new global::Krea.ApiException( + throw global::Krea.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/Krea/Generated/Krea.StylesClient.GetStyleShareLink.g.cs b/src/libs/Krea/Generated/Krea.StylesClient.GetStyleShareLink.g.cs index 096e37e..1d9a113 100644 --- a/src/libs/Krea/Generated/Krea.StylesClient.GetStyleShareLink.g.cs +++ b/src/libs/Krea/Generated/Krea.StylesClient.GetStyleShareLink.g.cs @@ -356,17 +356,15 @@ partial void ProcessGetStyleShareLinkResponseContent( } catch (global::System.Exception __ex) { - throw new global::Krea.ApiException( + throw global::Krea.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 @@ -403,17 +401,15 @@ partial void ProcessGetStyleShareLinkResponseContent( { } - throw new global::Krea.ApiException( + throw global::Krea.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/Krea/Generated/Krea.StylesClient.ListStyles.g.cs b/src/libs/Krea/Generated/Krea.StylesClient.ListStyles.g.cs index 28f31b0..fedfea9 100644 --- a/src/libs/Krea/Generated/Krea.StylesClient.ListStyles.g.cs +++ b/src/libs/Krea/Generated/Krea.StylesClient.ListStyles.g.cs @@ -383,17 +383,15 @@ partial void ProcessListStylesResponseContent( } catch (global::System.Exception __ex) { - throw new global::Krea.ApiException( + throw global::Krea.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 @@ -430,17 +428,15 @@ partial void ProcessListStylesResponseContent( { } - throw new global::Krea.ApiException( + throw global::Krea.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/Krea/Generated/Krea.StylesClient.ShareStyleWithWorkspace.g.cs b/src/libs/Krea/Generated/Krea.StylesClient.ShareStyleWithWorkspace.g.cs index 6456e89..4d66417 100644 --- a/src/libs/Krea/Generated/Krea.StylesClient.ShareStyleWithWorkspace.g.cs +++ b/src/libs/Krea/Generated/Krea.StylesClient.ShareStyleWithWorkspace.g.cs @@ -356,17 +356,15 @@ partial void ProcessShareStyleWithWorkspaceResponseContent( } catch (global::System.Exception __ex) { - throw new global::Krea.ApiException( + throw global::Krea.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 @@ -403,17 +401,15 @@ partial void ProcessShareStyleWithWorkspaceResponseContent( { } - throw new global::Krea.ApiException( + throw global::Krea.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/Krea/Generated/Krea.StylesClient.TrainStyle.g.cs b/src/libs/Krea/Generated/Krea.StylesClient.TrainStyle.g.cs index a65e9f5..9101c88 100644 --- a/src/libs/Krea/Generated/Krea.StylesClient.TrainStyle.g.cs +++ b/src/libs/Krea/Generated/Krea.StylesClient.TrainStyle.g.cs @@ -367,17 +367,15 @@ partial void ProcessTrainStyleResponseContent( } catch (global::System.Exception __ex) { - throw new global::Krea.ApiException( + throw global::Krea.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 @@ -414,17 +412,15 @@ partial void ProcessTrainStyleResponseContent( { } - throw new global::Krea.ApiException( + throw global::Krea.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/Krea/Generated/Krea.StylesClient.UnshareStyleFromWorkspace.g.cs b/src/libs/Krea/Generated/Krea.StylesClient.UnshareStyleFromWorkspace.g.cs index 6c8f314..0bda147 100644 --- a/src/libs/Krea/Generated/Krea.StylesClient.UnshareStyleFromWorkspace.g.cs +++ b/src/libs/Krea/Generated/Krea.StylesClient.UnshareStyleFromWorkspace.g.cs @@ -356,17 +356,15 @@ partial void ProcessUnshareStyleFromWorkspaceResponseContent( } catch (global::System.Exception __ex) { - throw new global::Krea.ApiException( + throw global::Krea.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 @@ -403,17 +401,15 @@ partial void ProcessUnshareStyleFromWorkspaceResponseContent( { } - throw new global::Krea.ApiException( + throw global::Krea.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/Krea/Generated/Krea.StylesClient.UpdateStyle.g.cs b/src/libs/Krea/Generated/Krea.StylesClient.UpdateStyle.g.cs index 20af458..5641a0c 100644 --- a/src/libs/Krea/Generated/Krea.StylesClient.UpdateStyle.g.cs +++ b/src/libs/Krea/Generated/Krea.StylesClient.UpdateStyle.g.cs @@ -376,17 +376,15 @@ partial void ProcessUpdateStyleResponseContent( } catch (global::System.Exception __ex) { - throw new global::Krea.ApiException( + throw global::Krea.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 @@ -423,17 +421,15 @@ partial void ProcessUpdateStyleResponseContent( { } - throw new global::Krea.ApiException( + throw global::Krea.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/Krea/Generated/Krea.VideoClient.GenerateHailuo.g.cs b/src/libs/Krea/Generated/Krea.VideoClient.GenerateHailuo.g.cs index a3dca2f..9baff9e 100644 --- a/src/libs/Krea/Generated/Krea.VideoClient.GenerateHailuo.g.cs +++ b/src/libs/Krea/Generated/Krea.VideoClient.GenerateHailuo.g.cs @@ -367,17 +367,15 @@ partial void ProcessGenerateHailuoResponseContent( } catch (global::System.Exception __ex) { - throw new global::Krea.ApiException( + throw global::Krea.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 @@ -414,17 +412,15 @@ partial void ProcessGenerateHailuoResponseContent( { } - throw new global::Krea.ApiException( + throw global::Krea.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/Krea/Generated/Krea.VideoClient.GenerateHailuo02.g.cs b/src/libs/Krea/Generated/Krea.VideoClient.GenerateHailuo02.g.cs index b51df43..23c1cf7 100644 --- a/src/libs/Krea/Generated/Krea.VideoClient.GenerateHailuo02.g.cs +++ b/src/libs/Krea/Generated/Krea.VideoClient.GenerateHailuo02.g.cs @@ -367,17 +367,15 @@ partial void ProcessGenerateHailuo02ResponseContent( } catch (global::System.Exception __ex) { - throw new global::Krea.ApiException( + throw global::Krea.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 @@ -414,17 +412,15 @@ partial void ProcessGenerateHailuo02ResponseContent( { } - throw new global::Krea.ApiException( + throw global::Krea.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/Krea/Generated/Krea.VideoClient.GenerateHailuo23.g.cs b/src/libs/Krea/Generated/Krea.VideoClient.GenerateHailuo23.g.cs index f5a175f..a7f764e 100644 --- a/src/libs/Krea/Generated/Krea.VideoClient.GenerateHailuo23.g.cs +++ b/src/libs/Krea/Generated/Krea.VideoClient.GenerateHailuo23.g.cs @@ -367,17 +367,15 @@ partial void ProcessGenerateHailuo23ResponseContent( } catch (global::System.Exception __ex) { - throw new global::Krea.ApiException( + throw global::Krea.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 @@ -414,17 +412,15 @@ partial void ProcessGenerateHailuo23ResponseContent( { } - throw new global::Krea.ApiException( + throw global::Krea.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/Krea/Generated/Krea.VideoClient.GenerateHailuo23Fast.g.cs b/src/libs/Krea/Generated/Krea.VideoClient.GenerateHailuo23Fast.g.cs index b5bc468..8ccf6c9 100644 --- a/src/libs/Krea/Generated/Krea.VideoClient.GenerateHailuo23Fast.g.cs +++ b/src/libs/Krea/Generated/Krea.VideoClient.GenerateHailuo23Fast.g.cs @@ -367,17 +367,15 @@ partial void ProcessGenerateHailuo23FastResponseContent( } catch (global::System.Exception __ex) { - throw new global::Krea.ApiException( + throw global::Krea.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 @@ -414,17 +412,15 @@ partial void ProcessGenerateHailuo23FastResponseContent( { } - throw new global::Krea.ApiException( + throw global::Krea.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/Krea/Generated/Krea.VideoClient.GenerateKling1.g.cs b/src/libs/Krea/Generated/Krea.VideoClient.GenerateKling1.g.cs index a45a645..e8ca113 100644 --- a/src/libs/Krea/Generated/Krea.VideoClient.GenerateKling1.g.cs +++ b/src/libs/Krea/Generated/Krea.VideoClient.GenerateKling1.g.cs @@ -367,17 +367,15 @@ partial void ProcessGenerateKling1ResponseContent( } catch (global::System.Exception __ex) { - throw new global::Krea.ApiException( + throw global::Krea.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 @@ -414,17 +412,15 @@ partial void ProcessGenerateKling1ResponseContent( { } - throw new global::Krea.ApiException( + throw global::Krea.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/Krea/Generated/Krea.VideoClient.GenerateKling15.g.cs b/src/libs/Krea/Generated/Krea.VideoClient.GenerateKling15.g.cs index d9e92b3..c011b96 100644 --- a/src/libs/Krea/Generated/Krea.VideoClient.GenerateKling15.g.cs +++ b/src/libs/Krea/Generated/Krea.VideoClient.GenerateKling15.g.cs @@ -367,17 +367,15 @@ partial void ProcessGenerateKling15ResponseContent( } catch (global::System.Exception __ex) { - throw new global::Krea.ApiException( + throw global::Krea.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 @@ -414,17 +412,15 @@ partial void ProcessGenerateKling15ResponseContent( { } - throw new global::Krea.ApiException( + throw global::Krea.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/Krea/Generated/Krea.VideoClient.GenerateKling16.g.cs b/src/libs/Krea/Generated/Krea.VideoClient.GenerateKling16.g.cs index 1080066..6a53ee1 100644 --- a/src/libs/Krea/Generated/Krea.VideoClient.GenerateKling16.g.cs +++ b/src/libs/Krea/Generated/Krea.VideoClient.GenerateKling16.g.cs @@ -367,17 +367,15 @@ partial void ProcessGenerateKling16ResponseContent( } catch (global::System.Exception __ex) { - throw new global::Krea.ApiException( + throw global::Krea.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 @@ -414,17 +412,15 @@ partial void ProcessGenerateKling16ResponseContent( { } - throw new global::Krea.ApiException( + throw global::Krea.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/Krea/Generated/Krea.VideoClient.GenerateKling2.g.cs b/src/libs/Krea/Generated/Krea.VideoClient.GenerateKling2.g.cs index 54fc890..3c60beb 100644 --- a/src/libs/Krea/Generated/Krea.VideoClient.GenerateKling2.g.cs +++ b/src/libs/Krea/Generated/Krea.VideoClient.GenerateKling2.g.cs @@ -367,17 +367,15 @@ partial void ProcessGenerateKling2ResponseContent( } catch (global::System.Exception __ex) { - throw new global::Krea.ApiException( + throw global::Krea.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 @@ -414,17 +412,15 @@ partial void ProcessGenerateKling2ResponseContent( { } - throw new global::Krea.ApiException( + throw global::Krea.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/Krea/Generated/Krea.VideoClient.GenerateKling21.g.cs b/src/libs/Krea/Generated/Krea.VideoClient.GenerateKling21.g.cs index 7f13b98..24c1acd 100644 --- a/src/libs/Krea/Generated/Krea.VideoClient.GenerateKling21.g.cs +++ b/src/libs/Krea/Generated/Krea.VideoClient.GenerateKling21.g.cs @@ -367,17 +367,15 @@ partial void ProcessGenerateKling21ResponseContent( } catch (global::System.Exception __ex) { - throw new global::Krea.ApiException( + throw global::Krea.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 @@ -414,17 +412,15 @@ partial void ProcessGenerateKling21ResponseContent( { } - throw new global::Krea.ApiException( + throw global::Krea.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/Krea/Generated/Krea.VideoClient.GenerateKling25.g.cs b/src/libs/Krea/Generated/Krea.VideoClient.GenerateKling25.g.cs index 57187f4..843e49b 100644 --- a/src/libs/Krea/Generated/Krea.VideoClient.GenerateKling25.g.cs +++ b/src/libs/Krea/Generated/Krea.VideoClient.GenerateKling25.g.cs @@ -367,17 +367,15 @@ partial void ProcessGenerateKling25ResponseContent( } catch (global::System.Exception __ex) { - throw new global::Krea.ApiException( + throw global::Krea.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 @@ -414,17 +412,15 @@ partial void ProcessGenerateKling25ResponseContent( { } - throw new global::Krea.ApiException( + throw global::Krea.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/Krea/Generated/Krea.VideoClient.GenerateKling26.g.cs b/src/libs/Krea/Generated/Krea.VideoClient.GenerateKling26.g.cs index 42610c5..f40175e 100644 --- a/src/libs/Krea/Generated/Krea.VideoClient.GenerateKling26.g.cs +++ b/src/libs/Krea/Generated/Krea.VideoClient.GenerateKling26.g.cs @@ -367,17 +367,15 @@ partial void ProcessGenerateKling26ResponseContent( } catch (global::System.Exception __ex) { - throw new global::Krea.ApiException( + throw global::Krea.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 @@ -414,17 +412,15 @@ partial void ProcessGenerateKling26ResponseContent( { } - throw new global::Krea.ApiException( + throw global::Krea.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/Krea/Generated/Krea.VideoClient.GenerateKlingO1.g.cs b/src/libs/Krea/Generated/Krea.VideoClient.GenerateKlingO1.g.cs index a98a077..eec9b65 100644 --- a/src/libs/Krea/Generated/Krea.VideoClient.GenerateKlingO1.g.cs +++ b/src/libs/Krea/Generated/Krea.VideoClient.GenerateKlingO1.g.cs @@ -367,17 +367,15 @@ partial void ProcessGenerateKlingO1ResponseContent( } catch (global::System.Exception __ex) { - throw new global::Krea.ApiException( + throw global::Krea.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 @@ -414,17 +412,15 @@ partial void ProcessGenerateKlingO1ResponseContent( { } - throw new global::Krea.ApiException( + throw global::Krea.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/Krea/Generated/Krea.VideoClient.GenerateRay2.g.cs b/src/libs/Krea/Generated/Krea.VideoClient.GenerateRay2.g.cs index 2c9a3cf..27ccf04 100644 --- a/src/libs/Krea/Generated/Krea.VideoClient.GenerateRay2.g.cs +++ b/src/libs/Krea/Generated/Krea.VideoClient.GenerateRay2.g.cs @@ -367,17 +367,15 @@ partial void ProcessGenerateRay2ResponseContent( } catch (global::System.Exception __ex) { - throw new global::Krea.ApiException( + throw global::Krea.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 @@ -414,17 +412,15 @@ partial void ProcessGenerateRay2ResponseContent( { } - throw new global::Krea.ApiException( + throw global::Krea.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/Krea/Generated/Krea.VideoClient.GenerateRunwayAleph.g.cs b/src/libs/Krea/Generated/Krea.VideoClient.GenerateRunwayAleph.g.cs index f4f3361..c5b0013 100644 --- a/src/libs/Krea/Generated/Krea.VideoClient.GenerateRunwayAleph.g.cs +++ b/src/libs/Krea/Generated/Krea.VideoClient.GenerateRunwayAleph.g.cs @@ -367,17 +367,15 @@ partial void ProcessGenerateRunwayAlephResponseContent( } catch (global::System.Exception __ex) { - throw new global::Krea.ApiException( + throw global::Krea.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 @@ -414,17 +412,15 @@ partial void ProcessGenerateRunwayAlephResponseContent( { } - throw new global::Krea.ApiException( + throw global::Krea.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/Krea/Generated/Krea.VideoClient.GenerateRunwayGen3.g.cs b/src/libs/Krea/Generated/Krea.VideoClient.GenerateRunwayGen3.g.cs index 68053cf..c5594f5 100644 --- a/src/libs/Krea/Generated/Krea.VideoClient.GenerateRunwayGen3.g.cs +++ b/src/libs/Krea/Generated/Krea.VideoClient.GenerateRunwayGen3.g.cs @@ -367,17 +367,15 @@ partial void ProcessGenerateRunwayGen3ResponseContent( } catch (global::System.Exception __ex) { - throw new global::Krea.ApiException( + throw global::Krea.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 @@ -414,17 +412,15 @@ partial void ProcessGenerateRunwayGen3ResponseContent( { } - throw new global::Krea.ApiException( + throw global::Krea.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/Krea/Generated/Krea.VideoClient.GenerateRunwayGen45.g.cs b/src/libs/Krea/Generated/Krea.VideoClient.GenerateRunwayGen45.g.cs index 78cf8cc..84f883b 100644 --- a/src/libs/Krea/Generated/Krea.VideoClient.GenerateRunwayGen45.g.cs +++ b/src/libs/Krea/Generated/Krea.VideoClient.GenerateRunwayGen45.g.cs @@ -367,17 +367,15 @@ partial void ProcessGenerateRunwayGen45ResponseContent( } catch (global::System.Exception __ex) { - throw new global::Krea.ApiException( + throw global::Krea.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 @@ -414,17 +412,15 @@ partial void ProcessGenerateRunwayGen45ResponseContent( { } - throw new global::Krea.ApiException( + throw global::Krea.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/Krea/Generated/Krea.VideoClient.GenerateRunwayGen4Video.g.cs b/src/libs/Krea/Generated/Krea.VideoClient.GenerateRunwayGen4Video.g.cs index c943527..5a5a661 100644 --- a/src/libs/Krea/Generated/Krea.VideoClient.GenerateRunwayGen4Video.g.cs +++ b/src/libs/Krea/Generated/Krea.VideoClient.GenerateRunwayGen4Video.g.cs @@ -367,17 +367,15 @@ partial void ProcessGenerateRunwayGen4VideoResponseContent( } catch (global::System.Exception __ex) { - throw new global::Krea.ApiException( + throw global::Krea.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 @@ -414,17 +412,15 @@ partial void ProcessGenerateRunwayGen4VideoResponseContent( { } - throw new global::Krea.ApiException( + throw global::Krea.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/Krea/Generated/Krea.VideoClient.GenerateSeedance2.g.cs b/src/libs/Krea/Generated/Krea.VideoClient.GenerateSeedance2.g.cs index 4a33435..16f0ee5 100644 --- a/src/libs/Krea/Generated/Krea.VideoClient.GenerateSeedance2.g.cs +++ b/src/libs/Krea/Generated/Krea.VideoClient.GenerateSeedance2.g.cs @@ -367,17 +367,15 @@ partial void ProcessGenerateSeedance2ResponseContent( } catch (global::System.Exception __ex) { - throw new global::Krea.ApiException( + throw global::Krea.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 @@ -414,17 +412,15 @@ partial void ProcessGenerateSeedance2ResponseContent( { } - throw new global::Krea.ApiException( + throw global::Krea.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/Krea/Generated/Krea.VideoClient.GenerateSeedance2Fast.g.cs b/src/libs/Krea/Generated/Krea.VideoClient.GenerateSeedance2Fast.g.cs index 5a67641..2938f1e 100644 --- a/src/libs/Krea/Generated/Krea.VideoClient.GenerateSeedance2Fast.g.cs +++ b/src/libs/Krea/Generated/Krea.VideoClient.GenerateSeedance2Fast.g.cs @@ -367,17 +367,15 @@ partial void ProcessGenerateSeedance2FastResponseContent( } catch (global::System.Exception __ex) { - throw new global::Krea.ApiException( + throw global::Krea.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 @@ -414,17 +412,15 @@ partial void ProcessGenerateSeedance2FastResponseContent( { } - throw new global::Krea.ApiException( + throw global::Krea.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/Krea/Generated/Krea.VideoClient.GenerateSeedanceLite.g.cs b/src/libs/Krea/Generated/Krea.VideoClient.GenerateSeedanceLite.g.cs index a6f7f70..40ac7ed 100644 --- a/src/libs/Krea/Generated/Krea.VideoClient.GenerateSeedanceLite.g.cs +++ b/src/libs/Krea/Generated/Krea.VideoClient.GenerateSeedanceLite.g.cs @@ -367,17 +367,15 @@ partial void ProcessGenerateSeedanceLiteResponseContent( } catch (global::System.Exception __ex) { - throw new global::Krea.ApiException( + throw global::Krea.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 @@ -414,17 +412,15 @@ partial void ProcessGenerateSeedanceLiteResponseContent( { } - throw new global::Krea.ApiException( + throw global::Krea.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/Krea/Generated/Krea.VideoClient.GenerateSeedancePro.g.cs b/src/libs/Krea/Generated/Krea.VideoClient.GenerateSeedancePro.g.cs index 1658e18..ef7d451 100644 --- a/src/libs/Krea/Generated/Krea.VideoClient.GenerateSeedancePro.g.cs +++ b/src/libs/Krea/Generated/Krea.VideoClient.GenerateSeedancePro.g.cs @@ -367,17 +367,15 @@ partial void ProcessGenerateSeedanceProResponseContent( } catch (global::System.Exception __ex) { - throw new global::Krea.ApiException( + throw global::Krea.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 @@ -414,17 +412,15 @@ partial void ProcessGenerateSeedanceProResponseContent( { } - throw new global::Krea.ApiException( + throw global::Krea.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/Krea/Generated/Krea.VideoClient.GenerateSeedanceProFast.g.cs b/src/libs/Krea/Generated/Krea.VideoClient.GenerateSeedanceProFast.g.cs index 3e621fb..ebbf95a 100644 --- a/src/libs/Krea/Generated/Krea.VideoClient.GenerateSeedanceProFast.g.cs +++ b/src/libs/Krea/Generated/Krea.VideoClient.GenerateSeedanceProFast.g.cs @@ -367,17 +367,15 @@ partial void ProcessGenerateSeedanceProFastResponseContent( } catch (global::System.Exception __ex) { - throw new global::Krea.ApiException( + throw global::Krea.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 @@ -414,17 +412,15 @@ partial void ProcessGenerateSeedanceProFastResponseContent( { } - throw new global::Krea.ApiException( + throw global::Krea.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/Krea/Generated/Krea.VideoClient.GenerateSora2.g.cs b/src/libs/Krea/Generated/Krea.VideoClient.GenerateSora2.g.cs index 8b46a1b..10b2e00 100644 --- a/src/libs/Krea/Generated/Krea.VideoClient.GenerateSora2.g.cs +++ b/src/libs/Krea/Generated/Krea.VideoClient.GenerateSora2.g.cs @@ -367,17 +367,15 @@ partial void ProcessGenerateSora2ResponseContent( } catch (global::System.Exception __ex) { - throw new global::Krea.ApiException( + throw global::Krea.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 @@ -414,17 +412,15 @@ partial void ProcessGenerateSora2ResponseContent( { } - throw new global::Krea.ApiException( + throw global::Krea.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/Krea/Generated/Krea.VideoClient.GenerateVeo2.g.cs b/src/libs/Krea/Generated/Krea.VideoClient.GenerateVeo2.g.cs index 620c6f9..3f71398 100644 --- a/src/libs/Krea/Generated/Krea.VideoClient.GenerateVeo2.g.cs +++ b/src/libs/Krea/Generated/Krea.VideoClient.GenerateVeo2.g.cs @@ -367,17 +367,15 @@ partial void ProcessGenerateVeo2ResponseContent( } catch (global::System.Exception __ex) { - throw new global::Krea.ApiException( + throw global::Krea.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 @@ -414,17 +412,15 @@ partial void ProcessGenerateVeo2ResponseContent( { } - throw new global::Krea.ApiException( + throw global::Krea.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/Krea/Generated/Krea.VideoClient.GenerateVeo3.g.cs b/src/libs/Krea/Generated/Krea.VideoClient.GenerateVeo3.g.cs index ddf2dc9..8308955 100644 --- a/src/libs/Krea/Generated/Krea.VideoClient.GenerateVeo3.g.cs +++ b/src/libs/Krea/Generated/Krea.VideoClient.GenerateVeo3.g.cs @@ -367,17 +367,15 @@ partial void ProcessGenerateVeo3ResponseContent( } catch (global::System.Exception __ex) { - throw new global::Krea.ApiException( + throw global::Krea.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 @@ -414,17 +412,15 @@ partial void ProcessGenerateVeo3ResponseContent( { } - throw new global::Krea.ApiException( + throw global::Krea.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/Krea/Generated/Krea.VideoClient.GenerateVeo31.g.cs b/src/libs/Krea/Generated/Krea.VideoClient.GenerateVeo31.g.cs index 1458812..81dc799 100644 --- a/src/libs/Krea/Generated/Krea.VideoClient.GenerateVeo31.g.cs +++ b/src/libs/Krea/Generated/Krea.VideoClient.GenerateVeo31.g.cs @@ -367,17 +367,15 @@ partial void ProcessGenerateVeo31ResponseContent( } catch (global::System.Exception __ex) { - throw new global::Krea.ApiException( + throw global::Krea.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 @@ -414,17 +412,15 @@ partial void ProcessGenerateVeo31ResponseContent( { } - throw new global::Krea.ApiException( + throw global::Krea.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/Krea/Generated/Krea.VideoClient.GenerateVeo31Fast.g.cs b/src/libs/Krea/Generated/Krea.VideoClient.GenerateVeo31Fast.g.cs index 710df38..268fd14 100644 --- a/src/libs/Krea/Generated/Krea.VideoClient.GenerateVeo31Fast.g.cs +++ b/src/libs/Krea/Generated/Krea.VideoClient.GenerateVeo31Fast.g.cs @@ -367,17 +367,15 @@ partial void ProcessGenerateVeo31FastResponseContent( } catch (global::System.Exception __ex) { - throw new global::Krea.ApiException( + throw global::Krea.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 @@ -414,17 +412,15 @@ partial void ProcessGenerateVeo31FastResponseContent( { } - throw new global::Krea.ApiException( + throw global::Krea.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/Krea/Generated/Krea.VideoClient.GenerateVeo31Lite.g.cs b/src/libs/Krea/Generated/Krea.VideoClient.GenerateVeo31Lite.g.cs index a1d0f50..07c2e19 100644 --- a/src/libs/Krea/Generated/Krea.VideoClient.GenerateVeo31Lite.g.cs +++ b/src/libs/Krea/Generated/Krea.VideoClient.GenerateVeo31Lite.g.cs @@ -367,17 +367,15 @@ partial void ProcessGenerateVeo31LiteResponseContent( } catch (global::System.Exception __ex) { - throw new global::Krea.ApiException( + throw global::Krea.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 @@ -414,17 +412,15 @@ partial void ProcessGenerateVeo31LiteResponseContent( { } - throw new global::Krea.ApiException( + throw global::Krea.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/Krea/Generated/Krea.VideoClient.GenerateVeo3Fast.g.cs b/src/libs/Krea/Generated/Krea.VideoClient.GenerateVeo3Fast.g.cs index 4b5d8de..3e05663 100644 --- a/src/libs/Krea/Generated/Krea.VideoClient.GenerateVeo3Fast.g.cs +++ b/src/libs/Krea/Generated/Krea.VideoClient.GenerateVeo3Fast.g.cs @@ -367,17 +367,15 @@ partial void ProcessGenerateVeo3FastResponseContent( } catch (global::System.Exception __ex) { - throw new global::Krea.ApiException( + throw global::Krea.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 @@ -414,17 +412,15 @@ partial void ProcessGenerateVeo3FastResponseContent( { } - throw new global::Krea.ApiException( + throw global::Krea.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/Krea/Generated/Krea.VideoClient.GenerateWan21.g.cs b/src/libs/Krea/Generated/Krea.VideoClient.GenerateWan21.g.cs index b2722b8..f0cabca 100644 --- a/src/libs/Krea/Generated/Krea.VideoClient.GenerateWan21.g.cs +++ b/src/libs/Krea/Generated/Krea.VideoClient.GenerateWan21.g.cs @@ -367,17 +367,15 @@ partial void ProcessGenerateWan21ResponseContent( } catch (global::System.Exception __ex) { - throw new global::Krea.ApiException( + throw global::Krea.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 @@ -414,17 +412,15 @@ partial void ProcessGenerateWan21ResponseContent( { } - throw new global::Krea.ApiException( + throw global::Krea.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/Krea/Generated/Krea.VideoClient.GenerateWan22.g.cs b/src/libs/Krea/Generated/Krea.VideoClient.GenerateWan22.g.cs index 70f0855..bf8338d 100644 --- a/src/libs/Krea/Generated/Krea.VideoClient.GenerateWan22.g.cs +++ b/src/libs/Krea/Generated/Krea.VideoClient.GenerateWan22.g.cs @@ -367,17 +367,15 @@ partial void ProcessGenerateWan22ResponseContent( } catch (global::System.Exception __ex) { - throw new global::Krea.ApiException( + throw global::Krea.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 @@ -414,17 +412,15 @@ partial void ProcessGenerateWan22ResponseContent( { } - throw new global::Krea.ApiException( + throw global::Krea.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/Krea/Generated/Krea.VideoClient.GenerateWan25.g.cs b/src/libs/Krea/Generated/Krea.VideoClient.GenerateWan25.g.cs index 972a16b..1bedc59 100644 --- a/src/libs/Krea/Generated/Krea.VideoClient.GenerateWan25.g.cs +++ b/src/libs/Krea/Generated/Krea.VideoClient.GenerateWan25.g.cs @@ -367,17 +367,15 @@ partial void ProcessGenerateWan25ResponseContent( } catch (global::System.Exception __ex) { - throw new global::Krea.ApiException( + throw global::Krea.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 @@ -414,17 +412,15 @@ partial void ProcessGenerateWan25ResponseContent( { } - throw new global::Krea.ApiException( + throw global::Krea.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)); } }