From e8458233d16bac6c06a3e8f7994cfd8f25490004 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 24 May 2026 04:00:20 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- .../Writer/Generated/Writer.Exceptions.g.cs | 134 ++++++++++++++++++ ...riter.FileApiClient.GatewayDeleteFile.g.cs | 24 ++-- ...ter.FileApiClient.GatewayDownloadFile.g.cs | 35 ++--- .../Writer.FileApiClient.GatewayGetFile.g.cs | 24 ++-- .../Writer.FileApiClient.GatewayGetFiles.g.cs | 24 ++-- ...FileApiClient.GatewayRetryFailedFiles.g.cs | 24 ++-- ...riter.FileApiClient.GatewayUploadFile.g.cs | 24 ++-- .../Writer.GenerationApiClient.Chat.g.cs | 24 ++-- ...iter.GenerationApiClient.ChatAsStream.g.cs | 25 ++-- ...riter.GenerationApiClient.Completions.g.cs | 24 ++-- ...nerationApiClient.CompletionsAsStream.g.cs | 25 ++-- ...r.GenerationApiClient.GenerateContent.g.cs | 24 ++-- ...tionApiClient.GenerateContentAsStream.g.cs | 25 ++-- ...r.GenerationApiClient.GetApplications.g.cs | 24 ++-- ...Client.GetApplicationsByApplicationId.g.cs | 24 ++-- .../Writer.GenerationApiClient.Models.g.cs | 24 ++-- .../Writer.KgApiClient.AddFileToGraph.g.cs | 24 ++-- .../Writer.KgApiClient.CreateGraph.g.cs | 24 ++-- .../Writer.KgApiClient.DeleteGraph.g.cs | 24 ++-- ...r.KgApiClient.FindGraphWithFileStatus.g.cs | 24 ++-- ....KgApiClient.FindGraphsWithFileStatus.g.cs | 24 ++-- .../Writer.KgApiClient.Question.g.cs | 24 ++-- .../Writer.KgApiClient.QuestionAsStream.g.cs | 25 ++-- ...riter.KgApiClient.RemoveFileFromGraph.g.cs | 24 ++-- .../Writer.KgApiClient.UpdateGraph.g.cs | 24 ++-- ...CreateApplicationsByApplicationIdJobs.g.cs | 24 ++-- ...nt.CreateApplicationsJobsByJobIdRetry.g.cs | 24 ++-- ....GetApplicationsByApplicationIdGraphs.g.cs | 24 ++-- ...nt.GetApplicationsByApplicationIdJobs.g.cs | 24 ++-- ...lateClient.GetApplicationsJobsByJobId.g.cs | 24 ++-- ....PutApplicationsByApplicationIdGraphs.g.cs | 24 ++-- ...piClient.CreateToolsPdfParserByFileId.g.cs | 24 ++-- ...r.ToolsApiClient.CreateToolsWebSearch.g.cs | 24 ++-- ...r.TranslationClient.CreateTranslation.g.cs | 24 ++-- .../Writer.VisionClient.CreateVision.g.cs | 24 ++-- 35 files changed, 483 insertions(+), 482 deletions(-) diff --git a/src/libs/Writer/Generated/Writer.Exceptions.g.cs b/src/libs/Writer/Generated/Writer.Exceptions.g.cs index d2c5f43..5264774 100644 --- a/src/libs/Writer/Generated/Writer.Exceptions.g.cs +++ b/src/libs/Writer/Generated/Writer.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::Writer.ApiException Create( + global::System.Net.HttpStatusCode statusCode, + string message, + global::System.Exception? innerException = null, + global::System.Collections.Generic.IDictionary>? responseHeaders = null) + { + return new global::Writer.ApiException(message, innerException, statusCode); + } + + /// + /// Convenience overload that constructs an with response body and headers populated. + /// + public static global::Writer.ApiException Create( + global::System.Net.HttpStatusCode statusCode, + string message, + global::System.Exception? innerException, + string? responseBody, + global::System.Collections.Generic.Dictionary>? responseHeaders) + { + var exception = global::Writer.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::Writer.ApiException Create( + global::System.Net.HttpStatusCode statusCode, + string message, + global::System.Exception? innerException = null, + global::System.Collections.Generic.IDictionary>? responseHeaders = null) + { + return new global::Writer.ApiException(message, innerException, statusCode); + } + + /// + /// Convenience overload that constructs an with response body, object, and headers populated. + /// + public static global::Writer.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::Writer.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/Writer/Generated/Writer.FileApiClient.GatewayDeleteFile.g.cs b/src/libs/Writer/Generated/Writer.FileApiClient.GatewayDeleteFile.g.cs index 0bae8fc..b3fb543 100644 --- a/src/libs/Writer/Generated/Writer.FileApiClient.GatewayDeleteFile.g.cs +++ b/src/libs/Writer/Generated/Writer.FileApiClient.GatewayDeleteFile.g.cs @@ -366,17 +366,15 @@ partial void ProcessGatewayDeleteFileResponseContent( } catch (global::System.Exception __ex) { - throw new global::Writer.ApiException( + throw global::Writer.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 @@ -413,17 +411,15 @@ partial void ProcessGatewayDeleteFileResponseContent( { } - throw new global::Writer.ApiException( + throw global::Writer.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/Writer/Generated/Writer.FileApiClient.GatewayDownloadFile.g.cs b/src/libs/Writer/Generated/Writer.FileApiClient.GatewayDownloadFile.g.cs index 4e60a4b..efb797c 100644 --- a/src/libs/Writer/Generated/Writer.FileApiClient.GatewayDownloadFile.g.cs +++ b/src/libs/Writer/Generated/Writer.FileApiClient.GatewayDownloadFile.g.cs @@ -362,17 +362,15 @@ partial void ProcessGatewayDownloadFileResponseContent( { } - throw new global::Writer.ApiException( + throw global::Writer.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)); } } @@ -681,16 +679,15 @@ partial void ProcessGatewayDownloadFileResponseContent( } catch (global::System.Exception __ex) { - throw new global::Writer.ApiException( + throw global::Writer.ApiException.Create( + statusCode: __response.StatusCode, message: __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: null, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -725,17 +722,15 @@ partial void ProcessGatewayDownloadFileResponseContent( { } - throw new global::Writer.ApiException( + throw global::Writer.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/Writer/Generated/Writer.FileApiClient.GatewayGetFile.g.cs b/src/libs/Writer/Generated/Writer.FileApiClient.GatewayGetFile.g.cs index 66b6c92..856662e 100644 --- a/src/libs/Writer/Generated/Writer.FileApiClient.GatewayGetFile.g.cs +++ b/src/libs/Writer/Generated/Writer.FileApiClient.GatewayGetFile.g.cs @@ -366,17 +366,15 @@ partial void ProcessGatewayGetFileResponseContent( } catch (global::System.Exception __ex) { - throw new global::Writer.ApiException( + throw global::Writer.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 @@ -413,17 +411,15 @@ partial void ProcessGatewayGetFileResponseContent( { } - throw new global::Writer.ApiException( + throw global::Writer.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/Writer/Generated/Writer.FileApiClient.GatewayGetFiles.g.cs b/src/libs/Writer/Generated/Writer.FileApiClient.GatewayGetFiles.g.cs index 8eb9bbb..2687a02 100644 --- a/src/libs/Writer/Generated/Writer.FileApiClient.GatewayGetFiles.g.cs +++ b/src/libs/Writer/Generated/Writer.FileApiClient.GatewayGetFiles.g.cs @@ -437,17 +437,15 @@ partial void ProcessGatewayGetFilesResponseContent( } catch (global::System.Exception __ex) { - throw new global::Writer.ApiException( + throw global::Writer.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 +482,15 @@ partial void ProcessGatewayGetFilesResponseContent( { } - throw new global::Writer.ApiException( + throw global::Writer.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/Writer/Generated/Writer.FileApiClient.GatewayRetryFailedFiles.g.cs b/src/libs/Writer/Generated/Writer.FileApiClient.GatewayRetryFailedFiles.g.cs index b7c8e11..0f32b80 100644 --- a/src/libs/Writer/Generated/Writer.FileApiClient.GatewayRetryFailedFiles.g.cs +++ b/src/libs/Writer/Generated/Writer.FileApiClient.GatewayRetryFailedFiles.g.cs @@ -381,17 +381,15 @@ partial void ProcessGatewayRetryFailedFilesResponseContent( } catch (global::System.Exception __ex) { - throw new global::Writer.ApiException( + throw global::Writer.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 @@ -428,17 +426,15 @@ partial void ProcessGatewayRetryFailedFilesResponseContent( { } - throw new global::Writer.ApiException( + throw global::Writer.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/Writer/Generated/Writer.FileApiClient.GatewayUploadFile.g.cs b/src/libs/Writer/Generated/Writer.FileApiClient.GatewayUploadFile.g.cs index 74391ba..4f18771 100644 --- a/src/libs/Writer/Generated/Writer.FileApiClient.GatewayUploadFile.g.cs +++ b/src/libs/Writer/Generated/Writer.FileApiClient.GatewayUploadFile.g.cs @@ -429,17 +429,15 @@ partial void ProcessGatewayUploadFileResponseContent( } catch (global::System.Exception __ex) { - throw new global::Writer.ApiException( + throw global::Writer.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 @@ -476,17 +474,15 @@ partial void ProcessGatewayUploadFileResponseContent( { } - throw new global::Writer.ApiException( + throw global::Writer.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/Writer/Generated/Writer.GenerationApiClient.Chat.g.cs b/src/libs/Writer/Generated/Writer.GenerationApiClient.Chat.g.cs index a882f81..70502d2 100644 --- a/src/libs/Writer/Generated/Writer.GenerationApiClient.Chat.g.cs +++ b/src/libs/Writer/Generated/Writer.GenerationApiClient.Chat.g.cs @@ -397,17 +397,15 @@ partial void ProcessChatResponseContent( } catch (global::System.Exception __ex) { - throw new global::Writer.ApiException( + throw global::Writer.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 @@ -444,17 +442,15 @@ partial void ProcessChatResponseContent( { } - throw new global::Writer.ApiException( + throw global::Writer.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/Writer/Generated/Writer.GenerationApiClient.ChatAsStream.g.cs b/src/libs/Writer/Generated/Writer.GenerationApiClient.ChatAsStream.g.cs index 776434a..77fef00 100644 --- a/src/libs/Writer/Generated/Writer.GenerationApiClient.ChatAsStream.g.cs +++ b/src/libs/Writer/Generated/Writer.GenerationApiClient.ChatAsStream.g.cs @@ -351,17 +351,15 @@ partial void ProcessChatAsStreamResponse( { } - throw new global::Writer.ApiException( + throw global::Writer.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)); } using var __stream = await __response.Content.ReadAsStreamAsync( @@ -380,16 +378,15 @@ partial void ProcessChatAsStreamResponse( } var __streamedResponse = global::Writer.ChatCompletionChunk.FromJson(__content, JsonSerializerContext) ?? - throw new global::Writer.ApiException( + throw global::Writer.ApiException.Create( + statusCode: __response.StatusCode, message: $"Response deserialization failed for \"{__content}\" ", - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + innerException: null, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); yield return __streamedResponse; } diff --git a/src/libs/Writer/Generated/Writer.GenerationApiClient.Completions.g.cs b/src/libs/Writer/Generated/Writer.GenerationApiClient.Completions.g.cs index 2f62357..584970c 100644 --- a/src/libs/Writer/Generated/Writer.GenerationApiClient.Completions.g.cs +++ b/src/libs/Writer/Generated/Writer.GenerationApiClient.Completions.g.cs @@ -393,17 +393,15 @@ partial void ProcessCompletionsResponseContent( } catch (global::System.Exception __ex) { - throw new global::Writer.ApiException( + throw global::Writer.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 @@ -440,17 +438,15 @@ partial void ProcessCompletionsResponseContent( { } - throw new global::Writer.ApiException( + throw global::Writer.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/Writer/Generated/Writer.GenerationApiClient.CompletionsAsStream.g.cs b/src/libs/Writer/Generated/Writer.GenerationApiClient.CompletionsAsStream.g.cs index ddd7bed..dbd00ca 100644 --- a/src/libs/Writer/Generated/Writer.GenerationApiClient.CompletionsAsStream.g.cs +++ b/src/libs/Writer/Generated/Writer.GenerationApiClient.CompletionsAsStream.g.cs @@ -347,17 +347,15 @@ partial void ProcessCompletionsAsStreamResponse( { } - throw new global::Writer.ApiException( + throw global::Writer.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)); } using var __stream = await __response.Content.ReadAsStreamAsync( @@ -376,16 +374,15 @@ partial void ProcessCompletionsAsStreamResponse( } var __streamedResponse = global::Writer.StreamingData.FromJson(__content, JsonSerializerContext) ?? - throw new global::Writer.ApiException( + throw global::Writer.ApiException.Create( + statusCode: __response.StatusCode, message: $"Response deserialization failed for \"{__content}\" ", - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + innerException: null, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); yield return __streamedResponse; } diff --git a/src/libs/Writer/Generated/Writer.GenerationApiClient.GenerateContent.g.cs b/src/libs/Writer/Generated/Writer.GenerationApiClient.GenerateContent.g.cs index 7bf4580..11d2871 100644 --- a/src/libs/Writer/Generated/Writer.GenerationApiClient.GenerateContent.g.cs +++ b/src/libs/Writer/Generated/Writer.GenerationApiClient.GenerateContent.g.cs @@ -395,17 +395,15 @@ partial void ProcessGenerateContentResponseContent( } catch (global::System.Exception __ex) { - throw new global::Writer.ApiException( + throw global::Writer.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 @@ -442,17 +440,15 @@ partial void ProcessGenerateContentResponseContent( { } - throw new global::Writer.ApiException( + throw global::Writer.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/Writer/Generated/Writer.GenerationApiClient.GenerateContentAsStream.g.cs b/src/libs/Writer/Generated/Writer.GenerationApiClient.GenerateContentAsStream.g.cs index 00cbe21..29cfc63 100644 --- a/src/libs/Writer/Generated/Writer.GenerationApiClient.GenerateContentAsStream.g.cs +++ b/src/libs/Writer/Generated/Writer.GenerationApiClient.GenerateContentAsStream.g.cs @@ -346,17 +346,15 @@ partial void ProcessGenerateContentAsStreamResponse( { } - throw new global::Writer.ApiException( + throw global::Writer.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)); } using var __stream = await __response.Content.ReadAsStreamAsync( @@ -375,16 +373,15 @@ partial void ProcessGenerateContentAsStreamResponse( } var __streamedResponse = global::Writer.GenerateApplicationResponseChunk.FromJson(__content, JsonSerializerContext) ?? - throw new global::Writer.ApiException( + throw global::Writer.ApiException.Create( + statusCode: __response.StatusCode, message: $"Response deserialization failed for \"{__content}\" ", - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + innerException: null, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); yield return __streamedResponse; } diff --git a/src/libs/Writer/Generated/Writer.GenerationApiClient.GetApplications.g.cs b/src/libs/Writer/Generated/Writer.GenerationApiClient.GetApplications.g.cs index f1ddfc9..f021918 100644 --- a/src/libs/Writer/Generated/Writer.GenerationApiClient.GetApplications.g.cs +++ b/src/libs/Writer/Generated/Writer.GenerationApiClient.GetApplications.g.cs @@ -421,17 +421,15 @@ partial void ProcessGetApplicationsResponseContent( } catch (global::System.Exception __ex) { - throw new global::Writer.ApiException( + throw global::Writer.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 @@ -468,17 +466,15 @@ partial void ProcessGetApplicationsResponseContent( { } - throw new global::Writer.ApiException( + throw global::Writer.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/Writer/Generated/Writer.GenerationApiClient.GetApplicationsByApplicationId.g.cs b/src/libs/Writer/Generated/Writer.GenerationApiClient.GetApplicationsByApplicationId.g.cs index 02a4bae..c8426c0 100644 --- a/src/libs/Writer/Generated/Writer.GenerationApiClient.GetApplicationsByApplicationId.g.cs +++ b/src/libs/Writer/Generated/Writer.GenerationApiClient.GetApplicationsByApplicationId.g.cs @@ -366,17 +366,15 @@ partial void ProcessGetApplicationsByApplicationIdResponseContent( } catch (global::System.Exception __ex) { - throw new global::Writer.ApiException( + throw global::Writer.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 @@ -413,17 +411,15 @@ partial void ProcessGetApplicationsByApplicationIdResponseContent( { } - throw new global::Writer.ApiException( + throw global::Writer.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/Writer/Generated/Writer.GenerationApiClient.Models.g.cs b/src/libs/Writer/Generated/Writer.GenerationApiClient.Models.g.cs index f4e230e..b15269a 100644 --- a/src/libs/Writer/Generated/Writer.GenerationApiClient.Models.g.cs +++ b/src/libs/Writer/Generated/Writer.GenerationApiClient.Models.g.cs @@ -357,17 +357,15 @@ partial void ProcessModelsResponseContent( } catch (global::System.Exception __ex) { - throw new global::Writer.ApiException( + throw global::Writer.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 @@ -404,17 +402,15 @@ partial void ProcessModelsResponseContent( { } - throw new global::Writer.ApiException( + throw global::Writer.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/Writer/Generated/Writer.KgApiClient.AddFileToGraph.g.cs b/src/libs/Writer/Generated/Writer.KgApiClient.AddFileToGraph.g.cs index 45b5ed0..4817096 100644 --- a/src/libs/Writer/Generated/Writer.KgApiClient.AddFileToGraph.g.cs +++ b/src/libs/Writer/Generated/Writer.KgApiClient.AddFileToGraph.g.cs @@ -390,17 +390,15 @@ partial void ProcessAddFileToGraphResponseContent( } catch (global::System.Exception __ex) { - throw new global::Writer.ApiException( + throw global::Writer.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 @@ -437,17 +435,15 @@ partial void ProcessAddFileToGraphResponseContent( { } - throw new global::Writer.ApiException( + throw global::Writer.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/Writer/Generated/Writer.KgApiClient.CreateGraph.g.cs b/src/libs/Writer/Generated/Writer.KgApiClient.CreateGraph.g.cs index dd51fc6..0eddadb 100644 --- a/src/libs/Writer/Generated/Writer.KgApiClient.CreateGraph.g.cs +++ b/src/libs/Writer/Generated/Writer.KgApiClient.CreateGraph.g.cs @@ -381,17 +381,15 @@ partial void ProcessCreateGraphResponseContent( } catch (global::System.Exception __ex) { - throw new global::Writer.ApiException( + throw global::Writer.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 @@ -428,17 +426,15 @@ partial void ProcessCreateGraphResponseContent( { } - throw new global::Writer.ApiException( + throw global::Writer.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/Writer/Generated/Writer.KgApiClient.DeleteGraph.g.cs b/src/libs/Writer/Generated/Writer.KgApiClient.DeleteGraph.g.cs index fac7daf..29e8159 100644 --- a/src/libs/Writer/Generated/Writer.KgApiClient.DeleteGraph.g.cs +++ b/src/libs/Writer/Generated/Writer.KgApiClient.DeleteGraph.g.cs @@ -366,17 +366,15 @@ partial void ProcessDeleteGraphResponseContent( } catch (global::System.Exception __ex) { - throw new global::Writer.ApiException( + throw global::Writer.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 @@ -413,17 +411,15 @@ partial void ProcessDeleteGraphResponseContent( { } - throw new global::Writer.ApiException( + throw global::Writer.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/Writer/Generated/Writer.KgApiClient.FindGraphWithFileStatus.g.cs b/src/libs/Writer/Generated/Writer.KgApiClient.FindGraphWithFileStatus.g.cs index 07215bc..5bab62b 100644 --- a/src/libs/Writer/Generated/Writer.KgApiClient.FindGraphWithFileStatus.g.cs +++ b/src/libs/Writer/Generated/Writer.KgApiClient.FindGraphWithFileStatus.g.cs @@ -366,17 +366,15 @@ partial void ProcessFindGraphWithFileStatusResponseContent( } catch (global::System.Exception __ex) { - throw new global::Writer.ApiException( + throw global::Writer.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 @@ -413,17 +411,15 @@ partial void ProcessFindGraphWithFileStatusResponseContent( { } - throw new global::Writer.ApiException( + throw global::Writer.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/Writer/Generated/Writer.KgApiClient.FindGraphsWithFileStatus.g.cs b/src/libs/Writer/Generated/Writer.KgApiClient.FindGraphsWithFileStatus.g.cs index a41dc89..a9be5cc 100644 --- a/src/libs/Writer/Generated/Writer.KgApiClient.FindGraphsWithFileStatus.g.cs +++ b/src/libs/Writer/Generated/Writer.KgApiClient.FindGraphsWithFileStatus.g.cs @@ -407,17 +407,15 @@ partial void ProcessFindGraphsWithFileStatusResponseContent( } catch (global::System.Exception __ex) { - throw new global::Writer.ApiException( + throw global::Writer.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 @@ -454,17 +452,15 @@ partial void ProcessFindGraphsWithFileStatusResponseContent( { } - throw new global::Writer.ApiException( + throw global::Writer.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/Writer/Generated/Writer.KgApiClient.Question.g.cs b/src/libs/Writer/Generated/Writer.KgApiClient.Question.g.cs index 1540ab7..01987c3 100644 --- a/src/libs/Writer/Generated/Writer.KgApiClient.Question.g.cs +++ b/src/libs/Writer/Generated/Writer.KgApiClient.Question.g.cs @@ -389,17 +389,15 @@ partial void ProcessQuestionResponseContent( } catch (global::System.Exception __ex) { - throw new global::Writer.ApiException( + throw global::Writer.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 @@ -436,17 +434,15 @@ partial void ProcessQuestionResponseContent( { } - throw new global::Writer.ApiException( + throw global::Writer.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/Writer/Generated/Writer.KgApiClient.QuestionAsStream.g.cs b/src/libs/Writer/Generated/Writer.KgApiClient.QuestionAsStream.g.cs index 2e11867..3f3c837 100644 --- a/src/libs/Writer/Generated/Writer.KgApiClient.QuestionAsStream.g.cs +++ b/src/libs/Writer/Generated/Writer.KgApiClient.QuestionAsStream.g.cs @@ -343,17 +343,15 @@ partial void ProcessQuestionAsStreamResponse( { } - throw new global::Writer.ApiException( + throw global::Writer.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)); } using var __stream = await __response.Content.ReadAsStreamAsync( @@ -372,16 +370,15 @@ partial void ProcessQuestionAsStreamResponse( } var __streamedResponse = global::Writer.QuestionResponseChunk.FromJson(__content, JsonSerializerContext) ?? - throw new global::Writer.ApiException( + throw global::Writer.ApiException.Create( + statusCode: __response.StatusCode, message: $"Response deserialization failed for \"{__content}\" ", - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + innerException: null, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); yield return __streamedResponse; } diff --git a/src/libs/Writer/Generated/Writer.KgApiClient.RemoveFileFromGraph.g.cs b/src/libs/Writer/Generated/Writer.KgApiClient.RemoveFileFromGraph.g.cs index 986c11c..a591381 100644 --- a/src/libs/Writer/Generated/Writer.KgApiClient.RemoveFileFromGraph.g.cs +++ b/src/libs/Writer/Generated/Writer.KgApiClient.RemoveFileFromGraph.g.cs @@ -375,17 +375,15 @@ partial void ProcessRemoveFileFromGraphResponseContent( } catch (global::System.Exception __ex) { - throw new global::Writer.ApiException( + throw global::Writer.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 @@ -422,17 +420,15 @@ partial void ProcessRemoveFileFromGraphResponseContent( { } - throw new global::Writer.ApiException( + throw global::Writer.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/Writer/Generated/Writer.KgApiClient.UpdateGraph.g.cs b/src/libs/Writer/Generated/Writer.KgApiClient.UpdateGraph.g.cs index 547239d..e30d77b 100644 --- a/src/libs/Writer/Generated/Writer.KgApiClient.UpdateGraph.g.cs +++ b/src/libs/Writer/Generated/Writer.KgApiClient.UpdateGraph.g.cs @@ -390,17 +390,15 @@ partial void ProcessUpdateGraphResponseContent( } catch (global::System.Exception __ex) { - throw new global::Writer.ApiException( + throw global::Writer.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 @@ -437,17 +435,15 @@ partial void ProcessUpdateGraphResponseContent( { } - throw new global::Writer.ApiException( + throw global::Writer.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/Writer/Generated/Writer.TemplateClient.CreateApplicationsByApplicationIdJobs.g.cs b/src/libs/Writer/Generated/Writer.TemplateClient.CreateApplicationsByApplicationIdJobs.g.cs index fa4372e..4d2d4e4 100644 --- a/src/libs/Writer/Generated/Writer.TemplateClient.CreateApplicationsByApplicationIdJobs.g.cs +++ b/src/libs/Writer/Generated/Writer.TemplateClient.CreateApplicationsByApplicationIdJobs.g.cs @@ -390,17 +390,15 @@ partial void ProcessCreateApplicationsByApplicationIdJobsResponseContent( } catch (global::System.Exception __ex) { - throw new global::Writer.ApiException( + throw global::Writer.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 @@ -437,17 +435,15 @@ partial void ProcessCreateApplicationsByApplicationIdJobsResponseContent( { } - throw new global::Writer.ApiException( + throw global::Writer.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/Writer/Generated/Writer.TemplateClient.CreateApplicationsJobsByJobIdRetry.g.cs b/src/libs/Writer/Generated/Writer.TemplateClient.CreateApplicationsJobsByJobIdRetry.g.cs index 8bc5ab8..060eef5 100644 --- a/src/libs/Writer/Generated/Writer.TemplateClient.CreateApplicationsJobsByJobIdRetry.g.cs +++ b/src/libs/Writer/Generated/Writer.TemplateClient.CreateApplicationsJobsByJobIdRetry.g.cs @@ -366,17 +366,15 @@ partial void ProcessCreateApplicationsJobsByJobIdRetryResponseContent( } catch (global::System.Exception __ex) { - throw new global::Writer.ApiException( + throw global::Writer.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 @@ -413,17 +411,15 @@ partial void ProcessCreateApplicationsJobsByJobIdRetryResponseContent( { } - throw new global::Writer.ApiException( + throw global::Writer.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/Writer/Generated/Writer.TemplateClient.GetApplicationsByApplicationIdGraphs.g.cs b/src/libs/Writer/Generated/Writer.TemplateClient.GetApplicationsByApplicationIdGraphs.g.cs index ba1d085..957167f 100644 --- a/src/libs/Writer/Generated/Writer.TemplateClient.GetApplicationsByApplicationIdGraphs.g.cs +++ b/src/libs/Writer/Generated/Writer.TemplateClient.GetApplicationsByApplicationIdGraphs.g.cs @@ -366,17 +366,15 @@ partial void ProcessGetApplicationsByApplicationIdGraphsResponseContent( } catch (global::System.Exception __ex) { - throw new global::Writer.ApiException( + throw global::Writer.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 @@ -413,17 +411,15 @@ partial void ProcessGetApplicationsByApplicationIdGraphsResponseContent( { } - throw new global::Writer.ApiException( + throw global::Writer.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/Writer/Generated/Writer.TemplateClient.GetApplicationsByApplicationIdJobs.g.cs b/src/libs/Writer/Generated/Writer.TemplateClient.GetApplicationsByApplicationIdJobs.g.cs index 7a5a997..3f7ff50 100644 --- a/src/libs/Writer/Generated/Writer.TemplateClient.GetApplicationsByApplicationIdJobs.g.cs +++ b/src/libs/Writer/Generated/Writer.TemplateClient.GetApplicationsByApplicationIdJobs.g.cs @@ -402,17 +402,15 @@ partial void ProcessGetApplicationsByApplicationIdJobsResponseContent( } catch (global::System.Exception __ex) { - throw new global::Writer.ApiException( + throw global::Writer.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 @@ -449,17 +447,15 @@ partial void ProcessGetApplicationsByApplicationIdJobsResponseContent( { } - throw new global::Writer.ApiException( + throw global::Writer.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/Writer/Generated/Writer.TemplateClient.GetApplicationsJobsByJobId.g.cs b/src/libs/Writer/Generated/Writer.TemplateClient.GetApplicationsJobsByJobId.g.cs index 4146a8d..542d30c 100644 --- a/src/libs/Writer/Generated/Writer.TemplateClient.GetApplicationsJobsByJobId.g.cs +++ b/src/libs/Writer/Generated/Writer.TemplateClient.GetApplicationsJobsByJobId.g.cs @@ -366,17 +366,15 @@ partial void ProcessGetApplicationsJobsByJobIdResponseContent( } catch (global::System.Exception __ex) { - throw new global::Writer.ApiException( + throw global::Writer.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 @@ -413,17 +411,15 @@ partial void ProcessGetApplicationsJobsByJobIdResponseContent( { } - throw new global::Writer.ApiException( + throw global::Writer.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/Writer/Generated/Writer.TemplateClient.PutApplicationsByApplicationIdGraphs.g.cs b/src/libs/Writer/Generated/Writer.TemplateClient.PutApplicationsByApplicationIdGraphs.g.cs index 3d05a9b..693e1b4 100644 --- a/src/libs/Writer/Generated/Writer.TemplateClient.PutApplicationsByApplicationIdGraphs.g.cs +++ b/src/libs/Writer/Generated/Writer.TemplateClient.PutApplicationsByApplicationIdGraphs.g.cs @@ -390,17 +390,15 @@ partial void ProcessPutApplicationsByApplicationIdGraphsResponseContent( } catch (global::System.Exception __ex) { - throw new global::Writer.ApiException( + throw global::Writer.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 @@ -437,17 +435,15 @@ partial void ProcessPutApplicationsByApplicationIdGraphsResponseContent( { } - throw new global::Writer.ApiException( + throw global::Writer.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/Writer/Generated/Writer.ToolsApiClient.CreateToolsPdfParserByFileId.g.cs b/src/libs/Writer/Generated/Writer.ToolsApiClient.CreateToolsPdfParserByFileId.g.cs index 6d34c16..155c457 100644 --- a/src/libs/Writer/Generated/Writer.ToolsApiClient.CreateToolsPdfParserByFileId.g.cs +++ b/src/libs/Writer/Generated/Writer.ToolsApiClient.CreateToolsPdfParserByFileId.g.cs @@ -390,17 +390,15 @@ partial void ProcessCreateToolsPdfParserByFileIdResponseContent( } catch (global::System.Exception __ex) { - throw new global::Writer.ApiException( + throw global::Writer.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 @@ -437,17 +435,15 @@ partial void ProcessCreateToolsPdfParserByFileIdResponseContent( { } - throw new global::Writer.ApiException( + throw global::Writer.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/Writer/Generated/Writer.ToolsApiClient.CreateToolsWebSearch.g.cs b/src/libs/Writer/Generated/Writer.ToolsApiClient.CreateToolsWebSearch.g.cs index 0419ed2..73ca14f 100644 --- a/src/libs/Writer/Generated/Writer.ToolsApiClient.CreateToolsWebSearch.g.cs +++ b/src/libs/Writer/Generated/Writer.ToolsApiClient.CreateToolsWebSearch.g.cs @@ -381,17 +381,15 @@ partial void ProcessCreateToolsWebSearchResponseContent( } catch (global::System.Exception __ex) { - throw new global::Writer.ApiException( + throw global::Writer.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 @@ -428,17 +426,15 @@ partial void ProcessCreateToolsWebSearchResponseContent( { } - throw new global::Writer.ApiException( + throw global::Writer.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/Writer/Generated/Writer.TranslationClient.CreateTranslation.g.cs b/src/libs/Writer/Generated/Writer.TranslationClient.CreateTranslation.g.cs index b04c5ae..7a3c87a 100644 --- a/src/libs/Writer/Generated/Writer.TranslationClient.CreateTranslation.g.cs +++ b/src/libs/Writer/Generated/Writer.TranslationClient.CreateTranslation.g.cs @@ -381,17 +381,15 @@ partial void ProcessCreateTranslationResponseContent( } catch (global::System.Exception __ex) { - throw new global::Writer.ApiException( + throw global::Writer.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 @@ -428,17 +426,15 @@ partial void ProcessCreateTranslationResponseContent( { } - throw new global::Writer.ApiException( + throw global::Writer.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/Writer/Generated/Writer.VisionClient.CreateVision.g.cs b/src/libs/Writer/Generated/Writer.VisionClient.CreateVision.g.cs index 3036987..a743799 100644 --- a/src/libs/Writer/Generated/Writer.VisionClient.CreateVision.g.cs +++ b/src/libs/Writer/Generated/Writer.VisionClient.CreateVision.g.cs @@ -381,17 +381,15 @@ partial void ProcessCreateVisionResponseContent( } catch (global::System.Exception __ex) { - throw new global::Writer.ApiException( + throw global::Writer.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 @@ -428,17 +426,15 @@ partial void ProcessCreateVisionResponseContent( { } - throw new global::Writer.ApiException( + throw global::Writer.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)); } }