From 572ba21c1987b1539b805bdd4a0937eda33b80dc Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 24 May 2026 04:00:02 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- ...perAI.AudiencesClient.GetAudienceById.g.cs | 54 +++--- ...JasperAI.AudiencesClient.GetAudiences.g.cs | 39 ++--- .../JasperAI.CommandClient.Command.g.cs | 54 +++--- ...sperAI.DocumentsClient.CreateDocument.g.cs | 54 +++--- ...AI.DocumentsClient.DeleteDocumentById.g.cs | 54 +++--- ...perAI.DocumentsClient.GetAllDocuments.g.cs | 39 ++--- ...perAI.DocumentsClient.GetDocumentById.g.cs | 54 +++--- ...sperAI.DocumentsClient.UpdateDocument.g.cs | 54 +++--- .../Generated/JasperAI.Exceptions.g.cs | 134 +++++++++++++++ ...owledgeClient.DeleteKnowledgeDocument.g.cs | 54 +++--- ....KnowledgeClient.GetKnowledgeDocument.g.cs | 54 +++--- ...KnowledgeClient.GetKnowledgeDocuments.g.cs | 39 ++--- ...perAI.KnowledgeClient.SearchKnowledge.g.cs | 54 +++--- ...owledgeClient.UpdateKnowledgeDocument.g.cs | 54 +++--- ...owledgeClient.UploadKnowledgeDocument.g.cs | 162 ++++++++---------- .../JasperAI.StylesClient.GetStyleById.g.cs | 54 +++--- .../JasperAI.StylesClient.GetStyles.g.cs | 39 ++--- .../JasperAI.TasksClient.GetTaskById.g.cs | 54 +++--- .../JasperAI.TasksClient.ListTasks.g.cs | 39 ++--- .../JasperAI.TasksClient.RunTask.g.cs | 69 ++++---- .../JasperAI.UsageClient.GetUsage.g.cs | 39 ++--- .../JasperAI.UsersClient.GetAllUsers.g.cs | 39 ++--- .../JasperAI.UsersClient.GetUser.g.cs | 54 +++--- .../JasperAI.VoicesClient.CreateTone.g.cs | 54 +++--- .../JasperAI.VoicesClient.DeleteTone.g.cs | 54 +++--- .../JasperAI.VoicesClient.GetAllTones.g.cs | 39 ++--- .../JasperAI.VoicesClient.GetTone.g.cs | 54 +++--- .../JasperAI.VoicesClient.UpdateTone.g.cs | 54 +++--- 28 files changed, 781 insertions(+), 814 deletions(-) diff --git a/src/libs/JasperAI/Generated/JasperAI.AudiencesClient.GetAudienceById.g.cs b/src/libs/JasperAI/Generated/JasperAI.AudiencesClient.GetAudienceById.g.cs index c017161..a65887f 100644 --- a/src/libs/JasperAI/Generated/JasperAI.AudiencesClient.GetAudienceById.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.AudiencesClient.GetAudienceById.g.cs @@ -351,18 +351,17 @@ partial void ProcessGetAudienceByIdResponseContent( __exception_404 = __ex; } - throw new global::JasperAI.ApiException( + + throw global::JasperAI.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)); } // Internal server error. if ((int)__response.StatusCode == 500) @@ -389,18 +388,17 @@ partial void ProcessGetAudienceByIdResponseContent( __exception_500 = __ex; } - throw new global::JasperAI.ApiException( + + throw global::JasperAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, - statusCode: __response.StatusCode) - { - ResponseBody = __content_500, - ResponseObject = __value_500, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_500, + responseObject: __value_500, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -434,17 +432,15 @@ partial void ProcessGetAudienceByIdResponseContent( } catch (global::System.Exception __ex) { - throw new global::JasperAI.ApiException( + throw global::JasperAI.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 @@ -481,17 +477,15 @@ partial void ProcessGetAudienceByIdResponseContent( { } - throw new global::JasperAI.ApiException( + throw global::JasperAI.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/JasperAI/Generated/JasperAI.AudiencesClient.GetAudiences.g.cs b/src/libs/JasperAI/Generated/JasperAI.AudiencesClient.GetAudiences.g.cs index 2ef54f7..4d19690 100644 --- a/src/libs/JasperAI/Generated/JasperAI.AudiencesClient.GetAudiences.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.AudiencesClient.GetAudiences.g.cs @@ -342,18 +342,17 @@ partial void ProcessGetAudiencesResponseContent( __exception_500 = __ex; } - throw new global::JasperAI.ApiException( + + throw global::JasperAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, - statusCode: __response.StatusCode) - { - ResponseBody = __content_500, - ResponseObject = __value_500, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_500, + responseObject: __value_500, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -387,17 +386,15 @@ partial void ProcessGetAudiencesResponseContent( } catch (global::System.Exception __ex) { - throw new global::JasperAI.ApiException( + throw global::JasperAI.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 @@ -434,17 +431,15 @@ partial void ProcessGetAudiencesResponseContent( { } - throw new global::JasperAI.ApiException( + throw global::JasperAI.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/JasperAI/Generated/JasperAI.CommandClient.Command.g.cs b/src/libs/JasperAI/Generated/JasperAI.CommandClient.Command.g.cs index 0ef0c4c..fe5a399 100644 --- a/src/libs/JasperAI/Generated/JasperAI.CommandClient.Command.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.CommandClient.Command.g.cs @@ -362,18 +362,17 @@ partial void ProcessCommandResponseContent( __exception_400 = __ex; } - throw new global::JasperAI.ApiException( + + throw global::JasperAI.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)); } // Internal server error. if ((int)__response.StatusCode == 500) @@ -400,18 +399,17 @@ partial void ProcessCommandResponseContent( __exception_500 = __ex; } - throw new global::JasperAI.ApiException( + + throw global::JasperAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, - statusCode: __response.StatusCode) - { - ResponseBody = __content_500, - ResponseObject = __value_500, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_500, + responseObject: __value_500, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -445,17 +443,15 @@ partial void ProcessCommandResponseContent( } catch (global::System.Exception __ex) { - throw new global::JasperAI.ApiException( + throw global::JasperAI.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 @@ -492,17 +488,15 @@ partial void ProcessCommandResponseContent( { } - throw new global::JasperAI.ApiException( + throw global::JasperAI.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/JasperAI/Generated/JasperAI.DocumentsClient.CreateDocument.g.cs b/src/libs/JasperAI/Generated/JasperAI.DocumentsClient.CreateDocument.g.cs index 17fceb5..30d7cae 100644 --- a/src/libs/JasperAI/Generated/JasperAI.DocumentsClient.CreateDocument.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.DocumentsClient.CreateDocument.g.cs @@ -362,18 +362,17 @@ partial void ProcessCreateDocumentResponseContent( __exception_400 = __ex; } - throw new global::JasperAI.ApiException( + + throw global::JasperAI.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)); } // Internal server error. if ((int)__response.StatusCode == 500) @@ -400,18 +399,17 @@ partial void ProcessCreateDocumentResponseContent( __exception_500 = __ex; } - throw new global::JasperAI.ApiException( + + throw global::JasperAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, - statusCode: __response.StatusCode) - { - ResponseBody = __content_500, - ResponseObject = __value_500, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_500, + responseObject: __value_500, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -445,17 +443,15 @@ partial void ProcessCreateDocumentResponseContent( } catch (global::System.Exception __ex) { - throw new global::JasperAI.ApiException( + throw global::JasperAI.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 @@ -492,17 +488,15 @@ partial void ProcessCreateDocumentResponseContent( { } - throw new global::JasperAI.ApiException( + throw global::JasperAI.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/JasperAI/Generated/JasperAI.DocumentsClient.DeleteDocumentById.g.cs b/src/libs/JasperAI/Generated/JasperAI.DocumentsClient.DeleteDocumentById.g.cs index 74e71ce..6a0dafd 100644 --- a/src/libs/JasperAI/Generated/JasperAI.DocumentsClient.DeleteDocumentById.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.DocumentsClient.DeleteDocumentById.g.cs @@ -344,18 +344,17 @@ await DeleteDocumentByIdAsResponseAsync( __exception_404 = __ex; } - throw new global::JasperAI.ApiException( + + throw global::JasperAI.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)); } // Internal server error. if ((int)__response.StatusCode == 500) @@ -382,18 +381,17 @@ await DeleteDocumentByIdAsResponseAsync( __exception_500 = __ex; } - throw new global::JasperAI.ApiException( + + throw global::JasperAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, - statusCode: __response.StatusCode) - { - ResponseBody = __content_500, - ResponseObject = __value_500, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_500, + responseObject: __value_500, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -420,17 +418,15 @@ await DeleteDocumentByIdAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::JasperAI.ApiException( + throw global::JasperAI.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 +454,15 @@ await DeleteDocumentByIdAsResponseAsync( { } - throw new global::JasperAI.ApiException( + throw global::JasperAI.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/JasperAI/Generated/JasperAI.DocumentsClient.GetAllDocuments.g.cs b/src/libs/JasperAI/Generated/JasperAI.DocumentsClient.GetAllDocuments.g.cs index 0ca021b..81413cf 100644 --- a/src/libs/JasperAI/Generated/JasperAI.DocumentsClient.GetAllDocuments.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.DocumentsClient.GetAllDocuments.g.cs @@ -432,18 +432,17 @@ partial void ProcessGetAllDocumentsResponseContent( __exception_500 = __ex; } - throw new global::JasperAI.ApiException( + + throw global::JasperAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, - statusCode: __response.StatusCode) - { - ResponseBody = __content_500, - ResponseObject = __value_500, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_500, + responseObject: __value_500, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -477,17 +476,15 @@ partial void ProcessGetAllDocumentsResponseContent( } catch (global::System.Exception __ex) { - throw new global::JasperAI.ApiException( + throw global::JasperAI.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 @@ -524,17 +521,15 @@ partial void ProcessGetAllDocumentsResponseContent( { } - throw new global::JasperAI.ApiException( + throw global::JasperAI.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/JasperAI/Generated/JasperAI.DocumentsClient.GetDocumentById.g.cs b/src/libs/JasperAI/Generated/JasperAI.DocumentsClient.GetDocumentById.g.cs index 011eab3..b493382 100644 --- a/src/libs/JasperAI/Generated/JasperAI.DocumentsClient.GetDocumentById.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.DocumentsClient.GetDocumentById.g.cs @@ -351,18 +351,17 @@ partial void ProcessGetDocumentByIdResponseContent( __exception_404 = __ex; } - throw new global::JasperAI.ApiException( + + throw global::JasperAI.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)); } // Internal server error. if ((int)__response.StatusCode == 500) @@ -389,18 +388,17 @@ partial void ProcessGetDocumentByIdResponseContent( __exception_500 = __ex; } - throw new global::JasperAI.ApiException( + + throw global::JasperAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, - statusCode: __response.StatusCode) - { - ResponseBody = __content_500, - ResponseObject = __value_500, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_500, + responseObject: __value_500, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -434,17 +432,15 @@ partial void ProcessGetDocumentByIdResponseContent( } catch (global::System.Exception __ex) { - throw new global::JasperAI.ApiException( + throw global::JasperAI.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 @@ -481,17 +477,15 @@ partial void ProcessGetDocumentByIdResponseContent( { } - throw new global::JasperAI.ApiException( + throw global::JasperAI.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/JasperAI/Generated/JasperAI.DocumentsClient.UpdateDocument.g.cs b/src/libs/JasperAI/Generated/JasperAI.DocumentsClient.UpdateDocument.g.cs index ac7f5d6..8a1a0d6 100644 --- a/src/libs/JasperAI/Generated/JasperAI.DocumentsClient.UpdateDocument.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.DocumentsClient.UpdateDocument.g.cs @@ -371,18 +371,17 @@ partial void ProcessUpdateDocumentResponseContent( __exception_400 = __ex; } - throw new global::JasperAI.ApiException( + + throw global::JasperAI.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)); } // Internal server error. if ((int)__response.StatusCode == 500) @@ -409,18 +408,17 @@ partial void ProcessUpdateDocumentResponseContent( __exception_500 = __ex; } - throw new global::JasperAI.ApiException( + + throw global::JasperAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, - statusCode: __response.StatusCode) - { - ResponseBody = __content_500, - ResponseObject = __value_500, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_500, + responseObject: __value_500, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -454,17 +452,15 @@ partial void ProcessUpdateDocumentResponseContent( } catch (global::System.Exception __ex) { - throw new global::JasperAI.ApiException( + throw global::JasperAI.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 @@ -501,17 +497,15 @@ partial void ProcessUpdateDocumentResponseContent( { } - throw new global::JasperAI.ApiException( + throw global::JasperAI.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/JasperAI/Generated/JasperAI.Exceptions.g.cs b/src/libs/JasperAI/Generated/JasperAI.Exceptions.g.cs index 3cc77e5..c891ee9 100644 --- a/src/libs/JasperAI/Generated/JasperAI.Exceptions.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.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::JasperAI.ApiException Create( + global::System.Net.HttpStatusCode statusCode, + string message, + global::System.Exception? innerException = null, + global::System.Collections.Generic.IDictionary>? responseHeaders = null) + { + return new global::JasperAI.ApiException(message, innerException, statusCode); + } + + /// + /// Convenience overload that constructs an with response body and headers populated. + /// + public static global::JasperAI.ApiException Create( + global::System.Net.HttpStatusCode statusCode, + string message, + global::System.Exception? innerException, + string? responseBody, + global::System.Collections.Generic.Dictionary>? responseHeaders) + { + var exception = global::JasperAI.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::JasperAI.ApiException Create( + global::System.Net.HttpStatusCode statusCode, + string message, + global::System.Exception? innerException = null, + global::System.Collections.Generic.IDictionary>? responseHeaders = null) + { + return new global::JasperAI.ApiException(message, innerException, statusCode); + } + + /// + /// Convenience overload that constructs an with response body, object, and headers populated. + /// + public static global::JasperAI.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::JasperAI.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/JasperAI/Generated/JasperAI.KnowledgeClient.DeleteKnowledgeDocument.g.cs b/src/libs/JasperAI/Generated/JasperAI.KnowledgeClient.DeleteKnowledgeDocument.g.cs index 673e33d..2e49084 100644 --- a/src/libs/JasperAI/Generated/JasperAI.KnowledgeClient.DeleteKnowledgeDocument.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.KnowledgeClient.DeleteKnowledgeDocument.g.cs @@ -344,18 +344,17 @@ await DeleteKnowledgeDocumentAsResponseAsync( __exception_404 = __ex; } - throw new global::JasperAI.ApiException( + + throw global::JasperAI.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)); } // Internal server error. if ((int)__response.StatusCode == 500) @@ -382,18 +381,17 @@ await DeleteKnowledgeDocumentAsResponseAsync( __exception_500 = __ex; } - throw new global::JasperAI.ApiException( + + throw global::JasperAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, - statusCode: __response.StatusCode) - { - ResponseBody = __content_500, - ResponseObject = __value_500, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_500, + responseObject: __value_500, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -420,17 +418,15 @@ await DeleteKnowledgeDocumentAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::JasperAI.ApiException( + throw global::JasperAI.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 +454,15 @@ await DeleteKnowledgeDocumentAsResponseAsync( { } - throw new global::JasperAI.ApiException( + throw global::JasperAI.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/JasperAI/Generated/JasperAI.KnowledgeClient.GetKnowledgeDocument.g.cs b/src/libs/JasperAI/Generated/JasperAI.KnowledgeClient.GetKnowledgeDocument.g.cs index 030e182..bfa46cf 100644 --- a/src/libs/JasperAI/Generated/JasperAI.KnowledgeClient.GetKnowledgeDocument.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.KnowledgeClient.GetKnowledgeDocument.g.cs @@ -351,18 +351,17 @@ partial void ProcessGetKnowledgeDocumentResponseContent( __exception_404 = __ex; } - throw new global::JasperAI.ApiException( + + throw global::JasperAI.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)); } // Internal server error. if ((int)__response.StatusCode == 500) @@ -389,18 +388,17 @@ partial void ProcessGetKnowledgeDocumentResponseContent( __exception_500 = __ex; } - throw new global::JasperAI.ApiException( + + throw global::JasperAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, - statusCode: __response.StatusCode) - { - ResponseBody = __content_500, - ResponseObject = __value_500, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_500, + responseObject: __value_500, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -434,17 +432,15 @@ partial void ProcessGetKnowledgeDocumentResponseContent( } catch (global::System.Exception __ex) { - throw new global::JasperAI.ApiException( + throw global::JasperAI.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 @@ -481,17 +477,15 @@ partial void ProcessGetKnowledgeDocumentResponseContent( { } - throw new global::JasperAI.ApiException( + throw global::JasperAI.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/JasperAI/Generated/JasperAI.KnowledgeClient.GetKnowledgeDocuments.g.cs b/src/libs/JasperAI/Generated/JasperAI.KnowledgeClient.GetKnowledgeDocuments.g.cs index d52c4f9..b9a6e3f 100644 --- a/src/libs/JasperAI/Generated/JasperAI.KnowledgeClient.GetKnowledgeDocuments.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.KnowledgeClient.GetKnowledgeDocuments.g.cs @@ -374,18 +374,17 @@ partial void ProcessGetKnowledgeDocumentsResponseContent( __exception_500 = __ex; } - throw new global::JasperAI.ApiException( + + throw global::JasperAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, - statusCode: __response.StatusCode) - { - ResponseBody = __content_500, - ResponseObject = __value_500, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_500, + responseObject: __value_500, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -419,17 +418,15 @@ partial void ProcessGetKnowledgeDocumentsResponseContent( } catch (global::System.Exception __ex) { - throw new global::JasperAI.ApiException( + throw global::JasperAI.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 @@ -466,17 +463,15 @@ partial void ProcessGetKnowledgeDocumentsResponseContent( { } - throw new global::JasperAI.ApiException( + throw global::JasperAI.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/JasperAI/Generated/JasperAI.KnowledgeClient.SearchKnowledge.g.cs b/src/libs/JasperAI/Generated/JasperAI.KnowledgeClient.SearchKnowledge.g.cs index 6449809..e1cf252 100644 --- a/src/libs/JasperAI/Generated/JasperAI.KnowledgeClient.SearchKnowledge.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.KnowledgeClient.SearchKnowledge.g.cs @@ -362,18 +362,17 @@ partial void ProcessSearchKnowledgeResponseContent( __exception_400 = __ex; } - throw new global::JasperAI.ApiException( + + throw global::JasperAI.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)); } // Internal server error. if ((int)__response.StatusCode == 500) @@ -400,18 +399,17 @@ partial void ProcessSearchKnowledgeResponseContent( __exception_500 = __ex; } - throw new global::JasperAI.ApiException( + + throw global::JasperAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, - statusCode: __response.StatusCode) - { - ResponseBody = __content_500, - ResponseObject = __value_500, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_500, + responseObject: __value_500, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -445,17 +443,15 @@ partial void ProcessSearchKnowledgeResponseContent( } catch (global::System.Exception __ex) { - throw new global::JasperAI.ApiException( + throw global::JasperAI.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 @@ -492,17 +488,15 @@ partial void ProcessSearchKnowledgeResponseContent( { } - throw new global::JasperAI.ApiException( + throw global::JasperAI.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/JasperAI/Generated/JasperAI.KnowledgeClient.UpdateKnowledgeDocument.g.cs b/src/libs/JasperAI/Generated/JasperAI.KnowledgeClient.UpdateKnowledgeDocument.g.cs index 3901fec..f4b10b7 100644 --- a/src/libs/JasperAI/Generated/JasperAI.KnowledgeClient.UpdateKnowledgeDocument.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.KnowledgeClient.UpdateKnowledgeDocument.g.cs @@ -371,18 +371,17 @@ partial void ProcessUpdateKnowledgeDocumentResponseContent( __exception_400 = __ex; } - throw new global::JasperAI.ApiException( + + throw global::JasperAI.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)); } // Internal server error. if ((int)__response.StatusCode == 500) @@ -409,18 +408,17 @@ partial void ProcessUpdateKnowledgeDocumentResponseContent( __exception_500 = __ex; } - throw new global::JasperAI.ApiException( + + throw global::JasperAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, - statusCode: __response.StatusCode) - { - ResponseBody = __content_500, - ResponseObject = __value_500, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_500, + responseObject: __value_500, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -454,17 +452,15 @@ partial void ProcessUpdateKnowledgeDocumentResponseContent( } catch (global::System.Exception __ex) { - throw new global::JasperAI.ApiException( + throw global::JasperAI.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 @@ -501,17 +497,15 @@ partial void ProcessUpdateKnowledgeDocumentResponseContent( { } - throw new global::JasperAI.ApiException( + throw global::JasperAI.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/JasperAI/Generated/JasperAI.KnowledgeClient.UploadKnowledgeDocument.g.cs b/src/libs/JasperAI/Generated/JasperAI.KnowledgeClient.UploadKnowledgeDocument.g.cs index 4aa83b2..dfe341e 100644 --- a/src/libs/JasperAI/Generated/JasperAI.KnowledgeClient.UploadKnowledgeDocument.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.KnowledgeClient.UploadKnowledgeDocument.g.cs @@ -435,18 +435,17 @@ request.Filename is null __exception_400 = __ex; } - throw new global::JasperAI.ApiException( + + throw global::JasperAI.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)); } // Internal server error. if ((int)__response.StatusCode == 500) @@ -473,18 +472,17 @@ request.Filename is null __exception_500 = __ex; } - throw new global::JasperAI.ApiException( + + throw global::JasperAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, - statusCode: __response.StatusCode) - { - ResponseBody = __content_500, - ResponseObject = __value_500, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_500, + responseObject: __value_500, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -518,17 +516,15 @@ request.Filename is null } catch (global::System.Exception __ex) { - throw new global::JasperAI.ApiException( + throw global::JasperAI.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 @@ -565,17 +561,15 @@ request.Filename is null { } - throw new global::JasperAI.ApiException( + throw global::JasperAI.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)); } } @@ -1048,18 +1042,17 @@ request.Filename is null __exception_400 = __ex; } - throw new global::JasperAI.ApiException( + + throw global::JasperAI.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)); } // Internal server error. if ((int)__response.StatusCode == 500) @@ -1086,18 +1079,17 @@ request.Filename is null __exception_500 = __ex; } - throw new global::JasperAI.ApiException( + + throw global::JasperAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, - statusCode: __response.StatusCode) - { - ResponseBody = __content_500, - ResponseObject = __value_500, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_500, + responseObject: __value_500, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -1127,17 +1119,15 @@ request.Filename is null } catch (global::System.Exception __ex) { - throw new global::JasperAI.ApiException( + throw global::JasperAI.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 @@ -1170,17 +1160,15 @@ request.Filename is null { } - throw new global::JasperAI.ApiException( + throw global::JasperAI.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)); } } @@ -1597,18 +1585,17 @@ request.Filename is null __exception_400 = __ex; } - throw new global::JasperAI.ApiException( + + throw global::JasperAI.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)); } // Internal server error. if ((int)__response.StatusCode == 500) @@ -1635,18 +1622,17 @@ request.Filename is null __exception_500 = __ex; } - throw new global::JasperAI.ApiException( + + throw global::JasperAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, - statusCode: __response.StatusCode) - { - ResponseBody = __content_500, - ResponseObject = __value_500, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_500, + responseObject: __value_500, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -1680,17 +1666,15 @@ request.Filename is null } catch (global::System.Exception __ex) { - throw new global::JasperAI.ApiException( + throw global::JasperAI.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 @@ -1727,17 +1711,15 @@ request.Filename is null { } - throw new global::JasperAI.ApiException( + throw global::JasperAI.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/JasperAI/Generated/JasperAI.StylesClient.GetStyleById.g.cs b/src/libs/JasperAI/Generated/JasperAI.StylesClient.GetStyleById.g.cs index 9114dca..84d0fc3 100644 --- a/src/libs/JasperAI/Generated/JasperAI.StylesClient.GetStyleById.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.StylesClient.GetStyleById.g.cs @@ -351,18 +351,17 @@ partial void ProcessGetStyleByIdResponseContent( __exception_404 = __ex; } - throw new global::JasperAI.ApiException( + + throw global::JasperAI.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)); } // Internal server error. if ((int)__response.StatusCode == 500) @@ -389,18 +388,17 @@ partial void ProcessGetStyleByIdResponseContent( __exception_500 = __ex; } - throw new global::JasperAI.ApiException( + + throw global::JasperAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, - statusCode: __response.StatusCode) - { - ResponseBody = __content_500, - ResponseObject = __value_500, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_500, + responseObject: __value_500, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -434,17 +432,15 @@ partial void ProcessGetStyleByIdResponseContent( } catch (global::System.Exception __ex) { - throw new global::JasperAI.ApiException( + throw global::JasperAI.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 @@ -481,17 +477,15 @@ partial void ProcessGetStyleByIdResponseContent( { } - throw new global::JasperAI.ApiException( + throw global::JasperAI.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/JasperAI/Generated/JasperAI.StylesClient.GetStyles.g.cs b/src/libs/JasperAI/Generated/JasperAI.StylesClient.GetStyles.g.cs index e1ca7ef..05a6407 100644 --- a/src/libs/JasperAI/Generated/JasperAI.StylesClient.GetStyles.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.StylesClient.GetStyles.g.cs @@ -342,18 +342,17 @@ partial void ProcessGetStylesResponseContent( __exception_500 = __ex; } - throw new global::JasperAI.ApiException( + + throw global::JasperAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, - statusCode: __response.StatusCode) - { - ResponseBody = __content_500, - ResponseObject = __value_500, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_500, + responseObject: __value_500, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -387,17 +386,15 @@ partial void ProcessGetStylesResponseContent( } catch (global::System.Exception __ex) { - throw new global::JasperAI.ApiException( + throw global::JasperAI.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 @@ -434,17 +431,15 @@ partial void ProcessGetStylesResponseContent( { } - throw new global::JasperAI.ApiException( + throw global::JasperAI.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/JasperAI/Generated/JasperAI.TasksClient.GetTaskById.g.cs b/src/libs/JasperAI/Generated/JasperAI.TasksClient.GetTaskById.g.cs index 0d62901..974a9e5 100644 --- a/src/libs/JasperAI/Generated/JasperAI.TasksClient.GetTaskById.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.TasksClient.GetTaskById.g.cs @@ -363,18 +363,17 @@ partial void ProcessGetTaskByIdResponseContent( __exception_404 = __ex; } - throw new global::JasperAI.ApiException( + + throw global::JasperAI.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)); } // Internal server error. if ((int)__response.StatusCode == 500) @@ -401,18 +400,17 @@ partial void ProcessGetTaskByIdResponseContent( __exception_500 = __ex; } - throw new global::JasperAI.ApiException( + + throw global::JasperAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, - statusCode: __response.StatusCode) - { - ResponseBody = __content_500, - ResponseObject = __value_500, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_500, + responseObject: __value_500, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -446,17 +444,15 @@ partial void ProcessGetTaskByIdResponseContent( } catch (global::System.Exception __ex) { - throw new global::JasperAI.ApiException( + throw global::JasperAI.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 @@ -493,17 +489,15 @@ partial void ProcessGetTaskByIdResponseContent( { } - throw new global::JasperAI.ApiException( + throw global::JasperAI.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/JasperAI/Generated/JasperAI.TasksClient.ListTasks.g.cs b/src/libs/JasperAI/Generated/JasperAI.TasksClient.ListTasks.g.cs index de5601f..c44748b 100644 --- a/src/libs/JasperAI/Generated/JasperAI.TasksClient.ListTasks.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.TasksClient.ListTasks.g.cs @@ -420,18 +420,17 @@ partial void ProcessListTasksResponseContent( __exception_500 = __ex; } - throw new global::JasperAI.ApiException( + + throw global::JasperAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, - statusCode: __response.StatusCode) - { - ResponseBody = __content_500, - ResponseObject = __value_500, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_500, + responseObject: __value_500, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -465,17 +464,15 @@ partial void ProcessListTasksResponseContent( } catch (global::System.Exception __ex) { - throw new global::JasperAI.ApiException( + throw global::JasperAI.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 @@ -512,17 +509,15 @@ partial void ProcessListTasksResponseContent( { } - throw new global::JasperAI.ApiException( + throw global::JasperAI.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/JasperAI/Generated/JasperAI.TasksClient.RunTask.g.cs b/src/libs/JasperAI/Generated/JasperAI.TasksClient.RunTask.g.cs index e5e986c..3f50007 100644 --- a/src/libs/JasperAI/Generated/JasperAI.TasksClient.RunTask.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.TasksClient.RunTask.g.cs @@ -371,18 +371,17 @@ partial void ProcessRunTaskResponseContent( __exception_400 = __ex; } - throw new global::JasperAI.ApiException( + + throw global::JasperAI.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)); } // Agent task not found. if ((int)__response.StatusCode == 404) @@ -409,18 +408,17 @@ partial void ProcessRunTaskResponseContent( __exception_404 = __ex; } - throw new global::JasperAI.ApiException( + + throw global::JasperAI.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)); } // Internal server error. if ((int)__response.StatusCode == 500) @@ -447,18 +445,17 @@ partial void ProcessRunTaskResponseContent( __exception_500 = __ex; } - throw new global::JasperAI.ApiException( + + throw global::JasperAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, - statusCode: __response.StatusCode) - { - ResponseBody = __content_500, - ResponseObject = __value_500, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_500, + responseObject: __value_500, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -492,17 +489,15 @@ partial void ProcessRunTaskResponseContent( } catch (global::System.Exception __ex) { - throw new global::JasperAI.ApiException( + throw global::JasperAI.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 @@ -539,17 +534,15 @@ partial void ProcessRunTaskResponseContent( { } - throw new global::JasperAI.ApiException( + throw global::JasperAI.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/JasperAI/Generated/JasperAI.UsageClient.GetUsage.g.cs b/src/libs/JasperAI/Generated/JasperAI.UsageClient.GetUsage.g.cs index 7b6d554..0a33ba6 100644 --- a/src/libs/JasperAI/Generated/JasperAI.UsageClient.GetUsage.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.UsageClient.GetUsage.g.cs @@ -342,18 +342,17 @@ partial void ProcessGetUsageResponseContent( __exception_500 = __ex; } - throw new global::JasperAI.ApiException( + + throw global::JasperAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, - statusCode: __response.StatusCode) - { - ResponseBody = __content_500, - ResponseObject = __value_500, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_500, + responseObject: __value_500, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -387,17 +386,15 @@ partial void ProcessGetUsageResponseContent( } catch (global::System.Exception __ex) { - throw new global::JasperAI.ApiException( + throw global::JasperAI.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 @@ -434,17 +431,15 @@ partial void ProcessGetUsageResponseContent( { } - throw new global::JasperAI.ApiException( + throw global::JasperAI.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/JasperAI/Generated/JasperAI.UsersClient.GetAllUsers.g.cs b/src/libs/JasperAI/Generated/JasperAI.UsersClient.GetAllUsers.g.cs index 0f17af2..65e55af 100644 --- a/src/libs/JasperAI/Generated/JasperAI.UsersClient.GetAllUsers.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.UsersClient.GetAllUsers.g.cs @@ -364,18 +364,17 @@ partial void ProcessGetAllUsersResponseContent( __exception_500 = __ex; } - throw new global::JasperAI.ApiException( + + throw global::JasperAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, - statusCode: __response.StatusCode) - { - ResponseBody = __content_500, - ResponseObject = __value_500, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_500, + responseObject: __value_500, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -409,17 +408,15 @@ partial void ProcessGetAllUsersResponseContent( } catch (global::System.Exception __ex) { - throw new global::JasperAI.ApiException( + throw global::JasperAI.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 @@ -456,17 +453,15 @@ partial void ProcessGetAllUsersResponseContent( { } - throw new global::JasperAI.ApiException( + throw global::JasperAI.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/JasperAI/Generated/JasperAI.UsersClient.GetUser.g.cs b/src/libs/JasperAI/Generated/JasperAI.UsersClient.GetUser.g.cs index b9af4a0..37902bf 100644 --- a/src/libs/JasperAI/Generated/JasperAI.UsersClient.GetUser.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.UsersClient.GetUser.g.cs @@ -351,18 +351,17 @@ partial void ProcessGetUserResponseContent( __exception_404 = __ex; } - throw new global::JasperAI.ApiException( + + throw global::JasperAI.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)); } // Internal server error. if ((int)__response.StatusCode == 500) @@ -389,18 +388,17 @@ partial void ProcessGetUserResponseContent( __exception_500 = __ex; } - throw new global::JasperAI.ApiException( + + throw global::JasperAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, - statusCode: __response.StatusCode) - { - ResponseBody = __content_500, - ResponseObject = __value_500, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_500, + responseObject: __value_500, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -434,17 +432,15 @@ partial void ProcessGetUserResponseContent( } catch (global::System.Exception __ex) { - throw new global::JasperAI.ApiException( + throw global::JasperAI.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 @@ -481,17 +477,15 @@ partial void ProcessGetUserResponseContent( { } - throw new global::JasperAI.ApiException( + throw global::JasperAI.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/JasperAI/Generated/JasperAI.VoicesClient.CreateTone.g.cs b/src/libs/JasperAI/Generated/JasperAI.VoicesClient.CreateTone.g.cs index ffd1559..a960f73 100644 --- a/src/libs/JasperAI/Generated/JasperAI.VoicesClient.CreateTone.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.VoicesClient.CreateTone.g.cs @@ -362,18 +362,17 @@ partial void ProcessCreateToneResponseContent( __exception_400 = __ex; } - throw new global::JasperAI.ApiException( + + throw global::JasperAI.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)); } // Internal server error. if ((int)__response.StatusCode == 500) @@ -400,18 +399,17 @@ partial void ProcessCreateToneResponseContent( __exception_500 = __ex; } - throw new global::JasperAI.ApiException( + + throw global::JasperAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, - statusCode: __response.StatusCode) - { - ResponseBody = __content_500, - ResponseObject = __value_500, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_500, + responseObject: __value_500, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -445,17 +443,15 @@ partial void ProcessCreateToneResponseContent( } catch (global::System.Exception __ex) { - throw new global::JasperAI.ApiException( + throw global::JasperAI.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 @@ -492,17 +488,15 @@ partial void ProcessCreateToneResponseContent( { } - throw new global::JasperAI.ApiException( + throw global::JasperAI.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/JasperAI/Generated/JasperAI.VoicesClient.DeleteTone.g.cs b/src/libs/JasperAI/Generated/JasperAI.VoicesClient.DeleteTone.g.cs index ff0ea8a..d33d9ed 100644 --- a/src/libs/JasperAI/Generated/JasperAI.VoicesClient.DeleteTone.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.VoicesClient.DeleteTone.g.cs @@ -344,18 +344,17 @@ await DeleteToneAsResponseAsync( __exception_404 = __ex; } - throw new global::JasperAI.ApiException( + + throw global::JasperAI.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)); } // Internal server error. if ((int)__response.StatusCode == 500) @@ -382,18 +381,17 @@ await DeleteToneAsResponseAsync( __exception_500 = __ex; } - throw new global::JasperAI.ApiException( + + throw global::JasperAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, - statusCode: __response.StatusCode) - { - ResponseBody = __content_500, - ResponseObject = __value_500, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_500, + responseObject: __value_500, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -420,17 +418,15 @@ await DeleteToneAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::JasperAI.ApiException( + throw global::JasperAI.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 +454,15 @@ await DeleteToneAsResponseAsync( { } - throw new global::JasperAI.ApiException( + throw global::JasperAI.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/JasperAI/Generated/JasperAI.VoicesClient.GetAllTones.g.cs b/src/libs/JasperAI/Generated/JasperAI.VoicesClient.GetAllTones.g.cs index 6f5019f..3d2ad50 100644 --- a/src/libs/JasperAI/Generated/JasperAI.VoicesClient.GetAllTones.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.VoicesClient.GetAllTones.g.cs @@ -342,18 +342,17 @@ partial void ProcessGetAllTonesResponseContent( __exception_500 = __ex; } - throw new global::JasperAI.ApiException( + + throw global::JasperAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, - statusCode: __response.StatusCode) - { - ResponseBody = __content_500, - ResponseObject = __value_500, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_500, + responseObject: __value_500, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -387,17 +386,15 @@ partial void ProcessGetAllTonesResponseContent( } catch (global::System.Exception __ex) { - throw new global::JasperAI.ApiException( + throw global::JasperAI.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 @@ -434,17 +431,15 @@ partial void ProcessGetAllTonesResponseContent( { } - throw new global::JasperAI.ApiException( + throw global::JasperAI.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/JasperAI/Generated/JasperAI.VoicesClient.GetTone.g.cs b/src/libs/JasperAI/Generated/JasperAI.VoicesClient.GetTone.g.cs index cd42051..2006881 100644 --- a/src/libs/JasperAI/Generated/JasperAI.VoicesClient.GetTone.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.VoicesClient.GetTone.g.cs @@ -351,18 +351,17 @@ partial void ProcessGetToneResponseContent( __exception_404 = __ex; } - throw new global::JasperAI.ApiException( + + throw global::JasperAI.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)); } // Internal server error. if ((int)__response.StatusCode == 500) @@ -389,18 +388,17 @@ partial void ProcessGetToneResponseContent( __exception_500 = __ex; } - throw new global::JasperAI.ApiException( + + throw global::JasperAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, - statusCode: __response.StatusCode) - { - ResponseBody = __content_500, - ResponseObject = __value_500, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_500, + responseObject: __value_500, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -434,17 +432,15 @@ partial void ProcessGetToneResponseContent( } catch (global::System.Exception __ex) { - throw new global::JasperAI.ApiException( + throw global::JasperAI.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 @@ -481,17 +477,15 @@ partial void ProcessGetToneResponseContent( { } - throw new global::JasperAI.ApiException( + throw global::JasperAI.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/JasperAI/Generated/JasperAI.VoicesClient.UpdateTone.g.cs b/src/libs/JasperAI/Generated/JasperAI.VoicesClient.UpdateTone.g.cs index 5ee9214..a12a274 100644 --- a/src/libs/JasperAI/Generated/JasperAI.VoicesClient.UpdateTone.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.VoicesClient.UpdateTone.g.cs @@ -371,18 +371,17 @@ partial void ProcessUpdateToneResponseContent( __exception_400 = __ex; } - throw new global::JasperAI.ApiException( + + throw global::JasperAI.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)); } // Internal server error. if ((int)__response.StatusCode == 500) @@ -409,18 +408,17 @@ partial void ProcessUpdateToneResponseContent( __exception_500 = __ex; } - throw new global::JasperAI.ApiException( + + throw global::JasperAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, - statusCode: __response.StatusCode) - { - ResponseBody = __content_500, - ResponseObject = __value_500, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_500, + responseObject: __value_500, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -454,17 +452,15 @@ partial void ProcessUpdateToneResponseContent( } catch (global::System.Exception __ex) { - throw new global::JasperAI.ApiException( + throw global::JasperAI.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 @@ -501,17 +497,15 @@ partial void ProcessUpdateToneResponseContent( { } - throw new global::JasperAI.ApiException( + throw global::JasperAI.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)); } }