From 0412b3ed836463075ecfcf6f59757636fc456614 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 24 May 2026 03:53:59 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- ...edbread.AdminClient.ReingestAllStores.g.cs | 39 +++-- ...Mixedbread.ApiKeysClient.CreateApiKey.g.cs | 39 +++-- ...Mixedbread.ApiKeysClient.DeleteApiKey.g.cs | 39 +++-- .../Mixedbread.ApiKeysClient.ListApiKeys.g.cs | 39 +++-- ...Mixedbread.ApiKeysClient.RerollApiKey.g.cs | 39 +++-- ...xedbread.ApiKeysClient.RetrieveApiKey.g.cs | 39 +++-- ...Mixedbread.ApiKeysClient.RevokeApiKey.g.cs | 39 +++-- ...Mixedbread.ApiKeysClient.UpdateApiKey.g.cs | 39 +++-- ...bread.BillingClient.GetBillingSummary.g.cs | 24 ++-- ...BillingClient.GetParsingCostHistogram.g.cs | 24 ++-- ...d.BillingClient.GetStoreCostHistogram.g.cs | 39 +++-- ...bread.BillingClient.ListStoreCostInfo.g.cs | 24 ++-- ...ompletionsClient.CreateChatCompletion.g.cs | 24 ++-- ...DataSourcesClient.AuthorizeDataSource.g.cs | 39 +++-- ...ead.DataSourcesClient.CreateConnector.g.cs | 39 +++-- ...ad.DataSourcesClient.CreateDataSource.g.cs | 39 +++-- ...ead.DataSourcesClient.DeleteConnector.g.cs | 39 +++-- ...ad.DataSourcesClient.DeleteDataSource.g.cs | 39 +++-- ...dbread.DataSourcesClient.GetConnector.g.cs | 39 +++-- ...bread.DataSourcesClient.GetDataSource.g.cs | 39 +++-- ...read.DataSourcesClient.ListConnectors.g.cs | 39 +++-- ...ead.DataSourcesClient.ListDataSources.g.cs | 39 +++-- ...read.DataSourcesClient.Oauth2Callback.g.cs | 80 +++++------ ...ead.DataSourcesClient.UpdateConnector.g.cs | 39 +++-- ...ad.DataSourcesClient.UpdateDataSource.g.cs | 39 +++-- .../Generated/Mixedbread.Exceptions.g.cs | 134 ++++++++++++++++++ ...ExtractionsClient.CreateExtractionJob.g.cs | 39 +++-- ...dbread.ExtractionsClient.CreateSchema.g.cs | 39 +++-- ...bread.ExtractionsClient.EnhanceSchema.g.cs | 39 +++-- ...read.ExtractionsClient.ExtractContent.g.cs | 39 +++-- ...tractionsClient.RetrieveExtractionJob.g.cs | 39 +++-- ...read.ExtractionsClient.ValidateSchema.g.cs | 39 +++-- ...read.FilesClient.AbortMultipartUpload.g.cs | 39 +++-- ...d.FilesClient.CompleteMultipartUpload.g.cs | 39 +++-- .../Mixedbread.FilesClient.CreateFile.g.cs | 117 +++++++-------- ...ead.FilesClient.CreateMultipartUpload.g.cs | 39 +++-- .../Mixedbread.FilesClient.DeleteFile.g.cs | 39 +++-- .../Mixedbread.FilesClient.DownloadFile.g.cs | 65 ++++----- ...dbread.FilesClient.GetMultipartUpload.g.cs | 39 +++-- .../Mixedbread.FilesClient.ListFiles.g.cs | 39 +++-- ...read.FilesClient.ListMultipartUploads.g.cs | 24 ++-- .../Mixedbread.FilesClient.RetrieveFile.g.cs | 39 +++-- .../Mixedbread.FilesClient.UpdateFile.g.cs | 117 +++++++-------- ...ead.MixedbreadClient.CreateEmbeddings.g.cs | 39 +++-- .../Mixedbread.MixedbreadClient.Info.g.cs | 39 +++-- .../Mixedbread.MixedbreadClient.Rerank.g.cs | 39 +++-- ...dbread.ParsingClient.CancelParsingJob.g.cs | 39 +++-- ...dbread.ParsingClient.CreateParsingJob.g.cs | 39 +++-- ...dbread.ParsingClient.DeleteParsingJob.g.cs | 39 +++-- ...edbread.ParsingClient.ListParsingJobs.g.cs | 39 +++-- ...read.ParsingClient.RetrieveParsingJob.g.cs | 39 +++-- ...read.SchemasClient.GetMxbaiJsonSchema.g.cs | 24 ++-- ....StoresClient.CreateQuestionAnswering.g.cs | 39 +++-- ...edbread.StoresClient.CreateSearchRule.g.cs | 39 +++-- .../Mixedbread.StoresClient.CreateStore.g.cs | 39 +++-- ...xedbread.StoresClient.CreateStoreFile.g.cs | 39 +++-- ...edbread.StoresClient.DeleteSearchRule.g.cs | 39 +++-- ...StoresClient.DeleteSpecificSearchRule.g.cs | 39 +++-- .../Mixedbread.StoresClient.DeleteStore.g.cs | 39 +++-- ...xedbread.StoresClient.DeleteStoreFile.g.cs | 39 +++-- .../Mixedbread.StoresClient.EnhanceQuery.g.cs | 39 +++-- ...dbread.StoresClient.GetMetadataFacets.g.cs | 39 +++-- ...d.StoresClient.GetStoreEventHistogram.g.cs | 39 +++-- ...xedbread.StoresClient.GrepStoreChunks.g.cs | 39 +++-- ...xedbread.StoresClient.ListStoreChunks.g.cs | 39 +++-- ...xedbread.StoresClient.ListStoreEvents.g.cs | 39 +++-- ...ient.ListStoreFilesWithMetadataFilter.g.cs | 39 +++-- .../Mixedbread.StoresClient.ListStores.g.cs | 39 +++-- ...bread.StoresClient.RetrieveSearchRule.g.cs | 39 +++-- ...Mixedbread.StoresClient.RetrieveStore.g.cs | 39 +++-- ...dbread.StoresClient.RetrieveStoreFile.g.cs | 39 +++-- ...dbread.StoresClient.SearchStoreChunks.g.cs | 39 +++-- ...edbread.StoresClient.UpdateSearchRule.g.cs | 39 +++-- .../Mixedbread.StoresClient.UpdateStore.g.cs | 39 +++-- ...xedbread.StoresClient.UpdateStoreFile.g.cs | 39 +++-- ...xedbread.StoresClient.UploadStoreFile.g.cs | 117 +++++++-------- 76 files changed, 1500 insertions(+), 1770 deletions(-) diff --git a/src/libs/Mixedbread/Generated/Mixedbread.AdminClient.ReingestAllStores.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.AdminClient.ReingestAllStores.g.cs index 7801219..8526912 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.AdminClient.ReingestAllStores.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.AdminClient.ReingestAllStores.g.cs @@ -423,18 +423,17 @@ partial void ProcessReingestAllStoresResponseContent( __exception_422 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -466,17 +465,15 @@ partial void ProcessReingestAllStoresResponseContent( } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -511,17 +508,15 @@ partial void ProcessReingestAllStoresResponseContent( { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Mixedbread/Generated/Mixedbread.ApiKeysClient.CreateApiKey.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.CreateApiKey.g.cs index fe4aa7d..21672a4 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.CreateApiKey.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.CreateApiKey.g.cs @@ -395,18 +395,17 @@ partial void ProcessCreateApiKeyResponseContent( __exception_422 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -440,17 +439,15 @@ partial void ProcessCreateApiKeyResponseContent( } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -487,17 +484,15 @@ partial void ProcessCreateApiKeyResponseContent( { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Mixedbread/Generated/Mixedbread.ApiKeysClient.DeleteApiKey.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.DeleteApiKey.g.cs index e23634d..4d20242 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.DeleteApiKey.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.DeleteApiKey.g.cs @@ -388,18 +388,17 @@ partial void ProcessDeleteApiKeyResponseContent( __exception_422 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -433,17 +432,15 @@ partial void ProcessDeleteApiKeyResponseContent( } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -480,17 +477,15 @@ partial void ProcessDeleteApiKeyResponseContent( { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Mixedbread/Generated/Mixedbread.ApiKeysClient.ListApiKeys.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.ListApiKeys.g.cs index 01cf546..08caa02 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.ListApiKeys.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.ListApiKeys.g.cs @@ -409,18 +409,17 @@ partial void ProcessListApiKeysResponseContent( __exception_422 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -454,17 +453,15 @@ partial void ProcessListApiKeysResponseContent( } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 +498,15 @@ partial void ProcessListApiKeysResponseContent( { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Mixedbread/Generated/Mixedbread.ApiKeysClient.RerollApiKey.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.RerollApiKey.g.cs index 5986cfd..415f3a2 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.RerollApiKey.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.RerollApiKey.g.cs @@ -390,18 +390,17 @@ partial void ProcessRerollApiKeyResponseContent( __exception_422 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -435,17 +434,15 @@ partial void ProcessRerollApiKeyResponseContent( } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -482,17 +479,15 @@ partial void ProcessRerollApiKeyResponseContent( { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Mixedbread/Generated/Mixedbread.ApiKeysClient.RetrieveApiKey.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.RetrieveApiKey.g.cs index b74d0ea..7777911 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.RetrieveApiKey.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.RetrieveApiKey.g.cs @@ -388,18 +388,17 @@ partial void ProcessRetrieveApiKeyResponseContent( __exception_422 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -433,17 +432,15 @@ partial void ProcessRetrieveApiKeyResponseContent( } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -480,17 +477,15 @@ partial void ProcessRetrieveApiKeyResponseContent( { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Mixedbread/Generated/Mixedbread.ApiKeysClient.RevokeApiKey.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.RevokeApiKey.g.cs index 5ece23f..7ba00f2 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.RevokeApiKey.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.RevokeApiKey.g.cs @@ -388,18 +388,17 @@ partial void ProcessRevokeApiKeyResponseContent( __exception_422 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -433,17 +432,15 @@ partial void ProcessRevokeApiKeyResponseContent( } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -480,17 +477,15 @@ partial void ProcessRevokeApiKeyResponseContent( { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Mixedbread/Generated/Mixedbread.ApiKeysClient.UpdateApiKey.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.UpdateApiKey.g.cs index 298f54a..555feab 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.UpdateApiKey.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.UpdateApiKey.g.cs @@ -410,18 +410,17 @@ partial void ProcessUpdateApiKeyResponseContent( __exception_422 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -455,17 +454,15 @@ partial void ProcessUpdateApiKeyResponseContent( } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -502,17 +499,15 @@ partial void ProcessUpdateApiKeyResponseContent( { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Mixedbread/Generated/Mixedbread.BillingClient.GetBillingSummary.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.BillingClient.GetBillingSummary.g.cs index 4c1e253..71a3ef2 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.BillingClient.GetBillingSummary.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.BillingClient.GetBillingSummary.g.cs @@ -372,17 +372,15 @@ partial void ProcessGetBillingSummaryResponseContent( } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -419,17 +417,15 @@ partial void ProcessGetBillingSummaryResponseContent( { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Mixedbread/Generated/Mixedbread.BillingClient.GetParsingCostHistogram.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.BillingClient.GetParsingCostHistogram.g.cs index 87aa7dd..cee7f4b 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.BillingClient.GetParsingCostHistogram.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.BillingClient.GetParsingCostHistogram.g.cs @@ -372,17 +372,15 @@ partial void ProcessGetParsingCostHistogramResponseContent( } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -419,17 +417,15 @@ partial void ProcessGetParsingCostHistogramResponseContent( { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Mixedbread/Generated/Mixedbread.BillingClient.GetStoreCostHistogram.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.BillingClient.GetStoreCostHistogram.g.cs index 28ce269..bf014ee 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.BillingClient.GetStoreCostHistogram.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.BillingClient.GetStoreCostHistogram.g.cs @@ -378,18 +378,17 @@ partial void ProcessGetStoreCostHistogramResponseContent( __exception_422 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -423,17 +422,15 @@ partial void ProcessGetStoreCostHistogramResponseContent( } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -470,17 +467,15 @@ partial void ProcessGetStoreCostHistogramResponseContent( { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Mixedbread/Generated/Mixedbread.BillingClient.ListStoreCostInfo.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.BillingClient.ListStoreCostInfo.g.cs index 5873336..92b820e 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.BillingClient.ListStoreCostInfo.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.BillingClient.ListStoreCostInfo.g.cs @@ -372,17 +372,15 @@ partial void ProcessListStoreCostInfoResponseContent( } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -419,17 +417,15 @@ partial void ProcessListStoreCostInfoResponseContent( { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Mixedbread/Generated/Mixedbread.CompletionsClient.CreateChatCompletion.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.CompletionsClient.CreateChatCompletion.g.cs index aa47ecc..e5a4a8d 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.CompletionsClient.CreateChatCompletion.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.CompletionsClient.CreateChatCompletion.g.cs @@ -392,17 +392,15 @@ partial void ProcessCreateChatCompletionResponseContent( } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 ProcessCreateChatCompletionResponseContent( { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Mixedbread/Generated/Mixedbread.DataSourcesClient.AuthorizeDataSource.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.AuthorizeDataSource.g.cs index 829cdda..5a66542 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.AuthorizeDataSource.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.AuthorizeDataSource.g.cs @@ -400,18 +400,17 @@ partial void ProcessAuthorizeDataSourceResponseContent( __exception_422 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -443,17 +442,15 @@ partial void ProcessAuthorizeDataSourceResponseContent( } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -488,17 +485,15 @@ partial void ProcessAuthorizeDataSourceResponseContent( { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Mixedbread/Generated/Mixedbread.DataSourcesClient.CreateConnector.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.CreateConnector.g.cs index f5ab10e..73b1562 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.CreateConnector.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.CreateConnector.g.cs @@ -410,18 +410,17 @@ partial void ProcessCreateConnectorResponseContent( __exception_422 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -455,17 +454,15 @@ partial void ProcessCreateConnectorResponseContent( } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -502,17 +499,15 @@ partial void ProcessCreateConnectorResponseContent( { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Mixedbread/Generated/Mixedbread.DataSourcesClient.CreateDataSource.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.CreateDataSource.g.cs index aa9229f..16995e1 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.CreateDataSource.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.CreateDataSource.g.cs @@ -393,18 +393,17 @@ partial void ProcessCreateDataSourceResponseContent( __exception_422 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -438,17 +437,15 @@ partial void ProcessCreateDataSourceResponseContent( } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -485,17 +482,15 @@ partial void ProcessCreateDataSourceResponseContent( { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Mixedbread/Generated/Mixedbread.DataSourcesClient.DeleteConnector.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.DeleteConnector.g.cs index 07814a5..9ba7982 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.DeleteConnector.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.DeleteConnector.g.cs @@ -403,18 +403,17 @@ partial void ProcessDeleteConnectorResponseContent( __exception_422 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -448,17 +447,15 @@ partial void ProcessDeleteConnectorResponseContent( } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -495,17 +492,15 @@ partial void ProcessDeleteConnectorResponseContent( { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Mixedbread/Generated/Mixedbread.DataSourcesClient.DeleteDataSource.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.DeleteDataSource.g.cs index 446ac09..76b9fba 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.DeleteDataSource.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.DeleteDataSource.g.cs @@ -384,18 +384,17 @@ partial void ProcessDeleteDataSourceResponseContent( __exception_422 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -429,17 +428,15 @@ partial void ProcessDeleteDataSourceResponseContent( } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 +473,15 @@ partial void ProcessDeleteDataSourceResponseContent( { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Mixedbread/Generated/Mixedbread.DataSourcesClient.GetConnector.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.GetConnector.g.cs index 1d1ac69..f3d6f74 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.GetConnector.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.GetConnector.g.cs @@ -403,18 +403,17 @@ partial void ProcessGetConnectorResponseContent( __exception_422 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -448,17 +447,15 @@ partial void ProcessGetConnectorResponseContent( } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -495,17 +492,15 @@ partial void ProcessGetConnectorResponseContent( { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Mixedbread/Generated/Mixedbread.DataSourcesClient.GetDataSource.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.GetDataSource.g.cs index dd7a4c7..5b6f89d 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.GetDataSource.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.GetDataSource.g.cs @@ -388,18 +388,17 @@ partial void ProcessGetDataSourceResponseContent( __exception_422 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -433,17 +432,15 @@ partial void ProcessGetDataSourceResponseContent( } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -480,17 +477,15 @@ partial void ProcessGetDataSourceResponseContent( { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Mixedbread/Generated/Mixedbread.DataSourcesClient.ListConnectors.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.ListConnectors.g.cs index 8fc6db9..da0e844 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.ListConnectors.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.ListConnectors.g.cs @@ -452,18 +452,17 @@ partial void ProcessListConnectorsResponseContent( __exception_422 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -497,17 +496,15 @@ partial void ProcessListConnectorsResponseContent( } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -544,17 +541,15 @@ partial void ProcessListConnectorsResponseContent( { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Mixedbread/Generated/Mixedbread.DataSourcesClient.ListDataSources.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.ListDataSources.g.cs index 784d133..fd58890 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.ListDataSources.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.ListDataSources.g.cs @@ -433,18 +433,17 @@ partial void ProcessListDataSourcesResponseContent( __exception_422 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -478,17 +477,15 @@ partial void ProcessListDataSourcesResponseContent( } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -525,17 +522,15 @@ partial void ProcessListDataSourcesResponseContent( { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Mixedbread/Generated/Mixedbread.DataSourcesClient.Oauth2Callback.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.Oauth2Callback.g.cs index dbf887c..345ee6f 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.Oauth2Callback.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.Oauth2Callback.g.cs @@ -444,18 +444,17 @@ await Oauth2CallbackAsResponseAsync( __exception_307 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_307 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_307, - statusCode: __response.StatusCode) - { - ResponseBody = __content_307, - ResponseObject = __value_307, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_307, + responseObject: __value_307, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // if ((int)__response.StatusCode == 400) @@ -478,17 +477,16 @@ await Oauth2CallbackAsResponseAsync( __exception_400 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // if ((int)__response.StatusCode == 404) @@ -511,17 +509,16 @@ await Oauth2CallbackAsResponseAsync( __exception_404 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Validation Error if ((int)__response.StatusCode == 422) @@ -548,18 +545,17 @@ await Oauth2CallbackAsResponseAsync( __exception_422 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -586,17 +582,15 @@ await Oauth2CallbackAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -624,17 +618,15 @@ await Oauth2CallbackAsResponseAsync( { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Mixedbread/Generated/Mixedbread.DataSourcesClient.UpdateConnector.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.UpdateConnector.g.cs index 13dc110..3a03456 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.UpdateConnector.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.UpdateConnector.g.cs @@ -425,18 +425,17 @@ partial void ProcessUpdateConnectorResponseContent( __exception_422 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -470,17 +469,15 @@ partial void ProcessUpdateConnectorResponseContent( } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -517,17 +514,15 @@ partial void ProcessUpdateConnectorResponseContent( { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Mixedbread/Generated/Mixedbread.DataSourcesClient.UpdateDataSource.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.UpdateDataSource.g.cs index d41d9f8..ae08100 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.UpdateDataSource.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.UpdateDataSource.g.cs @@ -408,18 +408,17 @@ partial void ProcessUpdateDataSourceResponseContent( __exception_422 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -453,17 +452,15 @@ partial void ProcessUpdateDataSourceResponseContent( } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -500,17 +497,15 @@ partial void ProcessUpdateDataSourceResponseContent( { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Mixedbread/Generated/Mixedbread.Exceptions.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.Exceptions.g.cs index ed93c38..d8d0d0f 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.Exceptions.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.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::Mixedbread.ApiException Create( + global::System.Net.HttpStatusCode statusCode, + string message, + global::System.Exception? innerException = null, + global::System.Collections.Generic.IDictionary>? responseHeaders = null) + { + return new global::Mixedbread.ApiException(message, innerException, statusCode); + } + + /// + /// Convenience overload that constructs an with response body and headers populated. + /// + public static global::Mixedbread.ApiException Create( + global::System.Net.HttpStatusCode statusCode, + string message, + global::System.Exception? innerException, + string? responseBody, + global::System.Collections.Generic.Dictionary>? responseHeaders) + { + var exception = global::Mixedbread.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::Mixedbread.ApiException Create( + global::System.Net.HttpStatusCode statusCode, + string message, + global::System.Exception? innerException = null, + global::System.Collections.Generic.IDictionary>? responseHeaders = null) + { + return new global::Mixedbread.ApiException(message, innerException, statusCode); + } + + /// + /// Convenience overload that constructs an with response body, object, and headers populated. + /// + public static global::Mixedbread.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::Mixedbread.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/Mixedbread/Generated/Mixedbread.ExtractionsClient.CreateExtractionJob.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.ExtractionsClient.CreateExtractionJob.g.cs index 9f18f25..6f7b1d3 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.ExtractionsClient.CreateExtractionJob.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.ExtractionsClient.CreateExtractionJob.g.cs @@ -395,18 +395,17 @@ partial void ProcessCreateExtractionJobResponseContent( __exception_422 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -440,17 +439,15 @@ partial void ProcessCreateExtractionJobResponseContent( } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -487,17 +484,15 @@ partial void ProcessCreateExtractionJobResponseContent( { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Mixedbread/Generated/Mixedbread.ExtractionsClient.CreateSchema.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.ExtractionsClient.CreateSchema.g.cs index 4ecad71..3707678 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.ExtractionsClient.CreateSchema.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.ExtractionsClient.CreateSchema.g.cs @@ -395,18 +395,17 @@ partial void ProcessCreateSchemaResponseContent( __exception_422 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -440,17 +439,15 @@ partial void ProcessCreateSchemaResponseContent( } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -487,17 +484,15 @@ partial void ProcessCreateSchemaResponseContent( { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Mixedbread/Generated/Mixedbread.ExtractionsClient.EnhanceSchema.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.ExtractionsClient.EnhanceSchema.g.cs index c3ed4c0..84b91dc 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.ExtractionsClient.EnhanceSchema.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.ExtractionsClient.EnhanceSchema.g.cs @@ -395,18 +395,17 @@ partial void ProcessEnhanceSchemaResponseContent( __exception_422 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -440,17 +439,15 @@ partial void ProcessEnhanceSchemaResponseContent( } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -487,17 +484,15 @@ partial void ProcessEnhanceSchemaResponseContent( { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Mixedbread/Generated/Mixedbread.ExtractionsClient.ExtractContent.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.ExtractionsClient.ExtractContent.g.cs index bab3c75..5a8a036 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.ExtractionsClient.ExtractContent.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.ExtractionsClient.ExtractContent.g.cs @@ -395,18 +395,17 @@ partial void ProcessExtractContentResponseContent( __exception_422 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -440,17 +439,15 @@ partial void ProcessExtractContentResponseContent( } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -487,17 +484,15 @@ partial void ProcessExtractContentResponseContent( { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Mixedbread/Generated/Mixedbread.ExtractionsClient.RetrieveExtractionJob.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.ExtractionsClient.RetrieveExtractionJob.g.cs index 8725fde..55dd1ac 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.ExtractionsClient.RetrieveExtractionJob.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.ExtractionsClient.RetrieveExtractionJob.g.cs @@ -388,18 +388,17 @@ partial void ProcessRetrieveExtractionJobResponseContent( __exception_422 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -433,17 +432,15 @@ partial void ProcessRetrieveExtractionJobResponseContent( } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -480,17 +477,15 @@ partial void ProcessRetrieveExtractionJobResponseContent( { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Mixedbread/Generated/Mixedbread.ExtractionsClient.ValidateSchema.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.ExtractionsClient.ValidateSchema.g.cs index 4ceea4e..d263d4e 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.ExtractionsClient.ValidateSchema.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.ExtractionsClient.ValidateSchema.g.cs @@ -395,18 +395,17 @@ partial void ProcessValidateSchemaResponseContent( __exception_422 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -440,17 +439,15 @@ partial void ProcessValidateSchemaResponseContent( } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -487,17 +484,15 @@ partial void ProcessValidateSchemaResponseContent( { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Mixedbread/Generated/Mixedbread.FilesClient.AbortMultipartUpload.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.AbortMultipartUpload.g.cs index 2dd8be2..0a23249 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.AbortMultipartUpload.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.AbortMultipartUpload.g.cs @@ -380,18 +380,17 @@ partial void ProcessAbortMultipartUploadResponseContent( __exception_422 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -425,17 +424,15 @@ partial void ProcessAbortMultipartUploadResponseContent( } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -472,17 +469,15 @@ partial void ProcessAbortMultipartUploadResponseContent( { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Mixedbread/Generated/Mixedbread.FilesClient.CompleteMultipartUpload.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.CompleteMultipartUpload.g.cs index 71650ca..0f492d2 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.CompleteMultipartUpload.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.CompleteMultipartUpload.g.cs @@ -402,18 +402,17 @@ partial void ProcessCompleteMultipartUploadResponseContent( __exception_422 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -447,17 +446,15 @@ partial void ProcessCompleteMultipartUploadResponseContent( } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -494,17 +491,15 @@ partial void ProcessCompleteMultipartUploadResponseContent( { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Mixedbread/Generated/Mixedbread.FilesClient.CreateFile.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.CreateFile.g.cs index 9d49d33..a0c1628 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.CreateFile.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.CreateFile.g.cs @@ -431,18 +431,17 @@ request.Filename is null __exception_422 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -476,17 +475,15 @@ request.Filename is null } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -523,17 +520,15 @@ request.Filename is null { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } @@ -929,18 +924,17 @@ request.Filename is null __exception_422 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -970,17 +964,15 @@ request.Filename is null } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -1013,17 +1005,15 @@ request.Filename is null { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } @@ -1384,18 +1374,17 @@ request.Filename is null __exception_422 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -1429,17 +1418,15 @@ request.Filename is null } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -1476,17 +1463,15 @@ request.Filename is null { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Mixedbread/Generated/Mixedbread.FilesClient.CreateMultipartUpload.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.CreateMultipartUpload.g.cs index 7b4e777..0457f56 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.CreateMultipartUpload.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.CreateMultipartUpload.g.cs @@ -387,18 +387,17 @@ partial void ProcessCreateMultipartUploadResponseContent( __exception_422 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -432,17 +431,15 @@ partial void ProcessCreateMultipartUploadResponseContent( } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -479,17 +476,15 @@ partial void ProcessCreateMultipartUploadResponseContent( { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Mixedbread/Generated/Mixedbread.FilesClient.DeleteFile.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.DeleteFile.g.cs index bc52f1c..689b04f 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.DeleteFile.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.DeleteFile.g.cs @@ -388,18 +388,17 @@ partial void ProcessDeleteFileResponseContent( __exception_422 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -433,17 +432,15 @@ partial void ProcessDeleteFileResponseContent( } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -480,17 +477,15 @@ partial void ProcessDeleteFileResponseContent( { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Mixedbread/Generated/Mixedbread.FilesClient.DownloadFile.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.DownloadFile.g.cs index 70386a5..59dc18e 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.DownloadFile.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.DownloadFile.g.cs @@ -388,18 +388,17 @@ partial void ProcessDownloadFileResponseContent( __exception_422 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } try @@ -429,17 +428,15 @@ partial void ProcessDownloadFileResponseContent( { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } @@ -751,18 +748,17 @@ partial void ProcessDownloadFileResponseContent( __exception_422 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -790,16 +786,15 @@ partial void ProcessDownloadFileResponseContent( } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.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 @@ -834,17 +829,15 @@ partial void ProcessDownloadFileResponseContent( { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Mixedbread/Generated/Mixedbread.FilesClient.GetMultipartUpload.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.GetMultipartUpload.g.cs index 5de0dc5..cf36aad 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.GetMultipartUpload.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.GetMultipartUpload.g.cs @@ -380,18 +380,17 @@ partial void ProcessGetMultipartUploadResponseContent( __exception_422 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -425,17 +424,15 @@ partial void ProcessGetMultipartUploadResponseContent( } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -472,17 +469,15 @@ partial void ProcessGetMultipartUploadResponseContent( { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Mixedbread/Generated/Mixedbread.FilesClient.ListFiles.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.ListFiles.g.cs index 8555a79..2e6c2f7 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.ListFiles.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.ListFiles.g.cs @@ -451,18 +451,17 @@ partial void ProcessListFilesResponseContent( __exception_422 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -496,17 +495,15 @@ partial void ProcessListFilesResponseContent( } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -543,17 +540,15 @@ partial void ProcessListFilesResponseContent( { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Mixedbread/Generated/Mixedbread.FilesClient.ListMultipartUploads.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.ListMultipartUploads.g.cs index baa0413..ece5465 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.ListMultipartUploads.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.ListMultipartUploads.g.cs @@ -374,17 +374,15 @@ partial void ProcessListMultipartUploadsResponseContent( } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -421,17 +419,15 @@ partial void ProcessListMultipartUploadsResponseContent( { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Mixedbread/Generated/Mixedbread.FilesClient.RetrieveFile.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.RetrieveFile.g.cs index 688c845..4b23445 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.RetrieveFile.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.RetrieveFile.g.cs @@ -388,18 +388,17 @@ partial void ProcessRetrieveFileResponseContent( __exception_422 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -433,17 +432,15 @@ partial void ProcessRetrieveFileResponseContent( } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -480,17 +477,15 @@ partial void ProcessRetrieveFileResponseContent( { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Mixedbread/Generated/Mixedbread.FilesClient.UpdateFile.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.UpdateFile.g.cs index 7eb08b5..10f48d7 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.UpdateFile.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.UpdateFile.g.cs @@ -450,18 +450,17 @@ request.Filename is null __exception_422 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -495,17 +494,15 @@ request.Filename is null } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -542,17 +539,15 @@ request.Filename is null { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } @@ -965,18 +960,17 @@ request.Filename is null __exception_422 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -1006,17 +1000,15 @@ request.Filename is null } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -1049,17 +1041,15 @@ request.Filename is null { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } @@ -1431,18 +1421,17 @@ request.Filename is null __exception_422 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -1476,17 +1465,15 @@ request.Filename is null } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -1523,17 +1510,15 @@ request.Filename is null { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Mixedbread/Generated/Mixedbread.MixedbreadClient.CreateEmbeddings.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.MixedbreadClient.CreateEmbeddings.g.cs index d91ae2a..f2cfd55 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.MixedbreadClient.CreateEmbeddings.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.MixedbreadClient.CreateEmbeddings.g.cs @@ -395,18 +395,17 @@ partial void ProcessCreateEmbeddingsResponseContent( __exception_422 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -440,17 +439,15 @@ partial void ProcessCreateEmbeddingsResponseContent( } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -487,17 +484,15 @@ partial void ProcessCreateEmbeddingsResponseContent( { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Mixedbread/Generated/Mixedbread.MixedbreadClient.Info.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.MixedbreadClient.Info.g.cs index 3f604c9..9ac8277 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.MixedbreadClient.Info.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.MixedbreadClient.Info.g.cs @@ -371,18 +371,17 @@ partial void ProcessInfoResponseContent( __exception_500 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.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) @@ -416,17 +415,15 @@ partial void ProcessInfoResponseContent( } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -463,17 +460,15 @@ partial void ProcessInfoResponseContent( { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Mixedbread/Generated/Mixedbread.MixedbreadClient.Rerank.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.MixedbreadClient.Rerank.g.cs index 086727b..1c054c3 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.MixedbreadClient.Rerank.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.MixedbreadClient.Rerank.g.cs @@ -395,18 +395,17 @@ partial void ProcessRerankResponseContent( __exception_422 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -440,17 +439,15 @@ partial void ProcessRerankResponseContent( } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -487,17 +484,15 @@ partial void ProcessRerankResponseContent( { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Mixedbread/Generated/Mixedbread.ParsingClient.CancelParsingJob.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.ParsingClient.CancelParsingJob.g.cs index 4bffd31..30d173c 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.ParsingClient.CancelParsingJob.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.ParsingClient.CancelParsingJob.g.cs @@ -388,18 +388,17 @@ partial void ProcessCancelParsingJobResponseContent( __exception_422 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -433,17 +432,15 @@ partial void ProcessCancelParsingJobResponseContent( } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -480,17 +477,15 @@ partial void ProcessCancelParsingJobResponseContent( { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Mixedbread/Generated/Mixedbread.ParsingClient.CreateParsingJob.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.ParsingClient.CreateParsingJob.g.cs index 212d562..3e902b3 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.ParsingClient.CreateParsingJob.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.ParsingClient.CreateParsingJob.g.cs @@ -395,18 +395,17 @@ partial void ProcessCreateParsingJobResponseContent( __exception_422 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -440,17 +439,15 @@ partial void ProcessCreateParsingJobResponseContent( } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -487,17 +484,15 @@ partial void ProcessCreateParsingJobResponseContent( { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Mixedbread/Generated/Mixedbread.ParsingClient.DeleteParsingJob.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.ParsingClient.DeleteParsingJob.g.cs index e09927d..f0dd59d 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.ParsingClient.DeleteParsingJob.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.ParsingClient.DeleteParsingJob.g.cs @@ -388,18 +388,17 @@ partial void ProcessDeleteParsingJobResponseContent( __exception_422 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -433,17 +432,15 @@ partial void ProcessDeleteParsingJobResponseContent( } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -480,17 +477,15 @@ partial void ProcessDeleteParsingJobResponseContent( { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Mixedbread/Generated/Mixedbread.ParsingClient.ListParsingJobs.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.ParsingClient.ListParsingJobs.g.cs index a0fb1ee..012fa3d 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.ParsingClient.ListParsingJobs.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.ParsingClient.ListParsingJobs.g.cs @@ -467,18 +467,17 @@ partial void ProcessListParsingJobsResponseContent( __exception_422 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -512,17 +511,15 @@ partial void ProcessListParsingJobsResponseContent( } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -559,17 +556,15 @@ partial void ProcessListParsingJobsResponseContent( { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Mixedbread/Generated/Mixedbread.ParsingClient.RetrieveParsingJob.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.ParsingClient.RetrieveParsingJob.g.cs index 4f0343d..a30f284 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.ParsingClient.RetrieveParsingJob.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.ParsingClient.RetrieveParsingJob.g.cs @@ -388,18 +388,17 @@ partial void ProcessRetrieveParsingJobResponseContent( __exception_422 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -433,17 +432,15 @@ partial void ProcessRetrieveParsingJobResponseContent( } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -480,17 +477,15 @@ partial void ProcessRetrieveParsingJobResponseContent( { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Mixedbread/Generated/Mixedbread.SchemasClient.GetMxbaiJsonSchema.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.SchemasClient.GetMxbaiJsonSchema.g.cs index 4acb9a0..45214b1 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.SchemasClient.GetMxbaiJsonSchema.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.SchemasClient.GetMxbaiJsonSchema.g.cs @@ -376,17 +376,15 @@ partial void ProcessGetMxbaiJsonSchemaResponseContent( } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -421,17 +419,15 @@ partial void ProcessGetMxbaiJsonSchemaResponseContent( { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Mixedbread/Generated/Mixedbread.StoresClient.CreateQuestionAnswering.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.CreateQuestionAnswering.g.cs index 6e277d4..3c51e98 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.CreateQuestionAnswering.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.CreateQuestionAnswering.g.cs @@ -385,18 +385,17 @@ partial void ProcessCreateQuestionAnsweringResponseContent( __exception_422 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -430,17 +429,15 @@ partial void ProcessCreateQuestionAnsweringResponseContent( } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -477,17 +474,15 @@ partial void ProcessCreateQuestionAnsweringResponseContent( { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Mixedbread/Generated/Mixedbread.StoresClient.CreateSearchRule.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.CreateSearchRule.g.cs index 0396393..22b27ff 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.CreateSearchRule.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.CreateSearchRule.g.cs @@ -410,18 +410,17 @@ partial void ProcessCreateSearchRuleResponseContent( __exception_422 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -455,17 +454,15 @@ partial void ProcessCreateSearchRuleResponseContent( } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -502,17 +499,15 @@ partial void ProcessCreateSearchRuleResponseContent( { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Mixedbread/Generated/Mixedbread.StoresClient.CreateStore.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.CreateStore.g.cs index cbcec88..29591f9 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.CreateStore.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.CreateStore.g.cs @@ -395,18 +395,17 @@ partial void ProcessCreateStoreResponseContent( __exception_422 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -440,17 +439,15 @@ partial void ProcessCreateStoreResponseContent( } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -487,17 +484,15 @@ partial void ProcessCreateStoreResponseContent( { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Mixedbread/Generated/Mixedbread.StoresClient.CreateStoreFile.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.CreateStoreFile.g.cs index 3b769c4..5d29673 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.CreateStoreFile.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.CreateStoreFile.g.cs @@ -412,18 +412,17 @@ partial void ProcessCreateStoreFileResponseContent( __exception_422 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -457,17 +456,15 @@ partial void ProcessCreateStoreFileResponseContent( } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -504,17 +501,15 @@ partial void ProcessCreateStoreFileResponseContent( { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Mixedbread/Generated/Mixedbread.StoresClient.DeleteSearchRule.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.DeleteSearchRule.g.cs index 9928f93..024d7a8 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.DeleteSearchRule.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.DeleteSearchRule.g.cs @@ -403,18 +403,17 @@ partial void ProcessDeleteSearchRuleResponseContent( __exception_422 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -448,17 +447,15 @@ partial void ProcessDeleteSearchRuleResponseContent( } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -495,17 +492,15 @@ partial void ProcessDeleteSearchRuleResponseContent( { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Mixedbread/Generated/Mixedbread.StoresClient.DeleteSpecificSearchRule.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.DeleteSpecificSearchRule.g.cs index 1cd071d..bb0caa3 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.DeleteSpecificSearchRule.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.DeleteSpecificSearchRule.g.cs @@ -425,18 +425,17 @@ partial void ProcessDeleteSpecificSearchRuleResponseContent( __exception_422 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -470,17 +469,15 @@ partial void ProcessDeleteSpecificSearchRuleResponseContent( } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -517,17 +514,15 @@ partial void ProcessDeleteSpecificSearchRuleResponseContent( { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Mixedbread/Generated/Mixedbread.StoresClient.DeleteStore.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.DeleteStore.g.cs index 169f81d..378f474 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.DeleteStore.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.DeleteStore.g.cs @@ -388,18 +388,17 @@ partial void ProcessDeleteStoreResponseContent( __exception_422 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -433,17 +432,15 @@ partial void ProcessDeleteStoreResponseContent( } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -480,17 +477,15 @@ partial void ProcessDeleteStoreResponseContent( { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Mixedbread/Generated/Mixedbread.StoresClient.DeleteStoreFile.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.DeleteStoreFile.g.cs index a3c40af..9c2c583 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.DeleteStoreFile.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.DeleteStoreFile.g.cs @@ -403,18 +403,17 @@ partial void ProcessDeleteStoreFileResponseContent( __exception_422 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -448,17 +447,15 @@ partial void ProcessDeleteStoreFileResponseContent( } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -495,17 +492,15 @@ partial void ProcessDeleteStoreFileResponseContent( { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Mixedbread/Generated/Mixedbread.StoresClient.EnhanceQuery.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.EnhanceQuery.g.cs index a42e84c..1c3a1fd 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.EnhanceQuery.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.EnhanceQuery.g.cs @@ -387,18 +387,17 @@ partial void ProcessEnhanceQueryResponseContent( __exception_422 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -432,17 +431,15 @@ partial void ProcessEnhanceQueryResponseContent( } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -479,17 +476,15 @@ partial void ProcessEnhanceQueryResponseContent( { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Mixedbread/Generated/Mixedbread.StoresClient.GetMetadataFacets.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.GetMetadataFacets.g.cs index 868a08a..c425e4e 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.GetMetadataFacets.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.GetMetadataFacets.g.cs @@ -385,18 +385,17 @@ partial void ProcessGetMetadataFacetsResponseContent( __exception_422 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -430,17 +429,15 @@ partial void ProcessGetMetadataFacetsResponseContent( } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -477,17 +474,15 @@ partial void ProcessGetMetadataFacetsResponseContent( { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Mixedbread/Generated/Mixedbread.StoresClient.GetStoreEventHistogram.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.GetStoreEventHistogram.g.cs index b913386..a2b35b4 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.GetStoreEventHistogram.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.GetStoreEventHistogram.g.cs @@ -410,18 +410,17 @@ partial void ProcessGetStoreEventHistogramResponseContent( __exception_422 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -455,17 +454,15 @@ partial void ProcessGetStoreEventHistogramResponseContent( } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -502,17 +499,15 @@ partial void ProcessGetStoreEventHistogramResponseContent( { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Mixedbread/Generated/Mixedbread.StoresClient.GrepStoreChunks.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.GrepStoreChunks.g.cs index 940d183..f7535bc 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.GrepStoreChunks.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.GrepStoreChunks.g.cs @@ -425,18 +425,17 @@ partial void ProcessGrepStoreChunksResponseContent( __exception_422 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -470,17 +469,15 @@ partial void ProcessGrepStoreChunksResponseContent( } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -517,17 +514,15 @@ partial void ProcessGrepStoreChunksResponseContent( { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Mixedbread/Generated/Mixedbread.StoresClient.ListStoreChunks.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.ListStoreChunks.g.cs index 025b679..c102273 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.ListStoreChunks.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.ListStoreChunks.g.cs @@ -423,18 +423,17 @@ partial void ProcessListStoreChunksResponseContent( __exception_422 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -468,17 +467,15 @@ partial void ProcessListStoreChunksResponseContent( } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -515,17 +512,15 @@ partial void ProcessListStoreChunksResponseContent( { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Mixedbread/Generated/Mixedbread.StoresClient.ListStoreEvents.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.ListStoreEvents.g.cs index 5e70d71..d72c084 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.ListStoreEvents.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.ListStoreEvents.g.cs @@ -494,18 +494,17 @@ partial void ProcessListStoreEventsResponseContent( __exception_422 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -539,17 +538,15 @@ partial void ProcessListStoreEventsResponseContent( } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -586,17 +583,15 @@ partial void ProcessListStoreEventsResponseContent( { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Mixedbread/Generated/Mixedbread.StoresClient.ListStoreFilesWithMetadataFilter.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.ListStoreFilesWithMetadataFilter.g.cs index 51e2296..5f903af 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.ListStoreFilesWithMetadataFilter.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.ListStoreFilesWithMetadataFilter.g.cs @@ -410,18 +410,17 @@ partial void ProcessListStoreFilesWithMetadataFilterResponseContent( __exception_422 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -455,17 +454,15 @@ partial void ProcessListStoreFilesWithMetadataFilterResponseContent( } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -502,17 +499,15 @@ partial void ProcessListStoreFilesWithMetadataFilterResponseContent( { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Mixedbread/Generated/Mixedbread.StoresClient.ListStores.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.ListStores.g.cs index 91a7ee1..f673dbd 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.ListStores.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.ListStores.g.cs @@ -453,18 +453,17 @@ partial void ProcessListStoresResponseContent( __exception_422 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -498,17 +497,15 @@ partial void ProcessListStoresResponseContent( } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -545,17 +542,15 @@ partial void ProcessListStoresResponseContent( { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Mixedbread/Generated/Mixedbread.StoresClient.RetrieveSearchRule.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.RetrieveSearchRule.g.cs index fc7d4ea..fa29d68 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.RetrieveSearchRule.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.RetrieveSearchRule.g.cs @@ -403,18 +403,17 @@ partial void ProcessRetrieveSearchRuleResponseContent( __exception_422 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -448,17 +447,15 @@ partial void ProcessRetrieveSearchRuleResponseContent( } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -495,17 +492,15 @@ partial void ProcessRetrieveSearchRuleResponseContent( { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Mixedbread/Generated/Mixedbread.StoresClient.RetrieveStore.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.RetrieveStore.g.cs index ae0ae9b..e34bc40 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.RetrieveStore.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.RetrieveStore.g.cs @@ -388,18 +388,17 @@ partial void ProcessRetrieveStoreResponseContent( __exception_422 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -433,17 +432,15 @@ partial void ProcessRetrieveStoreResponseContent( } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -480,17 +477,15 @@ partial void ProcessRetrieveStoreResponseContent( { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Mixedbread/Generated/Mixedbread.StoresClient.RetrieveStoreFile.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.RetrieveStoreFile.g.cs index 3216a7d..6746dbf 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.RetrieveStoreFile.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.RetrieveStoreFile.g.cs @@ -423,18 +423,17 @@ partial void ProcessRetrieveStoreFileResponseContent( __exception_422 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -468,17 +467,15 @@ partial void ProcessRetrieveStoreFileResponseContent( } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -515,17 +512,15 @@ partial void ProcessRetrieveStoreFileResponseContent( { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Mixedbread/Generated/Mixedbread.StoresClient.SearchStoreChunks.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.SearchStoreChunks.g.cs index 45e1ccc..aa91e2e 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.SearchStoreChunks.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.SearchStoreChunks.g.cs @@ -431,18 +431,17 @@ partial void ProcessSearchStoreChunksResponseContent( __exception_422 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -476,17 +475,15 @@ partial void ProcessSearchStoreChunksResponseContent( } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -523,17 +520,15 @@ partial void ProcessSearchStoreChunksResponseContent( { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Mixedbread/Generated/Mixedbread.StoresClient.UpdateSearchRule.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.UpdateSearchRule.g.cs index e68fba6..75b4fcf 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.UpdateSearchRule.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.UpdateSearchRule.g.cs @@ -425,18 +425,17 @@ partial void ProcessUpdateSearchRuleResponseContent( __exception_422 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -470,17 +469,15 @@ partial void ProcessUpdateSearchRuleResponseContent( } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -517,17 +514,15 @@ partial void ProcessUpdateSearchRuleResponseContent( { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Mixedbread/Generated/Mixedbread.StoresClient.UpdateStore.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.UpdateStore.g.cs index f790d58..4171a27 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.UpdateStore.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.UpdateStore.g.cs @@ -410,18 +410,17 @@ partial void ProcessUpdateStoreResponseContent( __exception_422 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -455,17 +454,15 @@ partial void ProcessUpdateStoreResponseContent( } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -502,17 +499,15 @@ partial void ProcessUpdateStoreResponseContent( { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Mixedbread/Generated/Mixedbread.StoresClient.UpdateStoreFile.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.UpdateStoreFile.g.cs index 14d188b..3e19c66 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.UpdateStoreFile.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.UpdateStoreFile.g.cs @@ -425,18 +425,17 @@ partial void ProcessUpdateStoreFileResponseContent( __exception_422 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -470,17 +469,15 @@ partial void ProcessUpdateStoreFileResponseContent( } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -517,17 +514,15 @@ partial void ProcessUpdateStoreFileResponseContent( { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Mixedbread/Generated/Mixedbread.StoresClient.UploadStoreFile.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.UploadStoreFile.g.cs index b672e4d..6411d0b 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.UploadStoreFile.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.UploadStoreFile.g.cs @@ -463,18 +463,17 @@ request.Filename is null __exception_422 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -508,17 +507,15 @@ request.Filename is null } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -555,17 +552,15 @@ request.Filename is null { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } @@ -997,18 +992,17 @@ request.Filename is null __exception_422 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -1038,17 +1032,15 @@ request.Filename is null } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -1081,17 +1073,15 @@ request.Filename is null { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } @@ -1477,18 +1467,17 @@ request.Filename is null __exception_422 = __ex; } - throw new global::Mixedbread.ApiException( + + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -1522,17 +1511,15 @@ request.Filename is null } catch (global::System.Exception __ex) { - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -1569,17 +1556,15 @@ request.Filename is null { } - throw new global::Mixedbread.ApiException( + throw global::Mixedbread.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } }