From 108b7f502a1d22f6a406413a39f3c2344ed538ef Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 24 May 2026 04:06:32 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- ...Vectara.AgentAnalyticsClient.GetTrace.g.cs | 54 +-- ...ara.AgentAnalyticsClient.GetTraceSpan.g.cs | 54 +-- ...a.AgentAnalyticsClient.ListTraceSpans.g.cs | 54 +-- ...ctara.AgentAnalyticsClient.ListTraces.g.cs | 39 +- .../Vectara.AgentArtifactsClient.Get3.g.cs | 54 +-- .../Vectara.AgentArtifactsClient.List3.g.cs | 54 +-- .../Vectara.AgentEventsClient.Create2.g.cs | 114 ++--- ...ara.AgentEventsClient.Create2AsStream.g.cs | 25 +- .../Vectara.AgentEventsClient.Delete2.g.cs | 39 +- .../Vectara.AgentEventsClient.Get2.g.cs | 54 +-- .../Vectara.AgentEventsClient.Hide.g.cs | 39 +- .../Vectara.AgentEventsClient.List2.g.cs | 54 +-- .../Vectara.AgentEventsClient.Unhide.g.cs | 39 +- .../Vectara.AgentSchedulesClient.Create.g.cs | 84 ++-- .../Vectara.AgentSchedulesClient.Delete.g.cs | 54 +-- .../Vectara.AgentSchedulesClient.Get.g.cs | 54 +-- .../Vectara.AgentSchedulesClient.List.g.cs | 54 +-- ...a.AgentSchedulesClient.ListExecutions.g.cs | 24 +- .../Vectara.AgentSchedulesClient.Update.g.cs | 69 ++- .../Vectara.AgentSessionsClient.Create.g.cs | 69 ++- .../Vectara.AgentSessionsClient.Delete.g.cs | 54 +-- .../Vectara.AgentSessionsClient.Get.g.cs | 54 +-- .../Vectara.AgentSessionsClient.List.g.cs | 68 +-- .../Vectara.AgentSessionsClient.Update.g.cs | 69 ++- .../Vectara.AgentsClient.Create.g.cs | 54 +-- .../Vectara.AgentsClient.CreateConnector.g.cs | 69 ++- .../Vectara.AgentsClient.Delete.g.cs | 54 +-- .../Vectara.AgentsClient.DeleteConnector.g.cs | 54 +-- .../Generated/Vectara.AgentsClient.Get.g.cs | 54 +-- .../Vectara.AgentsClient.GetConnector.g.cs | 54 +-- .../Vectara.AgentsClient.GetIdentity.g.cs | 54 +-- .../Vectara.AgentsClient.GetSecrets.g.cs | 54 +-- .../Generated/Vectara.AgentsClient.List.g.cs | 39 +- .../Vectara.AgentsClient.ListConnectors.g.cs | 54 +-- .../Vectara.AgentsClient.Replace.g.cs | 69 ++- .../Vectara.AgentsClient.ReplaceSecrets.g.cs | 69 ++- .../Vectara.AgentsClient.Update.g.cs | 69 ++- .../Vectara.AgentsClient.UpdateConnector.g.cs | 69 ++- .../Vectara.AgentsClient.UpdateIdentity.g.cs | 69 ++- .../Vectara.AgentsClient.UpdateSecrets.g.cs | 69 ++- .../Vectara.ApiKeysClient.Create.g.cs | 54 +-- .../Vectara.ApiKeysClient.Delete.g.cs | 39 +- .../Generated/Vectara.ApiKeysClient.Get.g.cs | 39 +- .../Generated/Vectara.ApiKeysClient.List.g.cs | 54 +-- .../Vectara.ApiKeysClient.Update.g.cs | 39 +- .../Vectara.AppClientsClient.Create.g.cs | 54 +-- .../Vectara.AppClientsClient.Delete.g.cs | 39 +- .../Vectara.AppClientsClient.Get.g.cs | 39 +- .../Vectara.AppClientsClient.List.g.cs | 54 +-- .../Vectara.AppClientsClient.Update.g.cs | 39 +- ...Vectara.AuthenticationClient.GetToken.g.cs | 24 +- .../Vectara.CorporaClient.ComputeSize.g.cs | 54 +-- .../Vectara.CorporaClient.Create.g.cs | 69 ++- .../Vectara.CorporaClient.Delete.g.cs | 54 +-- .../Generated/Vectara.CorporaClient.Get.g.cs | 54 +-- ...CorporaClient.GetFilterAttributeStats.g.cs | 69 ++- .../Generated/Vectara.CorporaClient.List.g.cs | 39 +- .../Vectara.CorporaClient.Query.g.cs | 69 ++- .../Vectara.CorporaClient.QueryAsStream.g.cs | 25 +- ...CorporaClient.ReplaceFilterAttributes.g.cs | 54 +-- .../Vectara.CorporaClient.Reset.g.cs | 54 +-- .../Vectara.CorporaClient.Search.g.cs | 69 ++- .../Vectara.CorporaClient.Update.g.cs | 54 +-- .../Vectara.CustomerMetricsClient.Get.g.cs | 50 +- .../Vectara.CustomerMetricsClient.List.g.cs | 24 +- .../Vectara.DocumentsClient.BulkDelete.g.cs | 84 ++-- .../Vectara.DocumentsClient.Create.g.cs | 84 ++-- .../Vectara.DocumentsClient.Delete.g.cs | 54 +-- .../Vectara.DocumentsClient.Get.g.cs | 54 +-- .../Vectara.DocumentsClient.GetImage.g.cs | 54 +-- .../Vectara.DocumentsClient.List.g.cs | 54 +-- .../Vectara.DocumentsClient.Summarize.g.cs | 54 +-- ...ara.DocumentsClient.SummarizeAsStream.g.cs | 25 +- .../Vectara.DocumentsClient.Update.g.cs | 69 ++- ...ectara.DocumentsClient.UpdateMetadata.g.cs | 69 ++- .../Vectara.EncodersClient.Create.g.cs | 54 +-- .../Vectara.EncodersClient.List.g.cs | 39 +- .../Vectara/Generated/Vectara.Exceptions.g.cs | 134 +++++ ...ara.FactualConsistencyClient.Evaluate.g.cs | 69 ++- ...ectara.GenerationPresetsClient.Create.g.cs | 54 +-- ...ectara.GenerationPresetsClient.Delete.g.cs | 69 ++- .../Vectara.GenerationPresetsClient.List.g.cs | 39 +- ...ctara.GenerationPresetsClient.Replace.g.cs | 69 ++- .../Vectara.GlossariesClient.Create.g.cs | 54 +-- .../Vectara.GlossariesClient.Delete.g.cs | 54 +-- ...ectara.GlossariesClient.DeleteEntries.g.cs | 54 +-- .../Vectara.GlossariesClient.Get.g.cs | 54 +-- .../Vectara.GlossariesClient.List.g.cs | 39 +- .../Vectara.GlossariesClient.ListEntries.g.cs | 54 +-- .../Vectara.GlossariesClient.Update.g.cs | 69 ++- ...ectara.GlossariesClient.UpsertEntries.g.cs | 69 ++- ...rectorsClient.HallucinationCorrection.g.cs | 54 +-- ...ra.HallucinationCorrectorsClient.List.g.cs | 39 +- .../Vectara.IAgentSessionsClient.List.g.cs | 8 + .../Vectara.InstructionsClient.Create.g.cs | 54 +-- .../Vectara.InstructionsClient.Delete.g.cs | 54 +-- ...tara.InstructionsClient.DeleteVersion.g.cs | 69 ++- .../Vectara.InstructionsClient.Get.g.cs | 54 +-- .../Vectara.InstructionsClient.List.g.cs | 39 +- .../Vectara.InstructionsClient.Test.g.cs | 84 ++-- .../Vectara.InstructionsClient.Update.g.cs | 69 ++- .../Generated/Vectara.JobsClient.Get.g.cs | 54 +-- .../Generated/Vectara.JobsClient.List.g.cs | 39 +- ....JsonConverters.AgentStreamedResponse.g.cs | 15 + ...onConverters.GenericToolActivityEvent.g.cs | 146 ++++++ ...nConverters.SubAgentToolActivityEvent.g.cs | 146 ++++++ ...tara.JsonConverters.ToolActivityEvent.g.cs | 72 +++ ...ctivityEventDiscriminatorActivityType.g.cs | 53 ++ ...ventDiscriminatorActivityTypeNullable.g.cs | 60 +++ .../Vectara.JsonSerializerContext.g.cs | 33 ++ .../Vectara.JsonSerializerContextTypes.g.cs | 456 ++++++++++-------- .../Vectara.LlmClient.ChatCompletion.g.cs | 54 +-- ...tara.LlmClient.ChatCompletionAsStream.g.cs | 25 +- .../Generated/Vectara.LlmsClient.Create.g.cs | 54 +-- .../Generated/Vectara.LlmsClient.Delete.g.cs | 54 +-- .../Generated/Vectara.LlmsClient.Get.g.cs | 54 +-- .../Generated/Vectara.LlmsClient.List.g.cs | 39 +- .../Generated/Vectara.LlmsClient.Update.g.cs | 69 ++- .../Vectara.MetadataClient.QueryMetadata.g.cs | 69 ++- .../Vectara.Models.AgentStreamedResponse.g.cs | 85 +++- ...gentStreamedResponseDiscriminatorType.g.cs | 6 + ...ctara.Models.CreateVertexAILLMRequest.g.cs | 11 + ....CreateVertexAILLMRequestHeaders.Json.g.cs | 92 ++++ ...odels.CreateVertexAILLMRequestHeaders.g.cs | 19 + ....Models.GenericToolActivityEvent.Json.g.cs | 92 ++++ ...ctara.Models.GenericToolActivityEvent.g.cs | 295 +++++++++++ ...GenericToolActivityEventVariant2.Json.g.cs | 92 ++++ ...dels.GenericToolActivityEventVariant2.g.cs | 68 +++ ...ectara.Models.ListPipelinesSourceType.g.cs | 6 + ...Models.SubAgentToolActivityEvent.Json.g.cs | 92 ++++ ...tara.Models.SubAgentToolActivityEvent.g.cs | 295 +++++++++++ ...ubAgentToolActivityEventVariant2.Json.g.cs | 92 ++++ ...els.SubAgentToolActivityEventVariant2.g.cs | 66 +++ ...Vectara.Models.ToolActivityEvent.Json.g.cs | 92 ++++ .../Vectara.Models.ToolActivityEvent.g.cs | 303 ++++++++++++ ...ara.Models.ToolActivityEventBase.Json.g.cs | 92 ++++ .../Vectara.Models.ToolActivityEventBase.g.cs | 105 ++++ ...s.ToolActivityEventDiscriminator.Json.g.cs | 92 ++++ ...Models.ToolActivityEventDiscriminator.g.cs | 45 ++ ...ctivityEventDiscriminatorActivityType.g.cs | 51 ++ ...ctara.Models.UpdateVertexAILLMRequest.g.cs | 11 + ....UpdateVertexAILLMRequestHeaders.Json.g.cs | 92 ++++ ...odels.UpdateVertexAILLMRequestHeaders.g.cs | 19 + ...ipelineDeadLetterEntriesClient.Create.g.cs | 84 ++-- ...ipelineDeadLetterEntriesClient.Delete.g.cs | 54 +-- ...a.PipelineDeadLetterEntriesClient.Get.g.cs | 54 +-- ....PipelineDeadLetterEntriesClient.List.g.cs | 54 +-- ...pelineDeadLetterEntriesClient.Process.g.cs | 84 ++-- .../Vectara.PipelineRunsClient.Cancel.g.cs | 69 ++- .../Vectara.PipelineRunsClient.Get.g.cs | 54 +-- .../Vectara.PipelineRunsClient.List.g.cs | 54 +-- ...Vectara.PipelineRunsClient.ListEvents.g.cs | 54 +-- .../Vectara.PipelinesClient.Create.g.cs | 69 ++- .../Vectara.PipelinesClient.Delete.g.cs | 54 +-- .../Vectara.PipelinesClient.Get.g.cs | 54 +-- .../Vectara.PipelinesClient.List.g.cs | 39 +- .../Vectara.PipelinesClient.Replace.g.cs | 69 ++- .../Vectara.PipelinesClient.Trigger.g.cs | 69 ++- .../Vectara.PipelinesClient.Update.g.cs | 69 ++- .../Vectara.QueriesClient.Query2.g.cs | 69 ++- .../Vectara.QueriesClient.Query2AsStream.g.cs | 25 +- .../Vectara.QueryHistoryClient.Get.g.cs | 54 +-- .../Vectara.QueryHistoryClient.List.g.cs | 54 +-- .../Vectara.RerankersClient.List.g.cs | 39 +- .../Vectara.TableExtractorsClient.List.g.cs | 39 +- .../Vectara.ToolServersClient.Create.g.cs | 54 +-- .../Vectara.ToolServersClient.Delete.g.cs | 54 +-- .../Vectara.ToolServersClient.Get.g.cs | 54 +-- .../Vectara.ToolServersClient.List.g.cs | 39 +- .../Vectara.ToolServersClient.Sync.g.cs | 54 +-- .../Vectara.ToolServersClient.Update.g.cs | 69 ++- .../Generated/Vectara.ToolsClient.Create.g.cs | 69 ++- .../Generated/Vectara.ToolsClient.Delete.g.cs | 54 +-- .../Generated/Vectara.ToolsClient.Get.g.cs | 54 +-- .../Generated/Vectara.ToolsClient.List.g.cs | 39 +- .../Generated/Vectara.ToolsClient.Test.g.cs | 84 ++-- ...ctara.ToolsClient.TestWithoutCreation.g.cs | 54 +-- .../Generated/Vectara.ToolsClient.Update.g.cs | 69 ++- .../Generated/Vectara.UploadClient.File.g.cs | 297 ++++++------ .../Generated/Vectara.UsersClient.Create.g.cs | 54 +-- .../Generated/Vectara.UsersClient.Delete.g.cs | 54 +-- .../Generated/Vectara.UsersClient.Get.g.cs | 54 +-- .../Generated/Vectara.UsersClient.List.g.cs | 39 +- .../Vectara.UsersClient.ResetPassword.g.cs | 54 +-- .../Generated/Vectara.UsersClient.Update.g.cs | 54 +-- src/libs/Vectara/openapi.yaml | 141 ++++++ 186 files changed, 7093 insertions(+), 4961 deletions(-) create mode 100644 src/libs/Vectara/Generated/Vectara.JsonConverters.GenericToolActivityEvent.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.JsonConverters.SubAgentToolActivityEvent.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.JsonConverters.ToolActivityEvent.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.JsonConverters.ToolActivityEventDiscriminatorActivityType.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.JsonConverters.ToolActivityEventDiscriminatorActivityTypeNullable.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.CreateVertexAILLMRequestHeaders.Json.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.CreateVertexAILLMRequestHeaders.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.GenericToolActivityEvent.Json.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.GenericToolActivityEvent.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.GenericToolActivityEventVariant2.Json.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.GenericToolActivityEventVariant2.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.SubAgentToolActivityEvent.Json.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.SubAgentToolActivityEvent.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.SubAgentToolActivityEventVariant2.Json.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.SubAgentToolActivityEventVariant2.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.ToolActivityEvent.Json.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.ToolActivityEvent.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.ToolActivityEventBase.Json.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.ToolActivityEventBase.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.ToolActivityEventDiscriminator.Json.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.ToolActivityEventDiscriminator.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.ToolActivityEventDiscriminatorActivityType.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.UpdateVertexAILLMRequestHeaders.Json.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.UpdateVertexAILLMRequestHeaders.g.cs diff --git a/src/libs/Vectara/Generated/Vectara.AgentAnalyticsClient.GetTrace.g.cs b/src/libs/Vectara/Generated/Vectara.AgentAnalyticsClient.GetTrace.g.cs index b43308dd..2172a27e 100644 --- a/src/libs/Vectara/Generated/Vectara.AgentAnalyticsClient.GetTrace.g.cs +++ b/src/libs/Vectara/Generated/Vectara.AgentAnalyticsClient.GetTrace.g.cs @@ -402,18 +402,17 @@ partial void ProcessGetTraceResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Trace not found. if ((int)__response.StatusCode == 404) @@ -440,18 +439,17 @@ partial void ProcessGetTraceResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -485,17 +483,15 @@ partial void ProcessGetTraceResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -532,17 +528,15 @@ partial void ProcessGetTraceResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.AgentAnalyticsClient.GetTraceSpan.g.cs b/src/libs/Vectara/Generated/Vectara.AgentAnalyticsClient.GetTraceSpan.g.cs index 5b92ce1f..b53d90da 100644 --- a/src/libs/Vectara/Generated/Vectara.AgentAnalyticsClient.GetTraceSpan.g.cs +++ b/src/libs/Vectara/Generated/Vectara.AgentAnalyticsClient.GetTraceSpan.g.cs @@ -423,18 +423,17 @@ partial void ProcessGetTraceSpanResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Trace or span not found. if ((int)__response.StatusCode == 404) @@ -461,18 +460,17 @@ partial void ProcessGetTraceSpanResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -506,17 +504,15 @@ partial void ProcessGetTraceSpanResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -553,17 +549,15 @@ partial void ProcessGetTraceSpanResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.AgentAnalyticsClient.ListTraceSpans.g.cs b/src/libs/Vectara/Generated/Vectara.AgentAnalyticsClient.ListTraceSpans.g.cs index 90cfd3ad..1fa6f549 100644 --- a/src/libs/Vectara/Generated/Vectara.AgentAnalyticsClient.ListTraceSpans.g.cs +++ b/src/libs/Vectara/Generated/Vectara.AgentAnalyticsClient.ListTraceSpans.g.cs @@ -472,18 +472,17 @@ partial void ProcessListTraceSpansResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Trace not found. if ((int)__response.StatusCode == 404) @@ -510,18 +509,17 @@ partial void ProcessListTraceSpansResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -555,17 +553,15 @@ partial void ProcessListTraceSpansResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -602,17 +598,15 @@ partial void ProcessListTraceSpansResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.AgentAnalyticsClient.ListTraces.g.cs b/src/libs/Vectara/Generated/Vectara.AgentAnalyticsClient.ListTraces.g.cs index 873ccb04..cf0daa67 100644 --- a/src/libs/Vectara/Generated/Vectara.AgentAnalyticsClient.ListTraces.g.cs +++ b/src/libs/Vectara/Generated/Vectara.AgentAnalyticsClient.ListTraces.g.cs @@ -525,18 +525,17 @@ partial void ProcessListTracesResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -570,17 +569,15 @@ partial void ProcessListTracesResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -617,17 +614,15 @@ partial void ProcessListTracesResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.AgentArtifactsClient.Get3.g.cs b/src/libs/Vectara/Generated/Vectara.AgentArtifactsClient.Get3.g.cs index 211a9a0e..d27588e3 100644 --- a/src/libs/Vectara/Generated/Vectara.AgentArtifactsClient.Get3.g.cs +++ b/src/libs/Vectara/Generated/Vectara.AgentArtifactsClient.Get3.g.cs @@ -432,18 +432,17 @@ partial void ProcessGet3ResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Agent, session, or artifact not found. if ((int)__response.StatusCode == 404) @@ -470,18 +469,17 @@ partial void ProcessGet3ResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -515,17 +513,15 @@ partial void ProcessGet3ResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -562,17 +558,15 @@ partial void ProcessGet3ResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.AgentArtifactsClient.List3.g.cs b/src/libs/Vectara/Generated/Vectara.AgentArtifactsClient.List3.g.cs index 3f384ab9..ae902c8d 100644 --- a/src/libs/Vectara/Generated/Vectara.AgentArtifactsClient.List3.g.cs +++ b/src/libs/Vectara/Generated/Vectara.AgentArtifactsClient.List3.g.cs @@ -473,18 +473,17 @@ partial void ProcessList3ResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Agent or session not found. if ((int)__response.StatusCode == 404) @@ -511,18 +510,17 @@ partial void ProcessList3ResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -556,17 +554,15 @@ partial void ProcessList3ResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -603,17 +599,15 @@ partial void ProcessList3ResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.AgentEventsClient.Create2.g.cs b/src/libs/Vectara/Generated/Vectara.AgentEventsClient.Create2.g.cs index 6769fc3a..c711fdeb 100644 --- a/src/libs/Vectara/Generated/Vectara.AgentEventsClient.Create2.g.cs +++ b/src/libs/Vectara/Generated/Vectara.AgentEventsClient.Create2.g.cs @@ -437,18 +437,17 @@ partial void ProcessCreate2ResponseContent( __exception_400 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Permissions do not allow creating input events in this session. if ((int)__response.StatusCode == 403) @@ -475,18 +474,17 @@ partial void ProcessCreate2ResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Agent or session not found. if ((int)__response.StatusCode == 404) @@ -513,18 +511,17 @@ partial void ProcessCreate2ResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Session is already running. Use the `since` field in the request body to queue input. if ((int)__response.StatusCode == 409) @@ -551,18 +548,17 @@ partial void ProcessCreate2ResponseContent( __exception_409 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_409 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_409, - statusCode: __response.StatusCode) - { - ResponseBody = __content_409, - ResponseObject = __value_409, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_409, + responseObject: __value_409, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Could not process due to an invalid agent configuration (such as invalid instruction or tool description templates). if ((int)__response.StatusCode == 422) @@ -589,18 +585,17 @@ partial void ProcessCreate2ResponseContent( __exception_422 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.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)); } // Failed to communicate with the pod handling this session. if ((int)__response.StatusCode == 502) @@ -627,18 +622,17 @@ partial void ProcessCreate2ResponseContent( __exception_502 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_502 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_502, - statusCode: __response.StatusCode) - { - ResponseBody = __content_502, - ResponseObject = __value_502, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_502, + responseObject: __value_502, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -672,17 +666,15 @@ partial void ProcessCreate2ResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -719,17 +711,15 @@ partial void ProcessCreate2ResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.AgentEventsClient.Create2AsStream.g.cs b/src/libs/Vectara/Generated/Vectara.AgentEventsClient.Create2AsStream.g.cs index 1c123aca..d41d1d36 100644 --- a/src/libs/Vectara/Generated/Vectara.AgentEventsClient.Create2AsStream.g.cs +++ b/src/libs/Vectara/Generated/Vectara.AgentEventsClient.Create2AsStream.g.cs @@ -386,17 +386,15 @@ partial void ProcessCreate2AsStreamResponse( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } using var __stream = await __response.Content.ReadAsStreamAsync( @@ -415,16 +413,15 @@ partial void ProcessCreate2AsStreamResponse( } var __streamedResponse = global::Vectara.AgentStreamedResponse.FromJson(__content, JsonSerializerContext) ?? - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: $"Response deserialization failed for \"{__content}\" ", - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + innerException: null, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); yield return __streamedResponse; } diff --git a/src/libs/Vectara/Generated/Vectara.AgentEventsClient.Delete2.g.cs b/src/libs/Vectara/Generated/Vectara.AgentEventsClient.Delete2.g.cs index 420d8f35..706ddb42 100644 --- a/src/libs/Vectara/Generated/Vectara.AgentEventsClient.Delete2.g.cs +++ b/src/libs/Vectara/Generated/Vectara.AgentEventsClient.Delete2.g.cs @@ -421,18 +421,17 @@ await Delete2AsResponseAsync( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -459,17 +458,15 @@ await Delete2AsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -497,17 +494,15 @@ await Delete2AsResponseAsync( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.AgentEventsClient.Get2.g.cs b/src/libs/Vectara/Generated/Vectara.AgentEventsClient.Get2.g.cs index 7dc968c9..375080e4 100644 --- a/src/libs/Vectara/Generated/Vectara.AgentEventsClient.Get2.g.cs +++ b/src/libs/Vectara/Generated/Vectara.AgentEventsClient.Get2.g.cs @@ -432,18 +432,17 @@ partial void ProcessGet2ResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Agent, session, or event not found. if ((int)__response.StatusCode == 404) @@ -470,18 +469,17 @@ partial void ProcessGet2ResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -515,17 +513,15 @@ partial void ProcessGet2ResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -562,17 +558,15 @@ partial void ProcessGet2ResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.AgentEventsClient.Hide.g.cs b/src/libs/Vectara/Generated/Vectara.AgentEventsClient.Hide.g.cs index 0893c006..67a36a79 100644 --- a/src/libs/Vectara/Generated/Vectara.AgentEventsClient.Hide.g.cs +++ b/src/libs/Vectara/Generated/Vectara.AgentEventsClient.Hide.g.cs @@ -428,18 +428,17 @@ partial void ProcessHideResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -473,17 +472,15 @@ partial void ProcessHideResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -520,17 +517,15 @@ partial void ProcessHideResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.AgentEventsClient.List2.g.cs b/src/libs/Vectara/Generated/Vectara.AgentEventsClient.List2.g.cs index 77a6c709..029323c8 100644 --- a/src/libs/Vectara/Generated/Vectara.AgentEventsClient.List2.g.cs +++ b/src/libs/Vectara/Generated/Vectara.AgentEventsClient.List2.g.cs @@ -459,18 +459,17 @@ partial void ProcessList2ResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Agent or session not found. if ((int)__response.StatusCode == 404) @@ -497,18 +496,17 @@ partial void ProcessList2ResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -542,17 +540,15 @@ partial void ProcessList2ResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -589,17 +585,15 @@ partial void ProcessList2ResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.AgentEventsClient.Unhide.g.cs b/src/libs/Vectara/Generated/Vectara.AgentEventsClient.Unhide.g.cs index 2525dd47..478fc56a 100644 --- a/src/libs/Vectara/Generated/Vectara.AgentEventsClient.Unhide.g.cs +++ b/src/libs/Vectara/Generated/Vectara.AgentEventsClient.Unhide.g.cs @@ -428,18 +428,17 @@ partial void ProcessUnhideResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -473,17 +472,15 @@ partial void ProcessUnhideResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -520,17 +517,15 @@ partial void ProcessUnhideResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.AgentSchedulesClient.Create.g.cs b/src/libs/Vectara/Generated/Vectara.AgentSchedulesClient.Create.g.cs index 299d0355..3e5b932b 100644 --- a/src/libs/Vectara/Generated/Vectara.AgentSchedulesClient.Create.g.cs +++ b/src/libs/Vectara/Generated/Vectara.AgentSchedulesClient.Create.g.cs @@ -464,18 +464,17 @@ partial void ProcessCreateResponseContent( __exception_400 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Permissions do not allow creating schedules for this agent. if ((int)__response.StatusCode == 403) @@ -502,18 +501,17 @@ partial void ProcessCreateResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Referenced agent not found. if ((int)__response.StatusCode == 404) @@ -540,18 +538,17 @@ partial void ProcessCreateResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // A schedule with the specified key already exists. if ((int)__response.StatusCode == 409) @@ -578,18 +575,17 @@ partial void ProcessCreateResponseContent( __exception_409 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_409 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_409, - statusCode: __response.StatusCode) - { - ResponseBody = __content_409, - ResponseObject = __value_409, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_409, + responseObject: __value_409, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -623,17 +619,15 @@ partial void ProcessCreateResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -670,17 +664,15 @@ partial void ProcessCreateResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.AgentSchedulesClient.Delete.g.cs b/src/libs/Vectara/Generated/Vectara.AgentSchedulesClient.Delete.g.cs index 6aaafbff..7319730e 100644 --- a/src/libs/Vectara/Generated/Vectara.AgentSchedulesClient.Delete.g.cs +++ b/src/libs/Vectara/Generated/Vectara.AgentSchedulesClient.Delete.g.cs @@ -416,18 +416,17 @@ await DeleteAsResponseAsync( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Agent or schedule not found. if ((int)__response.StatusCode == 404) @@ -454,18 +453,17 @@ await DeleteAsResponseAsync( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -492,17 +490,15 @@ await DeleteAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -530,17 +526,15 @@ await DeleteAsResponseAsync( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.AgentSchedulesClient.Get.g.cs b/src/libs/Vectara/Generated/Vectara.AgentSchedulesClient.Get.g.cs index 3c00ddd5..fc066631 100644 --- a/src/libs/Vectara/Generated/Vectara.AgentSchedulesClient.Get.g.cs +++ b/src/libs/Vectara/Generated/Vectara.AgentSchedulesClient.Get.g.cs @@ -421,18 +421,17 @@ partial void ProcessGetResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Agent or schedule not found. if ((int)__response.StatusCode == 404) @@ -459,18 +458,17 @@ partial void ProcessGetResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -504,17 +502,15 @@ partial void ProcessGetResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -551,17 +547,15 @@ partial void ProcessGetResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.AgentSchedulesClient.List.g.cs b/src/libs/Vectara/Generated/Vectara.AgentSchedulesClient.List.g.cs index d685b79d..8b95b289 100644 --- a/src/libs/Vectara/Generated/Vectara.AgentSchedulesClient.List.g.cs +++ b/src/libs/Vectara/Generated/Vectara.AgentSchedulesClient.List.g.cs @@ -430,18 +430,17 @@ partial void ProcessListResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Agent not found. if ((int)__response.StatusCode == 404) @@ -468,18 +467,17 @@ partial void ProcessListResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -513,17 +511,15 @@ partial void ProcessListResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -560,17 +556,15 @@ partial void ProcessListResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.AgentSchedulesClient.ListExecutions.g.cs b/src/libs/Vectara/Generated/Vectara.AgentSchedulesClient.ListExecutions.g.cs index cc1c9282..6de38ca1 100644 --- a/src/libs/Vectara/Generated/Vectara.AgentSchedulesClient.ListExecutions.g.cs +++ b/src/libs/Vectara/Generated/Vectara.AgentSchedulesClient.ListExecutions.g.cs @@ -454,17 +454,15 @@ partial void ProcessListExecutionsResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 +499,15 @@ partial void ProcessListExecutionsResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.AgentSchedulesClient.Update.g.cs b/src/libs/Vectara/Generated/Vectara.AgentSchedulesClient.Update.g.cs index 1f121fa4..1499cf6e 100644 --- a/src/libs/Vectara/Generated/Vectara.AgentSchedulesClient.Update.g.cs +++ b/src/libs/Vectara/Generated/Vectara.AgentSchedulesClient.Update.g.cs @@ -443,18 +443,17 @@ partial void ProcessUpdateResponseContent( __exception_400 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Permissions do not allow updating this schedule. if ((int)__response.StatusCode == 403) @@ -481,18 +480,17 @@ partial void ProcessUpdateResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Agent or schedule not found. if ((int)__response.StatusCode == 404) @@ -519,18 +517,17 @@ partial void ProcessUpdateResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -564,17 +561,15 @@ partial void ProcessUpdateResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -611,17 +606,15 @@ partial void ProcessUpdateResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.AgentSessionsClient.Create.g.cs b/src/libs/Vectara/Generated/Vectara.AgentSessionsClient.Create.g.cs index e50e6f70..79bd0006 100644 --- a/src/libs/Vectara/Generated/Vectara.AgentSessionsClient.Create.g.cs +++ b/src/libs/Vectara/Generated/Vectara.AgentSessionsClient.Create.g.cs @@ -458,18 +458,17 @@ partial void ProcessCreateResponseContent( __exception_400 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Permissions do not allow creating sessions for this agent. if ((int)__response.StatusCode == 403) @@ -496,18 +495,17 @@ partial void ProcessCreateResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Referenced agent not found. if ((int)__response.StatusCode == 404) @@ -534,18 +532,17 @@ partial void ProcessCreateResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -579,17 +576,15 @@ partial void ProcessCreateResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -626,17 +621,15 @@ partial void ProcessCreateResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.AgentSessionsClient.Delete.g.cs b/src/libs/Vectara/Generated/Vectara.AgentSessionsClient.Delete.g.cs index be204584..326bfbaa 100644 --- a/src/libs/Vectara/Generated/Vectara.AgentSessionsClient.Delete.g.cs +++ b/src/libs/Vectara/Generated/Vectara.AgentSessionsClient.Delete.g.cs @@ -412,18 +412,17 @@ await DeleteAsResponseAsync( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Agent or session not found. if ((int)__response.StatusCode == 404) @@ -450,18 +449,17 @@ await DeleteAsResponseAsync( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -488,17 +486,15 @@ await DeleteAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -526,17 +522,15 @@ await DeleteAsResponseAsync( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.AgentSessionsClient.Get.g.cs b/src/libs/Vectara/Generated/Vectara.AgentSessionsClient.Get.g.cs index d9a2e41e..5bcbcced 100644 --- a/src/libs/Vectara/Generated/Vectara.AgentSessionsClient.Get.g.cs +++ b/src/libs/Vectara/Generated/Vectara.AgentSessionsClient.Get.g.cs @@ -419,18 +419,17 @@ partial void ProcessGetResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Agent or session not found. if ((int)__response.StatusCode == 404) @@ -457,18 +456,17 @@ partial void ProcessGetResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -502,17 +500,15 @@ partial void ProcessGetResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -549,17 +545,15 @@ partial void ProcessGetResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.AgentSessionsClient.List.g.cs b/src/libs/Vectara/Generated/Vectara.AgentSessionsClient.List.g.cs index 932f0261..b9161e19 100644 --- a/src/libs/Vectara/Generated/Vectara.AgentSessionsClient.List.g.cs +++ b/src/libs/Vectara/Generated/Vectara.AgentSessionsClient.List.g.cs @@ -47,6 +47,7 @@ partial void PrepareListArguments( ref int? requestTimeoutMillis, ref string agentKey, ref string? filter, + ref string? metadataFilter, ref int? limit, ref string? pageKey); partial void PrepareListRequest( @@ -56,6 +57,7 @@ partial void PrepareListRequest( int? requestTimeoutMillis, string agentKey, string? filter, + string? metadataFilter, int? limit, string? pageKey); partial void ProcessListResponse( @@ -80,6 +82,9 @@ partial void ProcessListResponseContent( /// /// Example: support.* /// + /// + /// Example: user_role = 'premium' AND tier >= 2 + /// /// /// Default Value: 10 /// @@ -92,6 +97,7 @@ partial void ProcessListResponseContent( int? requestTimeout = default, int? requestTimeoutMillis = default, string? filter = default, + string? metadataFilter = default, int? limit = default, string? pageKey = default, global::Vectara.AutoSDKRequestOptions? requestOptions = default, @@ -102,6 +108,7 @@ partial void ProcessListResponseContent( requestTimeout: requestTimeout, requestTimeoutMillis: requestTimeoutMillis, filter: filter, + metadataFilter: metadataFilter, limit: limit, pageKey: pageKey, requestOptions: requestOptions, @@ -123,6 +130,9 @@ partial void ProcessListResponseContent( /// /// Example: support.* /// + /// + /// Example: user_role = 'premium' AND tier >= 2 + /// /// /// Default Value: 10 /// @@ -135,6 +145,7 @@ partial void ProcessListResponseContent( int? requestTimeout = default, int? requestTimeoutMillis = default, string? filter = default, + string? metadataFilter = default, int? limit = default, string? pageKey = default, global::Vectara.AutoSDKRequestOptions? requestOptions = default, @@ -148,6 +159,7 @@ partial void ProcessListResponseContent( requestTimeoutMillis: ref requestTimeoutMillis, agentKey: ref agentKey, filter: ref filter, + metadataFilter: ref metadataFilter, limit: ref limit, pageKey: ref pageKey); @@ -179,6 +191,7 @@ partial void ProcessListResponseContent( baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("filter", filter) + .AddOptionalParameter("metadata_filter", metadataFilter) .AddOptionalParameter("limit", limit?.ToString()) .AddOptionalParameter("page_key", pageKey) ; @@ -236,6 +249,7 @@ partial void ProcessListResponseContent( requestTimeoutMillis: requestTimeoutMillis, agentKey: agentKey!, filter: filter, + metadataFilter: metadataFilter, limit: limit, pageKey: pageKey); @@ -444,18 +458,17 @@ partial void ProcessListResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Agent not found. if ((int)__response.StatusCode == 404) @@ -482,18 +495,17 @@ partial void ProcessListResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -527,17 +539,15 @@ partial void ProcessListResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -574,17 +584,15 @@ partial void ProcessListResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.AgentSessionsClient.Update.g.cs b/src/libs/Vectara/Generated/Vectara.AgentSessionsClient.Update.g.cs index 9d89e1bb..14691676 100644 --- a/src/libs/Vectara/Generated/Vectara.AgentSessionsClient.Update.g.cs +++ b/src/libs/Vectara/Generated/Vectara.AgentSessionsClient.Update.g.cs @@ -441,18 +441,17 @@ partial void ProcessUpdateResponseContent( __exception_400 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Permissions do not allow updating this agent session. if ((int)__response.StatusCode == 403) @@ -479,18 +478,17 @@ partial void ProcessUpdateResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Agent or session not found. if ((int)__response.StatusCode == 404) @@ -517,18 +515,17 @@ partial void ProcessUpdateResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -562,17 +559,15 @@ partial void ProcessUpdateResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -609,17 +604,15 @@ partial void ProcessUpdateResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.AgentsClient.Create.g.cs b/src/libs/Vectara/Generated/Vectara.AgentsClient.Create.g.cs index 4bb317c3..7bb2c746 100644 --- a/src/libs/Vectara/Generated/Vectara.AgentsClient.Create.g.cs +++ b/src/libs/Vectara/Generated/Vectara.AgentsClient.Create.g.cs @@ -455,18 +455,17 @@ partial void ProcessCreateResponseContent( __exception_400 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Permissions do not allow creating agents. if ((int)__response.StatusCode == 403) @@ -493,18 +492,17 @@ partial void ProcessCreateResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -538,17 +536,15 @@ partial void ProcessCreateResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -585,17 +581,15 @@ partial void ProcessCreateResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.AgentsClient.CreateConnector.g.cs b/src/libs/Vectara/Generated/Vectara.AgentsClient.CreateConnector.g.cs index 4f7214ab..3e34a387 100644 --- a/src/libs/Vectara/Generated/Vectara.AgentsClient.CreateConnector.g.cs +++ b/src/libs/Vectara/Generated/Vectara.AgentsClient.CreateConnector.g.cs @@ -424,18 +424,17 @@ partial void ProcessCreateConnectorResponseContent( __exception_400 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Permissions do not allow creating connectors for this agent. if ((int)__response.StatusCode == 403) @@ -462,18 +461,17 @@ partial void ProcessCreateConnectorResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Agent not found. if ((int)__response.StatusCode == 404) @@ -500,18 +498,17 @@ partial void ProcessCreateConnectorResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -545,17 +542,15 @@ partial void ProcessCreateConnectorResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -592,17 +587,15 @@ partial void ProcessCreateConnectorResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.AgentsClient.Delete.g.cs b/src/libs/Vectara/Generated/Vectara.AgentsClient.Delete.g.cs index 1a3a62d5..4f6d25c7 100644 --- a/src/libs/Vectara/Generated/Vectara.AgentsClient.Delete.g.cs +++ b/src/libs/Vectara/Generated/Vectara.AgentsClient.Delete.g.cs @@ -399,18 +399,17 @@ await DeleteAsResponseAsync( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Agent not found. if ((int)__response.StatusCode == 404) @@ -437,18 +436,17 @@ await DeleteAsResponseAsync( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -475,17 +473,15 @@ await DeleteAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -513,17 +509,15 @@ await DeleteAsResponseAsync( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.AgentsClient.DeleteConnector.g.cs b/src/libs/Vectara/Generated/Vectara.AgentsClient.DeleteConnector.g.cs index 92d95497..78cae897 100644 --- a/src/libs/Vectara/Generated/Vectara.AgentsClient.DeleteConnector.g.cs +++ b/src/libs/Vectara/Generated/Vectara.AgentsClient.DeleteConnector.g.cs @@ -410,18 +410,17 @@ await DeleteConnectorAsResponseAsync( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Agent or connector not found. if ((int)__response.StatusCode == 404) @@ -448,18 +447,17 @@ await DeleteConnectorAsResponseAsync( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -486,17 +484,15 @@ await DeleteConnectorAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -524,17 +520,15 @@ await DeleteConnectorAsResponseAsync( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.AgentsClient.Get.g.cs b/src/libs/Vectara/Generated/Vectara.AgentsClient.Get.g.cs index d83fa3aa..88c7a059 100644 --- a/src/libs/Vectara/Generated/Vectara.AgentsClient.Get.g.cs +++ b/src/libs/Vectara/Generated/Vectara.AgentsClient.Get.g.cs @@ -406,18 +406,17 @@ partial void ProcessGetResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Agent not found. if ((int)__response.StatusCode == 404) @@ -444,18 +443,17 @@ partial void ProcessGetResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -489,17 +487,15 @@ partial void ProcessGetResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -536,17 +532,15 @@ partial void ProcessGetResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.AgentsClient.GetConnector.g.cs b/src/libs/Vectara/Generated/Vectara.AgentsClient.GetConnector.g.cs index 55ebc157..7c5f35f4 100644 --- a/src/libs/Vectara/Generated/Vectara.AgentsClient.GetConnector.g.cs +++ b/src/libs/Vectara/Generated/Vectara.AgentsClient.GetConnector.g.cs @@ -417,18 +417,17 @@ partial void ProcessGetConnectorResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Agent or connector not found. if ((int)__response.StatusCode == 404) @@ -455,18 +454,17 @@ partial void ProcessGetConnectorResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -500,17 +498,15 @@ partial void ProcessGetConnectorResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -547,17 +543,15 @@ partial void ProcessGetConnectorResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.AgentsClient.GetIdentity.g.cs b/src/libs/Vectara/Generated/Vectara.AgentsClient.GetIdentity.g.cs index 64b0f51f..e9a317fb 100644 --- a/src/libs/Vectara/Generated/Vectara.AgentsClient.GetIdentity.g.cs +++ b/src/libs/Vectara/Generated/Vectara.AgentsClient.GetIdentity.g.cs @@ -408,18 +408,17 @@ partial void ProcessGetIdentityResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Agent not found. if ((int)__response.StatusCode == 404) @@ -446,18 +445,17 @@ partial void ProcessGetIdentityResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -491,17 +489,15 @@ partial void ProcessGetIdentityResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -538,17 +534,15 @@ partial void ProcessGetIdentityResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.AgentsClient.GetSecrets.g.cs b/src/libs/Vectara/Generated/Vectara.AgentsClient.GetSecrets.g.cs index 9edc827e..997f5861 100644 --- a/src/libs/Vectara/Generated/Vectara.AgentsClient.GetSecrets.g.cs +++ b/src/libs/Vectara/Generated/Vectara.AgentsClient.GetSecrets.g.cs @@ -404,18 +404,17 @@ partial void ProcessGetSecretsResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Agent not found. if ((int)__response.StatusCode == 404) @@ -442,18 +441,17 @@ partial void ProcessGetSecretsResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -487,17 +485,15 @@ partial void ProcessGetSecretsResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -534,17 +530,15 @@ partial void ProcessGetSecretsResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.AgentsClient.List.g.cs b/src/libs/Vectara/Generated/Vectara.AgentsClient.List.g.cs index 2c6182cb..d4eadc15 100644 --- a/src/libs/Vectara/Generated/Vectara.AgentsClient.List.g.cs +++ b/src/libs/Vectara/Generated/Vectara.AgentsClient.List.g.cs @@ -443,18 +443,17 @@ partial void ProcessListResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -488,17 +487,15 @@ partial void ProcessListResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -535,17 +532,15 @@ partial void ProcessListResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.AgentsClient.ListConnectors.g.cs b/src/libs/Vectara/Generated/Vectara.AgentsClient.ListConnectors.g.cs index 669126ad..e7fb9e4c 100644 --- a/src/libs/Vectara/Generated/Vectara.AgentsClient.ListConnectors.g.cs +++ b/src/libs/Vectara/Generated/Vectara.AgentsClient.ListConnectors.g.cs @@ -458,18 +458,17 @@ partial void ProcessListConnectorsResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Agent not found. if ((int)__response.StatusCode == 404) @@ -496,18 +495,17 @@ partial void ProcessListConnectorsResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -541,17 +539,15 @@ partial void ProcessListConnectorsResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -588,17 +584,15 @@ partial void ProcessListConnectorsResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.AgentsClient.Replace.g.cs b/src/libs/Vectara/Generated/Vectara.AgentsClient.Replace.g.cs index 5c6fc5d5..32434153 100644 --- a/src/libs/Vectara/Generated/Vectara.AgentsClient.Replace.g.cs +++ b/src/libs/Vectara/Generated/Vectara.AgentsClient.Replace.g.cs @@ -424,18 +424,17 @@ partial void ProcessReplaceResponseContent( __exception_400 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Permissions do not allow replacing this agent. if ((int)__response.StatusCode == 403) @@ -462,18 +461,17 @@ partial void ProcessReplaceResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Agent not found. if ((int)__response.StatusCode == 404) @@ -500,18 +498,17 @@ partial void ProcessReplaceResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -545,17 +542,15 @@ partial void ProcessReplaceResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -592,17 +587,15 @@ partial void ProcessReplaceResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.AgentsClient.ReplaceSecrets.g.cs b/src/libs/Vectara/Generated/Vectara.AgentsClient.ReplaceSecrets.g.cs index 8cd3c00e..2862fb47 100644 --- a/src/libs/Vectara/Generated/Vectara.AgentsClient.ReplaceSecrets.g.cs +++ b/src/libs/Vectara/Generated/Vectara.AgentsClient.ReplaceSecrets.g.cs @@ -426,18 +426,17 @@ partial void ProcessReplaceSecretsResponseContent( __exception_400 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Permissions do not allow modifying this agent. if ((int)__response.StatusCode == 403) @@ -464,18 +463,17 @@ partial void ProcessReplaceSecretsResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Agent not found. if ((int)__response.StatusCode == 404) @@ -502,18 +500,17 @@ partial void ProcessReplaceSecretsResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -547,17 +544,15 @@ partial void ProcessReplaceSecretsResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -594,17 +589,15 @@ partial void ProcessReplaceSecretsResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.AgentsClient.Update.g.cs b/src/libs/Vectara/Generated/Vectara.AgentsClient.Update.g.cs index b608f745..85607e8f 100644 --- a/src/libs/Vectara/Generated/Vectara.AgentsClient.Update.g.cs +++ b/src/libs/Vectara/Generated/Vectara.AgentsClient.Update.g.cs @@ -426,18 +426,17 @@ partial void ProcessUpdateResponseContent( __exception_400 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Permissions do not allow updating this agent. if ((int)__response.StatusCode == 403) @@ -464,18 +463,17 @@ partial void ProcessUpdateResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Agent not found. if ((int)__response.StatusCode == 404) @@ -502,18 +500,17 @@ partial void ProcessUpdateResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -547,17 +544,15 @@ partial void ProcessUpdateResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -594,17 +589,15 @@ partial void ProcessUpdateResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.AgentsClient.UpdateConnector.g.cs b/src/libs/Vectara/Generated/Vectara.AgentsClient.UpdateConnector.g.cs index f94d520c..0dcaa1ba 100644 --- a/src/libs/Vectara/Generated/Vectara.AgentsClient.UpdateConnector.g.cs +++ b/src/libs/Vectara/Generated/Vectara.AgentsClient.UpdateConnector.g.cs @@ -437,18 +437,17 @@ partial void ProcessUpdateConnectorResponseContent( __exception_400 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Permissions do not allow updating this connector. if ((int)__response.StatusCode == 403) @@ -475,18 +474,17 @@ partial void ProcessUpdateConnectorResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Agent or connector not found. if ((int)__response.StatusCode == 404) @@ -513,18 +511,17 @@ partial void ProcessUpdateConnectorResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -558,17 +555,15 @@ partial void ProcessUpdateConnectorResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -605,17 +600,15 @@ partial void ProcessUpdateConnectorResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.AgentsClient.UpdateIdentity.g.cs b/src/libs/Vectara/Generated/Vectara.AgentsClient.UpdateIdentity.g.cs index 2f3bd299..ad87a368 100644 --- a/src/libs/Vectara/Generated/Vectara.AgentsClient.UpdateIdentity.g.cs +++ b/src/libs/Vectara/Generated/Vectara.AgentsClient.UpdateIdentity.g.cs @@ -428,18 +428,17 @@ partial void ProcessUpdateIdentityResponseContent( __exception_400 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Permissions do not allow modifying this agent. if ((int)__response.StatusCode == 403) @@ -466,18 +465,17 @@ partial void ProcessUpdateIdentityResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Agent not found. if ((int)__response.StatusCode == 404) @@ -504,18 +502,17 @@ partial void ProcessUpdateIdentityResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -549,17 +546,15 @@ partial void ProcessUpdateIdentityResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -596,17 +591,15 @@ partial void ProcessUpdateIdentityResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.AgentsClient.UpdateSecrets.g.cs b/src/libs/Vectara/Generated/Vectara.AgentsClient.UpdateSecrets.g.cs index a7263582..edca8ca8 100644 --- a/src/libs/Vectara/Generated/Vectara.AgentsClient.UpdateSecrets.g.cs +++ b/src/libs/Vectara/Generated/Vectara.AgentsClient.UpdateSecrets.g.cs @@ -426,18 +426,17 @@ partial void ProcessUpdateSecretsResponseContent( __exception_400 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Permissions do not allow modifying this agent. if ((int)__response.StatusCode == 403) @@ -464,18 +463,17 @@ partial void ProcessUpdateSecretsResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Agent not found. if ((int)__response.StatusCode == 404) @@ -502,18 +500,17 @@ partial void ProcessUpdateSecretsResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -547,17 +544,15 @@ partial void ProcessUpdateSecretsResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -594,17 +589,15 @@ partial void ProcessUpdateSecretsResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.ApiKeysClient.Create.g.cs b/src/libs/Vectara/Generated/Vectara.ApiKeysClient.Create.g.cs index 4cabfd94..df420fea 100644 --- a/src/libs/Vectara/Generated/Vectara.ApiKeysClient.Create.g.cs +++ b/src/libs/Vectara/Generated/Vectara.ApiKeysClient.Create.g.cs @@ -419,18 +419,17 @@ partial void ProcessCreateResponseContent( __exception_400 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Permissions do not allow creating the API key. if ((int)__response.StatusCode == 403) @@ -457,18 +456,17 @@ partial void ProcessCreateResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -502,17 +500,15 @@ partial void ProcessCreateResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -549,17 +545,15 @@ partial void ProcessCreateResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.ApiKeysClient.Delete.g.cs b/src/libs/Vectara/Generated/Vectara.ApiKeysClient.Delete.g.cs index a7dbc151..d3f76f0d 100644 --- a/src/libs/Vectara/Generated/Vectara.ApiKeysClient.Delete.g.cs +++ b/src/libs/Vectara/Generated/Vectara.ApiKeysClient.Delete.g.cs @@ -395,18 +395,17 @@ await DeleteAsResponseAsync( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -433,17 +432,15 @@ await DeleteAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -471,17 +468,15 @@ await DeleteAsResponseAsync( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.ApiKeysClient.Get.g.cs b/src/libs/Vectara/Generated/Vectara.ApiKeysClient.Get.g.cs index df960516..573d9385 100644 --- a/src/libs/Vectara/Generated/Vectara.ApiKeysClient.Get.g.cs +++ b/src/libs/Vectara/Generated/Vectara.ApiKeysClient.Get.g.cs @@ -400,18 +400,17 @@ partial void ProcessGetResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -445,17 +444,15 @@ partial void ProcessGetResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -492,17 +489,15 @@ partial void ProcessGetResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.ApiKeysClient.List.g.cs b/src/libs/Vectara/Generated/Vectara.ApiKeysClient.List.g.cs index 45ad3044..3f918793 100644 --- a/src/libs/Vectara/Generated/Vectara.ApiKeysClient.List.g.cs +++ b/src/libs/Vectara/Generated/Vectara.ApiKeysClient.List.g.cs @@ -447,18 +447,17 @@ partial void ProcessListResponseContent( __exception_400 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Permissions do not allow listing API keys. if ((int)__response.StatusCode == 403) @@ -485,18 +484,17 @@ partial void ProcessListResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -530,17 +528,15 @@ partial void ProcessListResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -577,17 +573,15 @@ partial void ProcessListResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.ApiKeysClient.Update.g.cs b/src/libs/Vectara/Generated/Vectara.ApiKeysClient.Update.g.cs index 3e543f3f..d3b93f5e 100644 --- a/src/libs/Vectara/Generated/Vectara.ApiKeysClient.Update.g.cs +++ b/src/libs/Vectara/Generated/Vectara.ApiKeysClient.Update.g.cs @@ -420,18 +420,17 @@ partial void ProcessUpdateResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -465,17 +464,15 @@ partial void ProcessUpdateResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -512,17 +509,15 @@ partial void ProcessUpdateResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.AppClientsClient.Create.g.cs b/src/libs/Vectara/Generated/Vectara.AppClientsClient.Create.g.cs index 6e0447c9..4faf044c 100644 --- a/src/libs/Vectara/Generated/Vectara.AppClientsClient.Create.g.cs +++ b/src/libs/Vectara/Generated/Vectara.AppClientsClient.Create.g.cs @@ -407,18 +407,17 @@ partial void ProcessCreateResponseContent( __exception_400 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Permissions do not allow creating the App Client. if ((int)__response.StatusCode == 403) @@ -445,18 +444,17 @@ partial void ProcessCreateResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -490,17 +488,15 @@ partial void ProcessCreateResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -537,17 +533,15 @@ partial void ProcessCreateResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.AppClientsClient.Delete.g.cs b/src/libs/Vectara/Generated/Vectara.AppClientsClient.Delete.g.cs index c873fa12..7a844f7c 100644 --- a/src/libs/Vectara/Generated/Vectara.AppClientsClient.Delete.g.cs +++ b/src/libs/Vectara/Generated/Vectara.AppClientsClient.Delete.g.cs @@ -391,18 +391,17 @@ await DeleteAsResponseAsync( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -429,17 +428,15 @@ await DeleteAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -467,17 +464,15 @@ await DeleteAsResponseAsync( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.AppClientsClient.Get.g.cs b/src/libs/Vectara/Generated/Vectara.AppClientsClient.Get.g.cs index 32b2332f..b54757f9 100644 --- a/src/libs/Vectara/Generated/Vectara.AppClientsClient.Get.g.cs +++ b/src/libs/Vectara/Generated/Vectara.AppClientsClient.Get.g.cs @@ -398,18 +398,17 @@ partial void ProcessGetResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + 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 ProcessGetResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -490,17 +487,15 @@ partial void ProcessGetResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.AppClientsClient.List.g.cs b/src/libs/Vectara/Generated/Vectara.AppClientsClient.List.g.cs index 04a2247c..9bb54e8d 100644 --- a/src/libs/Vectara/Generated/Vectara.AppClientsClient.List.g.cs +++ b/src/libs/Vectara/Generated/Vectara.AppClientsClient.List.g.cs @@ -425,18 +425,17 @@ partial void ProcessListResponseContent( __exception_400 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Permissions do not allow listing App Clients. if ((int)__response.StatusCode == 403) @@ -463,18 +462,17 @@ partial void ProcessListResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -508,17 +506,15 @@ partial void ProcessListResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 +551,15 @@ partial void ProcessListResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.AppClientsClient.Update.g.cs b/src/libs/Vectara/Generated/Vectara.AppClientsClient.Update.g.cs index 6344d90b..e3702873 100644 --- a/src/libs/Vectara/Generated/Vectara.AppClientsClient.Update.g.cs +++ b/src/libs/Vectara/Generated/Vectara.AppClientsClient.Update.g.cs @@ -418,18 +418,17 @@ partial void ProcessUpdateResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -463,17 +462,15 @@ partial void ProcessUpdateResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -510,17 +507,15 @@ partial void ProcessUpdateResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.AuthenticationClient.GetToken.g.cs b/src/libs/Vectara/Generated/Vectara.AuthenticationClient.GetToken.g.cs index 4a46e5c6..05f37aa1 100644 --- a/src/libs/Vectara/Generated/Vectara.AuthenticationClient.GetToken.g.cs +++ b/src/libs/Vectara/Generated/Vectara.AuthenticationClient.GetToken.g.cs @@ -326,17 +326,15 @@ partial void ProcessGetTokenResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -373,17 +371,15 @@ partial void ProcessGetTokenResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.CorporaClient.ComputeSize.g.cs b/src/libs/Vectara/Generated/Vectara.CorporaClient.ComputeSize.g.cs index 633f2e93..4a232b09 100644 --- a/src/libs/Vectara/Generated/Vectara.CorporaClient.ComputeSize.g.cs +++ b/src/libs/Vectara/Generated/Vectara.CorporaClient.ComputeSize.g.cs @@ -404,18 +404,17 @@ partial void ProcessComputeSizeResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Corpus not found. if ((int)__response.StatusCode == 404) @@ -442,18 +441,17 @@ partial void ProcessComputeSizeResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -487,17 +485,15 @@ partial void ProcessComputeSizeResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -534,17 +530,15 @@ partial void ProcessComputeSizeResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.CorporaClient.Create.g.cs b/src/libs/Vectara/Generated/Vectara.CorporaClient.Create.g.cs index f909acd4..26e3a74e 100644 --- a/src/libs/Vectara/Generated/Vectara.CorporaClient.Create.g.cs +++ b/src/libs/Vectara/Generated/Vectara.CorporaClient.Create.g.cs @@ -443,18 +443,17 @@ partial void ProcessCreateResponseContent( __exception_400 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Permissions do not allow creating a corpus. if ((int)__response.StatusCode == 403) @@ -481,18 +480,17 @@ partial void ProcessCreateResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // The corpus already exists if ((int)__response.StatusCode == 409) @@ -519,18 +517,17 @@ partial void ProcessCreateResponseContent( __exception_409 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_409 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_409, - statusCode: __response.StatusCode) - { - ResponseBody = __content_409, - ResponseObject = __value_409, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_409, + responseObject: __value_409, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -564,17 +561,15 @@ partial void ProcessCreateResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -611,17 +606,15 @@ partial void ProcessCreateResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.CorporaClient.Delete.g.cs b/src/libs/Vectara/Generated/Vectara.CorporaClient.Delete.g.cs index db9a2844..b4737dc2 100644 --- a/src/libs/Vectara/Generated/Vectara.CorporaClient.Delete.g.cs +++ b/src/libs/Vectara/Generated/Vectara.CorporaClient.Delete.g.cs @@ -405,18 +405,17 @@ await DeleteAsResponseAsync( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Corpus not found. if ((int)__response.StatusCode == 404) @@ -443,18 +442,17 @@ await DeleteAsResponseAsync( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -481,17 +479,15 @@ await DeleteAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -519,17 +515,15 @@ await DeleteAsResponseAsync( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.CorporaClient.Get.g.cs b/src/libs/Vectara/Generated/Vectara.CorporaClient.Get.g.cs index 82a1f1f1..3db52fe1 100644 --- a/src/libs/Vectara/Generated/Vectara.CorporaClient.Get.g.cs +++ b/src/libs/Vectara/Generated/Vectara.CorporaClient.Get.g.cs @@ -416,18 +416,17 @@ partial void ProcessGetResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Corpus not found. if ((int)__response.StatusCode == 404) @@ -454,18 +453,17 @@ partial void ProcessGetResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -499,17 +497,15 @@ partial void ProcessGetResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -546,17 +542,15 @@ partial void ProcessGetResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.CorporaClient.GetFilterAttributeStats.g.cs b/src/libs/Vectara/Generated/Vectara.CorporaClient.GetFilterAttributeStats.g.cs index b46ff309..6ab7258d 100644 --- a/src/libs/Vectara/Generated/Vectara.CorporaClient.GetFilterAttributeStats.g.cs +++ b/src/libs/Vectara/Generated/Vectara.CorporaClient.GetFilterAttributeStats.g.cs @@ -458,18 +458,17 @@ partial void ProcessGetFilterAttributeStatsResponseContent( __exception_400 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Permissions do not allow retrieving filter attribute statistics for this corpus. if ((int)__response.StatusCode == 403) @@ -496,18 +495,17 @@ partial void ProcessGetFilterAttributeStatsResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Corpus not found. if ((int)__response.StatusCode == 404) @@ -534,18 +532,17 @@ partial void ProcessGetFilterAttributeStatsResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -579,17 +576,15 @@ partial void ProcessGetFilterAttributeStatsResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -626,17 +621,15 @@ partial void ProcessGetFilterAttributeStatsResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.CorporaClient.List.g.cs b/src/libs/Vectara/Generated/Vectara.CorporaClient.List.g.cs index ce1c6a0b..f4db58fd 100644 --- a/src/libs/Vectara/Generated/Vectara.CorporaClient.List.g.cs +++ b/src/libs/Vectara/Generated/Vectara.CorporaClient.List.g.cs @@ -437,18 +437,17 @@ partial void ProcessListResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -482,17 +481,15 @@ partial void ProcessListResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -529,17 +526,15 @@ partial void ProcessListResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.CorporaClient.Query.g.cs b/src/libs/Vectara/Generated/Vectara.CorporaClient.Query.g.cs index c5d4cb3b..569b4ed1 100644 --- a/src/libs/Vectara/Generated/Vectara.CorporaClient.Query.g.cs +++ b/src/libs/Vectara/Generated/Vectara.CorporaClient.Query.g.cs @@ -666,18 +666,17 @@ partial void ProcessQueryResponseContent( __exception_400 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Permissions do not allow querying the corpus. if ((int)__response.StatusCode == 403) @@ -704,18 +703,17 @@ partial void ProcessQueryResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Corpus not found. if ((int)__response.StatusCode == 404) @@ -742,18 +740,17 @@ partial void ProcessQueryResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -787,17 +784,15 @@ partial void ProcessQueryResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -834,17 +829,15 @@ partial void ProcessQueryResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.CorporaClient.QueryAsStream.g.cs b/src/libs/Vectara/Generated/Vectara.CorporaClient.QueryAsStream.g.cs index b5b5abd9..26e80312 100644 --- a/src/libs/Vectara/Generated/Vectara.CorporaClient.QueryAsStream.g.cs +++ b/src/libs/Vectara/Generated/Vectara.CorporaClient.QueryAsStream.g.cs @@ -500,17 +500,15 @@ partial void ProcessQueryAsStreamResponse( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } using var __stream = await __response.Content.ReadAsStreamAsync( @@ -529,16 +527,15 @@ partial void ProcessQueryAsStreamResponse( } var __streamedResponse = global::Vectara.QueryStreamedResponse.FromJson(__content, JsonSerializerContext) ?? - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: $"Response deserialization failed for \"{__content}\" ", - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + innerException: null, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); yield return __streamedResponse; } diff --git a/src/libs/Vectara/Generated/Vectara.CorporaClient.ReplaceFilterAttributes.g.cs b/src/libs/Vectara/Generated/Vectara.CorporaClient.ReplaceFilterAttributes.g.cs index 3776c8dc..3d3fafc1 100644 --- a/src/libs/Vectara/Generated/Vectara.CorporaClient.ReplaceFilterAttributes.g.cs +++ b/src/libs/Vectara/Generated/Vectara.CorporaClient.ReplaceFilterAttributes.g.cs @@ -426,18 +426,17 @@ partial void ProcessReplaceFilterAttributesResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Corpus not found. if ((int)__response.StatusCode == 404) @@ -464,18 +463,17 @@ partial void ProcessReplaceFilterAttributesResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -509,17 +507,15 @@ partial void ProcessReplaceFilterAttributesResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -556,17 +552,15 @@ partial void ProcessReplaceFilterAttributesResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.CorporaClient.Reset.g.cs b/src/libs/Vectara/Generated/Vectara.CorporaClient.Reset.g.cs index 1ba621dd..1c3d9c2d 100644 --- a/src/libs/Vectara/Generated/Vectara.CorporaClient.Reset.g.cs +++ b/src/libs/Vectara/Generated/Vectara.CorporaClient.Reset.g.cs @@ -397,18 +397,17 @@ await ResetAsResponseAsync( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Corpus not found. if ((int)__response.StatusCode == 404) @@ -435,18 +434,17 @@ await ResetAsResponseAsync( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -473,17 +471,15 @@ await ResetAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 +507,15 @@ await ResetAsResponseAsync( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.CorporaClient.Search.g.cs b/src/libs/Vectara/Generated/Vectara.CorporaClient.Search.g.cs index e306419c..e217de22 100644 --- a/src/libs/Vectara/Generated/Vectara.CorporaClient.Search.g.cs +++ b/src/libs/Vectara/Generated/Vectara.CorporaClient.Search.g.cs @@ -482,18 +482,17 @@ partial void ProcessSearchResponseContent( __exception_400 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Permissions do not allow querying the corpus. if ((int)__response.StatusCode == 403) @@ -520,18 +519,17 @@ partial void ProcessSearchResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Corpus not found. if ((int)__response.StatusCode == 404) @@ -558,18 +556,17 @@ partial void ProcessSearchResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -603,17 +600,15 @@ partial void ProcessSearchResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -650,17 +645,15 @@ partial void ProcessSearchResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.CorporaClient.Update.g.cs b/src/libs/Vectara/Generated/Vectara.CorporaClient.Update.g.cs index 8b0faa9e..61ece025 100644 --- a/src/libs/Vectara/Generated/Vectara.CorporaClient.Update.g.cs +++ b/src/libs/Vectara/Generated/Vectara.CorporaClient.Update.g.cs @@ -426,18 +426,17 @@ partial void ProcessUpdateResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Corpus not found. if ((int)__response.StatusCode == 404) @@ -464,18 +463,17 @@ partial void ProcessUpdateResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -509,17 +507,15 @@ partial void ProcessUpdateResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -556,17 +552,15 @@ partial void ProcessUpdateResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.CustomerMetricsClient.Get.g.cs b/src/libs/Vectara/Generated/Vectara.CustomerMetricsClient.Get.g.cs index 78715d82..97f427d9 100644 --- a/src/libs/Vectara/Generated/Vectara.CustomerMetricsClient.Get.g.cs +++ b/src/libs/Vectara/Generated/Vectara.CustomerMetricsClient.Get.g.cs @@ -440,17 +440,16 @@ partial void ProcessGetResponseContent( __exception_400 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.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) @@ -473,17 +472,16 @@ partial void ProcessGetResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.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)); } if (__effectiveReadResponseAsString) @@ -517,17 +515,15 @@ partial void ProcessGetResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -564,17 +560,15 @@ partial void ProcessGetResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.CustomerMetricsClient.List.g.cs b/src/libs/Vectara/Generated/Vectara.CustomerMetricsClient.List.g.cs index 291df4ea..df28a71e 100644 --- a/src/libs/Vectara/Generated/Vectara.CustomerMetricsClient.List.g.cs +++ b/src/libs/Vectara/Generated/Vectara.CustomerMetricsClient.List.g.cs @@ -396,17 +396,15 @@ partial void ProcessListResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -443,17 +441,15 @@ partial void ProcessListResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.DocumentsClient.BulkDelete.g.cs b/src/libs/Vectara/Generated/Vectara.DocumentsClient.BulkDelete.g.cs index ff8b0b4d..3becfa88 100644 --- a/src/libs/Vectara/Generated/Vectara.DocumentsClient.BulkDelete.g.cs +++ b/src/libs/Vectara/Generated/Vectara.DocumentsClient.BulkDelete.g.cs @@ -450,18 +450,17 @@ partial void ProcessBulkDeleteResponseContent( __exception_400 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Permissions do not allow bulk deleting documents. if ((int)__response.StatusCode == 403) @@ -488,18 +487,17 @@ partial void ProcessBulkDeleteResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Corpus not found. if ((int)__response.StatusCode == 404) @@ -526,18 +524,17 @@ partial void ProcessBulkDeleteResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Synchronous operation timed out. The error message contains the job_id to track status via Jobs API. Workflow continues running in background. if ((int)__response.StatusCode == 504) @@ -564,18 +561,17 @@ partial void ProcessBulkDeleteResponseContent( __exception_504 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_504 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_504, - statusCode: __response.StatusCode) - { - ResponseBody = __content_504, - ResponseObject = __value_504, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_504, + responseObject: __value_504, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -609,17 +605,15 @@ partial void ProcessBulkDeleteResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -656,17 +650,15 @@ partial void ProcessBulkDeleteResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.DocumentsClient.Create.g.cs b/src/libs/Vectara/Generated/Vectara.DocumentsClient.Create.g.cs index 527d5c2f..688481f8 100644 --- a/src/libs/Vectara/Generated/Vectara.DocumentsClient.Create.g.cs +++ b/src/libs/Vectara/Generated/Vectara.DocumentsClient.Create.g.cs @@ -480,18 +480,17 @@ partial void ProcessCreateResponseContent( __exception_400 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Permissions do not allow adding a document to the corpus. if ((int)__response.StatusCode == 403) @@ -518,18 +517,17 @@ partial void ProcessCreateResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Corpus not found. if ((int)__response.StatusCode == 404) @@ -556,18 +554,17 @@ partial void ProcessCreateResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // The document already exists if ((int)__response.StatusCode == 409) @@ -594,18 +591,17 @@ partial void ProcessCreateResponseContent( __exception_409 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_409 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_409, - statusCode: __response.StatusCode) - { - ResponseBody = __content_409, - ResponseObject = __value_409, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_409, + responseObject: __value_409, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -639,17 +635,15 @@ partial void ProcessCreateResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -686,17 +680,15 @@ partial void ProcessCreateResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.DocumentsClient.Delete.g.cs b/src/libs/Vectara/Generated/Vectara.DocumentsClient.Delete.g.cs index 4c210832..7359f135 100644 --- a/src/libs/Vectara/Generated/Vectara.DocumentsClient.Delete.g.cs +++ b/src/libs/Vectara/Generated/Vectara.DocumentsClient.Delete.g.cs @@ -406,18 +406,17 @@ await DeleteAsResponseAsync( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Corpus or document not found. if ((int)__response.StatusCode == 404) @@ -444,18 +443,17 @@ await DeleteAsResponseAsync( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -482,17 +480,15 @@ await DeleteAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -520,17 +516,15 @@ await DeleteAsResponseAsync( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.DocumentsClient.Get.g.cs b/src/libs/Vectara/Generated/Vectara.DocumentsClient.Get.g.cs index b32e0efa..34f00f0b 100644 --- a/src/libs/Vectara/Generated/Vectara.DocumentsClient.Get.g.cs +++ b/src/libs/Vectara/Generated/Vectara.DocumentsClient.Get.g.cs @@ -415,18 +415,17 @@ partial void ProcessGetResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Corpus or document not found. if ((int)__response.StatusCode == 404) @@ -453,18 +452,17 @@ partial void ProcessGetResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -498,17 +496,15 @@ partial void ProcessGetResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 +541,15 @@ partial void ProcessGetResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.DocumentsClient.GetImage.g.cs b/src/libs/Vectara/Generated/Vectara.DocumentsClient.GetImage.g.cs index abfe4bb9..095d6fe8 100644 --- a/src/libs/Vectara/Generated/Vectara.DocumentsClient.GetImage.g.cs +++ b/src/libs/Vectara/Generated/Vectara.DocumentsClient.GetImage.g.cs @@ -422,18 +422,17 @@ partial void ProcessGetImageResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Image not found. if ((int)__response.StatusCode == 404) @@ -460,18 +459,17 @@ partial void ProcessGetImageResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -505,17 +503,15 @@ partial void ProcessGetImageResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -552,17 +548,15 @@ partial void ProcessGetImageResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.DocumentsClient.List.g.cs b/src/libs/Vectara/Generated/Vectara.DocumentsClient.List.g.cs index f76cbbf4..dc8f3039 100644 --- a/src/libs/Vectara/Generated/Vectara.DocumentsClient.List.g.cs +++ b/src/libs/Vectara/Generated/Vectara.DocumentsClient.List.g.cs @@ -446,18 +446,17 @@ partial void ProcessListResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Corpus not found. if ((int)__response.StatusCode == 404) @@ -484,18 +483,17 @@ partial void ProcessListResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -529,17 +527,15 @@ partial void ProcessListResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -576,17 +572,15 @@ partial void ProcessListResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.DocumentsClient.Summarize.g.cs b/src/libs/Vectara/Generated/Vectara.DocumentsClient.Summarize.g.cs index 1a9f8168..97149d72 100644 --- a/src/libs/Vectara/Generated/Vectara.DocumentsClient.Summarize.g.cs +++ b/src/libs/Vectara/Generated/Vectara.DocumentsClient.Summarize.g.cs @@ -517,18 +517,17 @@ partial void ProcessSummarizeResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Corpus or document not found. if ((int)__response.StatusCode == 404) @@ -555,18 +554,17 @@ partial void ProcessSummarizeResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -600,17 +598,15 @@ partial void ProcessSummarizeResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -647,17 +643,15 @@ partial void ProcessSummarizeResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.DocumentsClient.SummarizeAsStream.g.cs b/src/libs/Vectara/Generated/Vectara.DocumentsClient.SummarizeAsStream.g.cs index e4635f32..e116c136 100644 --- a/src/libs/Vectara/Generated/Vectara.DocumentsClient.SummarizeAsStream.g.cs +++ b/src/libs/Vectara/Generated/Vectara.DocumentsClient.SummarizeAsStream.g.cs @@ -427,17 +427,15 @@ partial void ProcessSummarizeAsStreamResponse( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } using var __stream = await __response.Content.ReadAsStreamAsync( @@ -456,16 +454,15 @@ partial void ProcessSummarizeAsStreamResponse( } var __streamedResponse = global::Vectara.SummarizeDocumentStreamedResponse.FromJson(__content, JsonSerializerContext) ?? - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: $"Response deserialization failed for \"{__content}\" ", - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + innerException: null, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); yield return __streamedResponse; } diff --git a/src/libs/Vectara/Generated/Vectara.DocumentsClient.Update.g.cs b/src/libs/Vectara/Generated/Vectara.DocumentsClient.Update.g.cs index 7204c920..5609a8c5 100644 --- a/src/libs/Vectara/Generated/Vectara.DocumentsClient.Update.g.cs +++ b/src/libs/Vectara/Generated/Vectara.DocumentsClient.Update.g.cs @@ -433,18 +433,17 @@ partial void ProcessUpdateResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Corpus or document not found. if ((int)__response.StatusCode == 404) @@ -471,18 +470,17 @@ partial void ProcessUpdateResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Too many concurrent requests. Please retry. if ((int)__response.StatusCode == 429) @@ -509,18 +507,17 @@ partial void ProcessUpdateResponseContent( __exception_429 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_429 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_429, - statusCode: __response.StatusCode) - { - ResponseBody = __content_429, - ResponseObject = __value_429, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_429, + responseObject: __value_429, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -554,17 +551,15 @@ partial void ProcessUpdateResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -601,17 +596,15 @@ partial void ProcessUpdateResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.DocumentsClient.UpdateMetadata.g.cs b/src/libs/Vectara/Generated/Vectara.DocumentsClient.UpdateMetadata.g.cs index 6300c1bf..46e7bef8 100644 --- a/src/libs/Vectara/Generated/Vectara.DocumentsClient.UpdateMetadata.g.cs +++ b/src/libs/Vectara/Generated/Vectara.DocumentsClient.UpdateMetadata.g.cs @@ -433,18 +433,17 @@ partial void ProcessUpdateMetadataResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Corpus or document not found. if ((int)__response.StatusCode == 404) @@ -471,18 +470,17 @@ partial void ProcessUpdateMetadataResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Too many concurrent requests. Please retry. if ((int)__response.StatusCode == 429) @@ -509,18 +507,17 @@ partial void ProcessUpdateMetadataResponseContent( __exception_429 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_429 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_429, - statusCode: __response.StatusCode) - { - ResponseBody = __content_429, - ResponseObject = __value_429, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_429, + responseObject: __value_429, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -554,17 +551,15 @@ partial void ProcessUpdateMetadataResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -601,17 +596,15 @@ partial void ProcessUpdateMetadataResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.EncodersClient.Create.g.cs b/src/libs/Vectara/Generated/Vectara.EncodersClient.Create.g.cs index c7aa6534..ff4ac800 100644 --- a/src/libs/Vectara/Generated/Vectara.EncodersClient.Create.g.cs +++ b/src/libs/Vectara/Generated/Vectara.EncodersClient.Create.g.cs @@ -407,18 +407,17 @@ partial void ProcessCreateResponseContent( __exception_400 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Permissions do not allow creating an encoder if ((int)__response.StatusCode == 403) @@ -445,18 +444,17 @@ partial void ProcessCreateResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -490,17 +488,15 @@ partial void ProcessCreateResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -537,17 +533,15 @@ partial void ProcessCreateResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.EncodersClient.List.g.cs b/src/libs/Vectara/Generated/Vectara.EncodersClient.List.g.cs index 9507e28a..0140dcd0 100644 --- a/src/libs/Vectara/Generated/Vectara.EncodersClient.List.g.cs +++ b/src/libs/Vectara/Generated/Vectara.EncodersClient.List.g.cs @@ -429,18 +429,17 @@ partial void ProcessListResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -474,17 +473,15 @@ partial void ProcessListResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -521,17 +518,15 @@ partial void ProcessListResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.Exceptions.g.cs b/src/libs/Vectara/Generated/Vectara.Exceptions.g.cs index 6427b77c..e339f13e 100644 --- a/src/libs/Vectara/Generated/Vectara.Exceptions.g.cs +++ b/src/libs/Vectara/Generated/Vectara.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::Vectara.ApiException Create( + global::System.Net.HttpStatusCode statusCode, + string message, + global::System.Exception? innerException = null, + global::System.Collections.Generic.IDictionary>? responseHeaders = null) + { + return new global::Vectara.ApiException(message, innerException, statusCode); + } + + /// + /// Convenience overload that constructs an with response body and headers populated. + /// + public static global::Vectara.ApiException Create( + global::System.Net.HttpStatusCode statusCode, + string message, + global::System.Exception? innerException, + string? responseBody, + global::System.Collections.Generic.Dictionary>? responseHeaders) + { + var exception = global::Vectara.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::Vectara.ApiException Create( + global::System.Net.HttpStatusCode statusCode, + string message, + global::System.Exception? innerException = null, + global::System.Collections.Generic.IDictionary>? responseHeaders = null) + { + return new global::Vectara.ApiException(message, innerException, statusCode); + } + + /// + /// Convenience overload that constructs an with response body, object, and headers populated. + /// + public static global::Vectara.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::Vectara.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/Vectara/Generated/Vectara.FactualConsistencyClient.Evaluate.g.cs b/src/libs/Vectara/Generated/Vectara.FactualConsistencyClient.Evaluate.g.cs index 92927930..1f2e9a39 100644 --- a/src/libs/Vectara/Generated/Vectara.FactualConsistencyClient.Evaluate.g.cs +++ b/src/libs/Vectara/Generated/Vectara.FactualConsistencyClient.Evaluate.g.cs @@ -469,18 +469,17 @@ partial void ProcessEvaluateResponseContent( __exception_400 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Permissions do not allow factual consistency evaluation. if ((int)__response.StatusCode == 403) @@ -507,18 +506,17 @@ partial void ProcessEvaluateResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Language not supported by the factual consistency service. if ((int)__response.StatusCode == 422) @@ -545,18 +543,17 @@ partial void ProcessEvaluateResponseContent( __exception_422 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.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) @@ -590,17 +587,15 @@ partial void ProcessEvaluateResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -637,17 +632,15 @@ partial void ProcessEvaluateResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.GenerationPresetsClient.Create.g.cs b/src/libs/Vectara/Generated/Vectara.GenerationPresetsClient.Create.g.cs index 5f7e5f2d..401f11d1 100644 --- a/src/libs/Vectara/Generated/Vectara.GenerationPresetsClient.Create.g.cs +++ b/src/libs/Vectara/Generated/Vectara.GenerationPresetsClient.Create.g.cs @@ -409,18 +409,17 @@ partial void ProcessCreateResponseContent( __exception_400 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Permissions do not allow creating generation presets. if ((int)__response.StatusCode == 403) @@ -447,18 +446,17 @@ partial void ProcessCreateResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -492,17 +490,15 @@ partial void ProcessCreateResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -539,17 +535,15 @@ partial void ProcessCreateResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.GenerationPresetsClient.Delete.g.cs b/src/libs/Vectara/Generated/Vectara.GenerationPresetsClient.Delete.g.cs index 528645db..4cb4e41d 100644 --- a/src/libs/Vectara/Generated/Vectara.GenerationPresetsClient.Delete.g.cs +++ b/src/libs/Vectara/Generated/Vectara.GenerationPresetsClient.Delete.g.cs @@ -393,18 +393,17 @@ await DeleteAsResponseAsync( __exception_400 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Permissions do not allow deleting generation presets. if ((int)__response.StatusCode == 403) @@ -431,18 +430,17 @@ await DeleteAsResponseAsync( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Generation preset not found. if ((int)__response.StatusCode == 404) @@ -469,18 +467,17 @@ await DeleteAsResponseAsync( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -507,17 +504,15 @@ await DeleteAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 +540,15 @@ await DeleteAsResponseAsync( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.GenerationPresetsClient.List.g.cs b/src/libs/Vectara/Generated/Vectara.GenerationPresetsClient.List.g.cs index ea618ebf..33b206f0 100644 --- a/src/libs/Vectara/Generated/Vectara.GenerationPresetsClient.List.g.cs +++ b/src/libs/Vectara/Generated/Vectara.GenerationPresetsClient.List.g.cs @@ -453,18 +453,17 @@ partial void ProcessListResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + 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 ProcessListResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 ProcessListResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.GenerationPresetsClient.Replace.g.cs b/src/libs/Vectara/Generated/Vectara.GenerationPresetsClient.Replace.g.cs index f13f7b7e..9d3683db 100644 --- a/src/libs/Vectara/Generated/Vectara.GenerationPresetsClient.Replace.g.cs +++ b/src/libs/Vectara/Generated/Vectara.GenerationPresetsClient.Replace.g.cs @@ -418,18 +418,17 @@ partial void ProcessReplaceResponseContent( __exception_400 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Permissions do not allow replacing generation presets. if ((int)__response.StatusCode == 403) @@ -456,18 +455,17 @@ partial void ProcessReplaceResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Generation preset not found. if ((int)__response.StatusCode == 404) @@ -494,18 +492,17 @@ partial void ProcessReplaceResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -539,17 +536,15 @@ partial void ProcessReplaceResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 +581,15 @@ partial void ProcessReplaceResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.GlossariesClient.Create.g.cs b/src/libs/Vectara/Generated/Vectara.GlossariesClient.Create.g.cs index 4bec77f4..7e568888 100644 --- a/src/libs/Vectara/Generated/Vectara.GlossariesClient.Create.g.cs +++ b/src/libs/Vectara/Generated/Vectara.GlossariesClient.Create.g.cs @@ -409,18 +409,17 @@ partial void ProcessCreateResponseContent( __exception_400 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Permissions do not allow creating glossaries. if ((int)__response.StatusCode == 403) @@ -447,18 +446,17 @@ partial void ProcessCreateResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -492,17 +490,15 @@ partial void ProcessCreateResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -539,17 +535,15 @@ partial void ProcessCreateResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.GlossariesClient.Delete.g.cs b/src/libs/Vectara/Generated/Vectara.GlossariesClient.Delete.g.cs index 304cbd59..ec5f0e7b 100644 --- a/src/libs/Vectara/Generated/Vectara.GlossariesClient.Delete.g.cs +++ b/src/libs/Vectara/Generated/Vectara.GlossariesClient.Delete.g.cs @@ -397,18 +397,17 @@ await DeleteAsResponseAsync( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Glossary not found. if ((int)__response.StatusCode == 404) @@ -435,18 +434,17 @@ await DeleteAsResponseAsync( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -473,17 +471,15 @@ await DeleteAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 +507,15 @@ await DeleteAsResponseAsync( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.GlossariesClient.DeleteEntries.g.cs b/src/libs/Vectara/Generated/Vectara.GlossariesClient.DeleteEntries.g.cs index febc7796..dc93d932 100644 --- a/src/libs/Vectara/Generated/Vectara.GlossariesClient.DeleteEntries.g.cs +++ b/src/libs/Vectara/Generated/Vectara.GlossariesClient.DeleteEntries.g.cs @@ -417,18 +417,17 @@ await DeleteEntriesAsResponseAsync( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Glossary not found. if ((int)__response.StatusCode == 404) @@ -455,18 +454,17 @@ await DeleteEntriesAsResponseAsync( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -493,17 +491,15 @@ await DeleteEntriesAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -531,17 +527,15 @@ await DeleteEntriesAsResponseAsync( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.GlossariesClient.Get.g.cs b/src/libs/Vectara/Generated/Vectara.GlossariesClient.Get.g.cs index c2115663..a50969b7 100644 --- a/src/libs/Vectara/Generated/Vectara.GlossariesClient.Get.g.cs +++ b/src/libs/Vectara/Generated/Vectara.GlossariesClient.Get.g.cs @@ -404,18 +404,17 @@ partial void ProcessGetResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Glossary not found. if ((int)__response.StatusCode == 404) @@ -442,18 +441,17 @@ partial void ProcessGetResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -487,17 +485,15 @@ partial void ProcessGetResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -534,17 +530,15 @@ partial void ProcessGetResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.GlossariesClient.List.g.cs b/src/libs/Vectara/Generated/Vectara.GlossariesClient.List.g.cs index 3bd9ab9c..9f15d35f 100644 --- a/src/libs/Vectara/Generated/Vectara.GlossariesClient.List.g.cs +++ b/src/libs/Vectara/Generated/Vectara.GlossariesClient.List.g.cs @@ -429,18 +429,17 @@ partial void ProcessListResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -474,17 +473,15 @@ partial void ProcessListResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -521,17 +518,15 @@ partial void ProcessListResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.GlossariesClient.ListEntries.g.cs b/src/libs/Vectara/Generated/Vectara.GlossariesClient.ListEntries.g.cs index 80f286cf..e709c6db 100644 --- a/src/libs/Vectara/Generated/Vectara.GlossariesClient.ListEntries.g.cs +++ b/src/libs/Vectara/Generated/Vectara.GlossariesClient.ListEntries.g.cs @@ -430,18 +430,17 @@ partial void ProcessListEntriesResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Glossary not found. if ((int)__response.StatusCode == 404) @@ -468,18 +467,17 @@ partial void ProcessListEntriesResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -513,17 +511,15 @@ partial void ProcessListEntriesResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -560,17 +556,15 @@ partial void ProcessListEntriesResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.GlossariesClient.Update.g.cs b/src/libs/Vectara/Generated/Vectara.GlossariesClient.Update.g.cs index 63049945..452a8b3c 100644 --- a/src/libs/Vectara/Generated/Vectara.GlossariesClient.Update.g.cs +++ b/src/libs/Vectara/Generated/Vectara.GlossariesClient.Update.g.cs @@ -424,18 +424,17 @@ partial void ProcessUpdateResponseContent( __exception_400 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Permissions do not allow updating this glossary. if ((int)__response.StatusCode == 403) @@ -462,18 +461,17 @@ partial void ProcessUpdateResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Glossary not found. if ((int)__response.StatusCode == 404) @@ -500,18 +498,17 @@ partial void ProcessUpdateResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -545,17 +542,15 @@ partial void ProcessUpdateResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -592,17 +587,15 @@ partial void ProcessUpdateResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.GlossariesClient.UpsertEntries.g.cs b/src/libs/Vectara/Generated/Vectara.GlossariesClient.UpsertEntries.g.cs index 3dc1bd77..60316706 100644 --- a/src/libs/Vectara/Generated/Vectara.GlossariesClient.UpsertEntries.g.cs +++ b/src/libs/Vectara/Generated/Vectara.GlossariesClient.UpsertEntries.g.cs @@ -417,18 +417,17 @@ await UpsertEntriesAsResponseAsync( __exception_400 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Permissions do not allow modifying this glossary. if ((int)__response.StatusCode == 403) @@ -455,18 +454,17 @@ await UpsertEntriesAsResponseAsync( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Glossary not found. if ((int)__response.StatusCode == 404) @@ -493,18 +491,17 @@ await UpsertEntriesAsResponseAsync( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -531,17 +528,15 @@ await UpsertEntriesAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -569,17 +564,15 @@ await UpsertEntriesAsResponseAsync( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.HallucinationCorrectorsClient.HallucinationCorrection.g.cs b/src/libs/Vectara/Generated/Vectara.HallucinationCorrectorsClient.HallucinationCorrection.g.cs index 67573f70..22d173e3 100644 --- a/src/libs/Vectara/Generated/Vectara.HallucinationCorrectorsClient.HallucinationCorrection.g.cs +++ b/src/libs/Vectara/Generated/Vectara.HallucinationCorrectorsClient.HallucinationCorrection.g.cs @@ -419,18 +419,17 @@ partial void ProcessHallucinationCorrectionResponseContent( __exception_400 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Permissions do not allow hallucination correction if ((int)__response.StatusCode == 403) @@ -457,18 +456,17 @@ partial void ProcessHallucinationCorrectionResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -502,17 +500,15 @@ partial void ProcessHallucinationCorrectionResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -549,17 +545,15 @@ partial void ProcessHallucinationCorrectionResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.HallucinationCorrectorsClient.List.g.cs b/src/libs/Vectara/Generated/Vectara.HallucinationCorrectorsClient.List.g.cs index 1b11e7e8..ad6d0130 100644 --- a/src/libs/Vectara/Generated/Vectara.HallucinationCorrectorsClient.List.g.cs +++ b/src/libs/Vectara/Generated/Vectara.HallucinationCorrectorsClient.List.g.cs @@ -427,18 +427,17 @@ partial void ProcessListResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -472,17 +471,15 @@ partial void ProcessListResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -519,17 +516,15 @@ partial void ProcessListResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.IAgentSessionsClient.List.g.cs b/src/libs/Vectara/Generated/Vectara.IAgentSessionsClient.List.g.cs index d9c69baa..326d02c6 100644 --- a/src/libs/Vectara/Generated/Vectara.IAgentSessionsClient.List.g.cs +++ b/src/libs/Vectara/Generated/Vectara.IAgentSessionsClient.List.g.cs @@ -17,6 +17,9 @@ public partial interface IAgentSessionsClient /// /// Example: support.* /// + /// + /// Example: user_role = 'premium' AND tier >= 2 + /// /// /// Default Value: 10 /// @@ -29,6 +32,7 @@ public partial interface IAgentSessionsClient int? requestTimeout = default, int? requestTimeoutMillis = default, string? filter = default, + string? metadataFilter = default, int? limit = default, string? pageKey = default, global::Vectara.AutoSDKRequestOptions? requestOptions = default, @@ -46,6 +50,9 @@ public partial interface IAgentSessionsClient /// /// Example: support.* /// + /// + /// Example: user_role = 'premium' AND tier >= 2 + /// /// /// Default Value: 10 /// @@ -58,6 +65,7 @@ public partial interface IAgentSessionsClient int? requestTimeout = default, int? requestTimeoutMillis = default, string? filter = default, + string? metadataFilter = default, int? limit = default, string? pageKey = default, global::Vectara.AutoSDKRequestOptions? requestOptions = default, diff --git a/src/libs/Vectara/Generated/Vectara.InstructionsClient.Create.g.cs b/src/libs/Vectara/Generated/Vectara.InstructionsClient.Create.g.cs index 3ff1b73c..ecf223d0 100644 --- a/src/libs/Vectara/Generated/Vectara.InstructionsClient.Create.g.cs +++ b/src/libs/Vectara/Generated/Vectara.InstructionsClient.Create.g.cs @@ -477,18 +477,17 @@ partial void ProcessCreateResponseContent( __exception_400 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Permissions do not allow creating instructions. if ((int)__response.StatusCode == 403) @@ -515,18 +514,17 @@ partial void ProcessCreateResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -560,17 +558,15 @@ partial void ProcessCreateResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -607,17 +603,15 @@ partial void ProcessCreateResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.InstructionsClient.Delete.g.cs b/src/libs/Vectara/Generated/Vectara.InstructionsClient.Delete.g.cs index 0ce9f629..00df8a9d 100644 --- a/src/libs/Vectara/Generated/Vectara.InstructionsClient.Delete.g.cs +++ b/src/libs/Vectara/Generated/Vectara.InstructionsClient.Delete.g.cs @@ -403,18 +403,17 @@ await DeleteAsResponseAsync( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Instruction not found. if ((int)__response.StatusCode == 404) @@ -441,18 +440,17 @@ await DeleteAsResponseAsync( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -479,17 +477,15 @@ await DeleteAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 +513,15 @@ await DeleteAsResponseAsync( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.InstructionsClient.DeleteVersion.g.cs b/src/libs/Vectara/Generated/Vectara.InstructionsClient.DeleteVersion.g.cs index 957416ee..698fec27 100644 --- a/src/libs/Vectara/Generated/Vectara.InstructionsClient.DeleteVersion.g.cs +++ b/src/libs/Vectara/Generated/Vectara.InstructionsClient.DeleteVersion.g.cs @@ -410,18 +410,17 @@ await DeleteVersionAsResponseAsync( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Instruction not found. if ((int)__response.StatusCode == 404) @@ -448,18 +447,17 @@ await DeleteVersionAsResponseAsync( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // The specified version cannot be deleted as it's used in an agent. if ((int)__response.StatusCode == 409) @@ -486,18 +484,17 @@ await DeleteVersionAsResponseAsync( __exception_409 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_409 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_409, - statusCode: __response.StatusCode) - { - ResponseBody = __content_409, - ResponseObject = __value_409, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_409, + responseObject: __value_409, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -524,17 +521,15 @@ await DeleteVersionAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -562,17 +557,15 @@ await DeleteVersionAsResponseAsync( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.InstructionsClient.Get.g.cs b/src/libs/Vectara/Generated/Vectara.InstructionsClient.Get.g.cs index b2986598..c307df37 100644 --- a/src/libs/Vectara/Generated/Vectara.InstructionsClient.Get.g.cs +++ b/src/libs/Vectara/Generated/Vectara.InstructionsClient.Get.g.cs @@ -420,18 +420,17 @@ partial void ProcessGetResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Instruction not found. if ((int)__response.StatusCode == 404) @@ -458,18 +457,17 @@ partial void ProcessGetResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -503,17 +501,15 @@ partial void ProcessGetResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -550,17 +546,15 @@ partial void ProcessGetResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.InstructionsClient.List.g.cs b/src/libs/Vectara/Generated/Vectara.InstructionsClient.List.g.cs index 941ac257..9fa77b48 100644 --- a/src/libs/Vectara/Generated/Vectara.InstructionsClient.List.g.cs +++ b/src/libs/Vectara/Generated/Vectara.InstructionsClient.List.g.cs @@ -457,18 +457,17 @@ partial void ProcessListResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -502,17 +501,15 @@ partial void ProcessListResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -549,17 +546,15 @@ partial void ProcessListResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.InstructionsClient.Test.g.cs b/src/libs/Vectara/Generated/Vectara.InstructionsClient.Test.g.cs index 18768d35..23b85434 100644 --- a/src/libs/Vectara/Generated/Vectara.InstructionsClient.Test.g.cs +++ b/src/libs/Vectara/Generated/Vectara.InstructionsClient.Test.g.cs @@ -440,18 +440,17 @@ partial void ProcessTestResponseContent( __exception_400 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Permissions do not allow testing this instruction. if ((int)__response.StatusCode == 403) @@ -478,18 +477,17 @@ partial void ProcessTestResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Instruction not found. if ((int)__response.StatusCode == 404) @@ -516,18 +514,17 @@ partial void ProcessTestResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Template compilation failed due to invalid instruction template. if ((int)__response.StatusCode == 422) @@ -554,18 +551,17 @@ partial void ProcessTestResponseContent( __exception_422 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.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) @@ -599,17 +595,15 @@ partial void ProcessTestResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -646,17 +640,15 @@ partial void ProcessTestResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.InstructionsClient.Update.g.cs b/src/libs/Vectara/Generated/Vectara.InstructionsClient.Update.g.cs index 4f23b4df..a21c67ce 100644 --- a/src/libs/Vectara/Generated/Vectara.InstructionsClient.Update.g.cs +++ b/src/libs/Vectara/Generated/Vectara.InstructionsClient.Update.g.cs @@ -438,18 +438,17 @@ partial void ProcessUpdateResponseContent( __exception_400 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Permissions do not allow updating this instruction. if ((int)__response.StatusCode == 403) @@ -476,18 +475,17 @@ partial void ProcessUpdateResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Instruction not found. if ((int)__response.StatusCode == 404) @@ -514,18 +512,17 @@ partial void ProcessUpdateResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -559,17 +556,15 @@ partial void ProcessUpdateResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -606,17 +601,15 @@ partial void ProcessUpdateResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.JobsClient.Get.g.cs b/src/libs/Vectara/Generated/Vectara.JobsClient.Get.g.cs index eac8a56d..ee530bd4 100644 --- a/src/libs/Vectara/Generated/Vectara.JobsClient.Get.g.cs +++ b/src/libs/Vectara/Generated/Vectara.JobsClient.Get.g.cs @@ -398,18 +398,17 @@ partial void ProcessGetResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Job not found. if ((int)__response.StatusCode == 404) @@ -436,18 +435,17 @@ partial void ProcessGetResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -481,17 +479,15 @@ partial void ProcessGetResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -528,17 +524,15 @@ partial void ProcessGetResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.JobsClient.List.g.cs b/src/libs/Vectara/Generated/Vectara.JobsClient.List.g.cs index 2e4ce3b7..4a8ece49 100644 --- a/src/libs/Vectara/Generated/Vectara.JobsClient.List.g.cs +++ b/src/libs/Vectara/Generated/Vectara.JobsClient.List.g.cs @@ -445,18 +445,17 @@ partial void ProcessListResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -490,17 +489,15 @@ partial void ProcessListResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -537,17 +534,15 @@ partial void ProcessListResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.JsonConverters.AgentStreamedResponse.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.AgentStreamedResponse.g.cs index 495d4488..e44256ee 100644 --- a/src/libs/Vectara/Generated/Vectara.JsonConverters.AgentStreamedResponse.g.cs +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.AgentStreamedResponse.g.cs @@ -91,6 +91,13 @@ public class AgentStreamedResponseJsonConverter : global::System.Text.Json.Seria throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Vectara.ToolOutputEvent)}"); toolOutput = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } + global::Vectara.ToolActivityEvent? toolActivity = default; + if (discriminator?.Type == global::Vectara.AgentStreamedResponseDiscriminatorType.ToolActivity) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.ToolActivityEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Vectara.ToolActivityEvent)}"); + toolActivity = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } global::Vectara.StructuredOutputEvent? structuredOutput = default; if (discriminator?.Type == global::Vectara.AgentStreamedResponseDiscriminatorType.StructuredOutput) { @@ -191,6 +198,8 @@ public class AgentStreamedResponseJsonConverter : global::System.Text.Json.Seria toolOutput, + toolActivity, + structuredOutput, contextLimitExceeded, @@ -286,6 +295,12 @@ public override void Write( throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.ToolOutputEvent).Name}"); global::System.Text.Json.JsonSerializer.Serialize(writer, value.ToolOutput!.Value, typeInfo); } + else if (value.IsToolActivity) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.ToolActivityEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.ToolActivityEvent).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ToolActivity!.Value, typeInfo); + } else if (value.IsStructuredOutput) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.StructuredOutputEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.GenericToolActivityEvent.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.GenericToolActivityEvent.g.cs new file mode 100644 index 00000000..1010e7b3 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.GenericToolActivityEvent.g.cs @@ -0,0 +1,146 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace Vectara.JsonConverters +{ + /// + public class GenericToolActivityEventJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Vectara.GenericToolActivityEvent Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader); + var __rawJson = __jsonDocument.RootElement.GetRawText(); + var __jsonProps = new global::System.Collections.Generic.HashSet(); + if (__jsonDocument.RootElement.ValueKind == global::System.Text.Json.JsonValueKind.Object) + { + foreach (var __jsonProp in __jsonDocument.RootElement.EnumerateObject()) + { + __jsonProps.Add(__jsonProp.Name); + + } + } + + var __score0 = 0; + if (__jsonProps.Contains("created_at")) __score0++; + if (__jsonProps.Contains("tool_call_id")) __score0++; + if (__jsonProps.Contains("tool_configuration_name")) __score0++; + if (__jsonProps.Contains("tool_name")) __score0++; + if (__jsonProps.Contains("type")) __score0++; + var __score1 = 0; + if (__jsonProps.Contains("activity_type")) __score1++; + if (__jsonProps.Contains("message")) __score1++; + var __bestScore = 0; + var __bestIndex = -1; + if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; } + if (__score1 > __bestScore) { __bestScore = __score1; __bestIndex = 1; } + + global::Vectara.ToolActivityEventBase? @base = default; + global::Vectara.GenericToolActivityEventVariant2? genericToolActivityEventVariant2 = default; + if (__bestIndex >= 0) + { + if (__bestIndex == 0) + { + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.ToolActivityEventBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.ToolActivityEventBase).Name}"); + @base = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + else if (__bestIndex == 1) + { + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.GenericToolActivityEventVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.GenericToolActivityEventVariant2).Name}"); + genericToolActivityEventVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + } + + if (@base == null && genericToolActivityEventVariant2 == null) + { + try + { + + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.ToolActivityEventBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.ToolActivityEventBase).Name}"); + @base = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + + if (@base == null && genericToolActivityEventVariant2 == null) + { + try + { + + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.GenericToolActivityEventVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.GenericToolActivityEventVariant2).Name}"); + genericToolActivityEventVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + + var __value = new global::Vectara.GenericToolActivityEvent( + @base, + + genericToolActivityEventVariant2 + ); + + return __value; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Vectara.GenericToolActivityEvent value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + if (value.IsBase) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.ToolActivityEventBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.ToolActivityEventBase).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Base!, typeInfo); + } + else if (value.IsGenericToolActivityEventVariant2) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.GenericToolActivityEventVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.GenericToolActivityEventVariant2).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.GenericToolActivityEventVariant2!, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.SubAgentToolActivityEvent.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.SubAgentToolActivityEvent.g.cs new file mode 100644 index 00000000..b6710919 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.SubAgentToolActivityEvent.g.cs @@ -0,0 +1,146 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace Vectara.JsonConverters +{ + /// + public class SubAgentToolActivityEventJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Vectara.SubAgentToolActivityEvent Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader); + var __rawJson = __jsonDocument.RootElement.GetRawText(); + var __jsonProps = new global::System.Collections.Generic.HashSet(); + if (__jsonDocument.RootElement.ValueKind == global::System.Text.Json.JsonValueKind.Object) + { + foreach (var __jsonProp in __jsonDocument.RootElement.EnumerateObject()) + { + __jsonProps.Add(__jsonProp.Name); + + } + } + + var __score0 = 0; + if (__jsonProps.Contains("created_at")) __score0++; + if (__jsonProps.Contains("tool_call_id")) __score0++; + if (__jsonProps.Contains("tool_configuration_name")) __score0++; + if (__jsonProps.Contains("tool_name")) __score0++; + if (__jsonProps.Contains("type")) __score0++; + var __score1 = 0; + if (__jsonProps.Contains("activity_type")) __score1++; + if (__jsonProps.Contains("agent_event")) __score1++; + var __bestScore = 0; + var __bestIndex = -1; + if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; } + if (__score1 > __bestScore) { __bestScore = __score1; __bestIndex = 1; } + + global::Vectara.ToolActivityEventBase? @base = default; + global::Vectara.SubAgentToolActivityEventVariant2? subAgentToolActivityEventVariant2 = default; + if (__bestIndex >= 0) + { + if (__bestIndex == 0) + { + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.ToolActivityEventBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.ToolActivityEventBase).Name}"); + @base = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + else if (__bestIndex == 1) + { + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.SubAgentToolActivityEventVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.SubAgentToolActivityEventVariant2).Name}"); + subAgentToolActivityEventVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + } + + if (@base == null && subAgentToolActivityEventVariant2 == null) + { + try + { + + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.ToolActivityEventBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.ToolActivityEventBase).Name}"); + @base = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + + if (@base == null && subAgentToolActivityEventVariant2 == null) + { + try + { + + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.SubAgentToolActivityEventVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.SubAgentToolActivityEventVariant2).Name}"); + subAgentToolActivityEventVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + + var __value = new global::Vectara.SubAgentToolActivityEvent( + @base, + + subAgentToolActivityEventVariant2 + ); + + return __value; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Vectara.SubAgentToolActivityEvent value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + if (value.IsBase) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.ToolActivityEventBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.ToolActivityEventBase).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Base!, typeInfo); + } + else if (value.IsSubAgentToolActivityEventVariant2) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.SubAgentToolActivityEventVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.SubAgentToolActivityEventVariant2).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.SubAgentToolActivityEventVariant2!, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.ToolActivityEvent.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.ToolActivityEvent.g.cs new file mode 100644 index 00000000..1387ab86 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.ToolActivityEvent.g.cs @@ -0,0 +1,72 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace Vectara.JsonConverters +{ + /// + public class ToolActivityEventJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Vectara.ToolActivityEvent Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + + var readerCopy = reader; + var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.ToolActivityEventDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Vectara.ToolActivityEventDiscriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); + + global::Vectara.GenericToolActivityEvent? generic = default; + if (discriminator?.ActivityType == global::Vectara.ToolActivityEventDiscriminatorActivityType.Generic) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.GenericToolActivityEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Vectara.GenericToolActivityEvent)}"); + generic = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::Vectara.SubAgentToolActivityEvent? subAgent = default; + if (discriminator?.ActivityType == global::Vectara.ToolActivityEventDiscriminatorActivityType.SubAgent) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.SubAgentToolActivityEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Vectara.SubAgentToolActivityEvent)}"); + subAgent = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + var __value = new global::Vectara.ToolActivityEvent( + discriminator?.ActivityType, + generic, + + subAgent + ); + + return __value; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Vectara.ToolActivityEvent value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + if (value.IsGeneric) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.GenericToolActivityEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.GenericToolActivityEvent).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Generic!.Value, typeInfo); + } + else if (value.IsSubAgent) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.SubAgentToolActivityEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.SubAgentToolActivityEvent).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.SubAgent!.Value, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.ToolActivityEventDiscriminatorActivityType.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.ToolActivityEventDiscriminatorActivityType.g.cs new file mode 100644 index 00000000..b0726720 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.ToolActivityEventDiscriminatorActivityType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Vectara.JsonConverters +{ + /// + public sealed class ToolActivityEventDiscriminatorActivityTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Vectara.ToolActivityEventDiscriminatorActivityType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::Vectara.ToolActivityEventDiscriminatorActivityTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Vectara.ToolActivityEventDiscriminatorActivityType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Vectara.ToolActivityEventDiscriminatorActivityType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Vectara.ToolActivityEventDiscriminatorActivityType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Vectara.ToolActivityEventDiscriminatorActivityTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.ToolActivityEventDiscriminatorActivityTypeNullable.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.ToolActivityEventDiscriminatorActivityTypeNullable.g.cs new file mode 100644 index 00000000..f8f0ac54 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.ToolActivityEventDiscriminatorActivityTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Vectara.JsonConverters +{ + /// + public sealed class ToolActivityEventDiscriminatorActivityTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Vectara.ToolActivityEventDiscriminatorActivityType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::Vectara.ToolActivityEventDiscriminatorActivityTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Vectara.ToolActivityEventDiscriminatorActivityType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Vectara.ToolActivityEventDiscriminatorActivityType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Vectara.ToolActivityEventDiscriminatorActivityType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::Vectara.ToolActivityEventDiscriminatorActivityTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.JsonSerializerContext.g.cs b/src/libs/Vectara/Generated/Vectara.JsonSerializerContext.g.cs index b7c40003..3ed6b18d 100644 --- a/src/libs/Vectara/Generated/Vectara.JsonSerializerContext.g.cs +++ b/src/libs/Vectara/Generated/Vectara.JsonSerializerContext.g.cs @@ -297,6 +297,10 @@ namespace Vectara typeof(global::Vectara.JsonConverters.CreateInputRequestDiscriminatorTypeNullableJsonConverter), + typeof(global::Vectara.JsonConverters.ToolActivityEventDiscriminatorActivityTypeJsonConverter), + + typeof(global::Vectara.JsonConverters.ToolActivityEventDiscriminatorActivityTypeNullableJsonConverter), + typeof(global::Vectara.JsonConverters.AgentStreamedResponseDiscriminatorTypeJsonConverter), typeof(global::Vectara.JsonConverters.AgentStreamedResponseDiscriminatorTypeNullableJsonConverter), @@ -647,6 +651,12 @@ namespace Vectara typeof(global::Vectara.JsonConverters.CompactionStartedEventJsonConverter), + typeof(global::Vectara.JsonConverters.GenericToolActivityEventJsonConverter), + + typeof(global::Vectara.JsonConverters.SubAgentToolActivityEventJsonConverter), + + typeof(global::Vectara.JsonConverters.ToolActivityEventJsonConverter), + typeof(global::Vectara.JsonConverters.AgentStreamedResponseJsonConverter), typeof(global::Vectara.JsonConverters.ScheduleConfigurationJsonConverter), @@ -1552,6 +1562,10 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex typeof(global::Vectara.JsonConverters.CreateInputRequestDiscriminatorTypeNullableJsonConverter), + typeof(global::Vectara.JsonConverters.ToolActivityEventDiscriminatorActivityTypeJsonConverter), + + typeof(global::Vectara.JsonConverters.ToolActivityEventDiscriminatorActivityTypeNullableJsonConverter), + typeof(global::Vectara.JsonConverters.AgentStreamedResponseDiscriminatorTypeJsonConverter), typeof(global::Vectara.JsonConverters.AgentStreamedResponseDiscriminatorTypeNullableJsonConverter), @@ -1902,6 +1916,12 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex typeof(global::Vectara.JsonConverters.CompactionStartedEventJsonConverter), + typeof(global::Vectara.JsonConverters.GenericToolActivityEventJsonConverter), + + typeof(global::Vectara.JsonConverters.SubAgentToolActivityEventJsonConverter), + + typeof(global::Vectara.JsonConverters.ToolActivityEventJsonConverter), + typeof(global::Vectara.JsonConverters.AgentStreamedResponseJsonConverter), typeof(global::Vectara.JsonConverters.ScheduleConfigurationJsonConverter), @@ -2086,6 +2106,14 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.ContextConsumedEvent))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.CompactionStartedEvent), TypeInfoPropertyName = "CompactionStartedEvent2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.CompactionStartedEventVariant2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.ToolActivityEventBase))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.GenericToolActivityEvent), TypeInfoPropertyName = "GenericToolActivityEvent2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.GenericToolActivityEventVariant2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.SubAgentToolActivityEvent), TypeInfoPropertyName = "SubAgentToolActivityEvent2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.SubAgentToolActivityEventVariant2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.ToolActivityEvent), TypeInfoPropertyName = "ToolActivityEvent2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.ToolActivityEventDiscriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.ToolActivityEventDiscriminatorActivityType), TypeInfoPropertyName = "ToolActivityEventDiscriminatorActivityType2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.AgentStreamedResponse), TypeInfoPropertyName = "AgentStreamedResponse2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.AgentStreamedResponseDiscriminator))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.AgentStreamedResponseDiscriminatorType), TypeInfoPropertyName = "AgentStreamedResponseDiscriminatorType2")] @@ -2564,6 +2592,8 @@ private SourceGenerationContext(global::System.Text.Json.JsonSerializerOptions o options.Converters.Add(new global::Vectara.JsonConverters.InputBehaviorNullableJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.CreateInputRequestDiscriminatorTypeJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.CreateInputRequestDiscriminatorTypeNullableJsonConverter()); + options.Converters.Add(new global::Vectara.JsonConverters.ToolActivityEventDiscriminatorActivityTypeJsonConverter()); + options.Converters.Add(new global::Vectara.JsonConverters.ToolActivityEventDiscriminatorActivityTypeNullableJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.AgentStreamedResponseDiscriminatorTypeJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.AgentStreamedResponseDiscriminatorTypeNullableJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.IntervalScheduleConfigurationTypeJsonConverter()); @@ -2739,6 +2769,9 @@ private SourceGenerationContext(global::System.Text.Json.JsonSerializerOptions o options.Converters.Add(new global::Vectara.JsonConverters.CreateCompactRequestJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.CreateInputRequestJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.CompactionStartedEventJsonConverter()); + options.Converters.Add(new global::Vectara.JsonConverters.GenericToolActivityEventJsonConverter()); + options.Converters.Add(new global::Vectara.JsonConverters.SubAgentToolActivityEventJsonConverter()); + options.Converters.Add(new global::Vectara.JsonConverters.ToolActivityEventJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.AgentStreamedResponseJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.ScheduleConfigurationJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.ConnectorConfigurationJsonConverter()); diff --git a/src/libs/Vectara/Generated/Vectara.JsonSerializerContextTypes.g.cs b/src/libs/Vectara/Generated/Vectara.JsonSerializerContextTypes.g.cs index e14a6481..20d27d28 100644 --- a/src/libs/Vectara/Generated/Vectara.JsonSerializerContextTypes.g.cs +++ b/src/libs/Vectara/Generated/Vectara.JsonSerializerContextTypes.g.cs @@ -2316,851 +2316,883 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::Vectara.AgentStreamedResponse? Type572 { get; set; } + public global::Vectara.ToolActivityEventBase? Type572 { get; set; } /// /// /// - public global::Vectara.AgentStreamedResponseDiscriminator? Type573 { get; set; } + public global::Vectara.GenericToolActivityEvent? Type573 { get; set; } /// /// /// - public global::Vectara.AgentStreamedResponseDiscriminatorType? Type574 { get; set; } + public global::Vectara.GenericToolActivityEventVariant2? Type574 { get; set; } /// /// /// - public global::Vectara.SessionArtifact? Type575 { get; set; } + public global::Vectara.SubAgentToolActivityEvent? Type575 { get; set; } /// /// /// - public global::Vectara.ListSessionArtifactsResponse? Type576 { get; set; } + public global::Vectara.SubAgentToolActivityEventVariant2? Type576 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type577 { get; set; } + public global::Vectara.ToolActivityEvent? Type577 { get; set; } /// /// /// - public global::Vectara.IntervalScheduleConfiguration? Type578 { get; set; } + public global::Vectara.ToolActivityEventDiscriminator? Type578 { get; set; } /// /// /// - public global::Vectara.IntervalScheduleConfigurationType? Type579 { get; set; } + public global::Vectara.ToolActivityEventDiscriminatorActivityType? Type579 { get; set; } /// /// /// - public global::Vectara.CronScheduleConfiguration? Type580 { get; set; } + public global::Vectara.AgentStreamedResponse? Type580 { get; set; } /// /// /// - public global::Vectara.CronScheduleConfigurationType? Type581 { get; set; } + public global::Vectara.AgentStreamedResponseDiscriminator? Type581 { get; set; } /// /// /// - public global::Vectara.ScheduleConfiguration? Type582 { get; set; } + public global::Vectara.AgentStreamedResponseDiscriminatorType? Type582 { get; set; } /// /// /// - public global::Vectara.AgentSchedule? Type583 { get; set; } + public global::Vectara.SessionArtifact? Type583 { get; set; } /// /// /// - public global::Vectara.ListAgentSchedulesResponse? Type584 { get; set; } + public global::Vectara.ListSessionArtifactsResponse? Type584 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type585 { get; set; } + public global::System.Collections.Generic.IList? Type585 { get; set; } /// /// /// - public global::Vectara.CreateAgentScheduleRequest? Type586 { get; set; } + public global::Vectara.IntervalScheduleConfiguration? Type586 { get; set; } /// /// /// - public global::Vectara.UpdateAgentScheduleRequest? Type587 { get; set; } + public global::Vectara.IntervalScheduleConfigurationType? Type587 { get; set; } /// /// /// - public global::Vectara.AgentScheduleExecution? Type588 { get; set; } + public global::Vectara.CronScheduleConfiguration? Type588 { get; set; } /// /// /// - public global::Vectara.AgentScheduleExecutionStatus? Type589 { get; set; } + public global::Vectara.CronScheduleConfigurationType? Type589 { get; set; } /// /// /// - public global::Vectara.ListAgentScheduleExecutionsResponse? Type590 { get; set; } + public global::Vectara.ScheduleConfiguration? Type590 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type591 { get; set; } + public global::Vectara.AgentSchedule? Type591 { get; set; } /// /// /// - public global::Vectara.AgentIdentityMode? Type592 { get; set; } + public global::Vectara.ListAgentSchedulesResponse? Type592 { get; set; } /// /// /// - public global::Vectara.AgentIdentity? Type593 { get; set; } + public global::System.Collections.Generic.IList? Type593 { get; set; } /// /// /// - public global::Vectara.UpdateAgentIdentityRequest? Type594 { get; set; } + public global::Vectara.CreateAgentScheduleRequest? Type594 { get; set; } /// /// /// - public global::Vectara.AgentSecrets? Type595 { get; set; } + public global::Vectara.UpdateAgentScheduleRequest? Type595 { get; set; } /// /// /// - public global::Vectara.ReplaceAgentSecretsRequest? Type596 { get; set; } + public global::Vectara.AgentScheduleExecution? Type596 { get; set; } /// /// /// - public global::Vectara.UpdateAgentSecretsRequest? Type597 { get; set; } + public global::Vectara.AgentScheduleExecutionStatus? Type597 { get; set; } /// /// /// - public global::Vectara.SlackConnectorConfiguration? Type598 { get; set; } + public global::Vectara.ListAgentScheduleExecutionsResponse? Type598 { get; set; } /// /// /// - public global::Vectara.ConnectorConfiguration? Type599 { get; set; } + public global::System.Collections.Generic.IList? Type599 { get; set; } /// /// /// - public global::Vectara.ConnectorConfigurationDiscriminator? Type600 { get; set; } + public global::Vectara.AgentIdentityMode? Type600 { get; set; } /// /// /// - public global::Vectara.ConnectorConfigurationDiscriminatorType? Type601 { get; set; } + public global::Vectara.AgentIdentity? Type601 { get; set; } /// /// /// - public global::Vectara.AgentConnector? Type602 { get; set; } + public global::Vectara.UpdateAgentIdentityRequest? Type602 { get; set; } /// /// /// - public global::Vectara.AgentConnectorType? Type603 { get; set; } + public global::Vectara.AgentSecrets? Type603 { get; set; } /// /// /// - public global::Vectara.AgentConnectorStatus? Type604 { get; set; } + public global::Vectara.ReplaceAgentSecretsRequest? Type604 { get; set; } /// /// /// - public global::Vectara.ListAgentConnectorsResponse? Type605 { get; set; } + public global::Vectara.UpdateAgentSecretsRequest? Type605 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type606 { get; set; } + public global::Vectara.SlackConnectorConfiguration? Type606 { get; set; } /// /// /// - public global::Vectara.CreateAgentConnectorRequest? Type607 { get; set; } + public global::Vectara.ConnectorConfiguration? Type607 { get; set; } /// /// /// - public global::Vectara.CreateAgentConnectorRequestType? Type608 { get; set; } + public global::Vectara.ConnectorConfigurationDiscriminator? Type608 { get; set; } /// /// /// - public global::Vectara.UpdateAgentConnectorRequest? Type609 { get; set; } + public global::Vectara.ConnectorConfigurationDiscriminatorType? Type609 { get; set; } /// /// /// - public global::Vectara.PipelineStatus? Type610 { get; set; } + public global::Vectara.AgentConnector? Type610 { get; set; } /// /// /// - public global::Vectara.BaseS3SourceConfiguration? Type611 { get; set; } + public global::Vectara.AgentConnectorType? Type611 { get; set; } /// /// /// - public global::Vectara.S3SourceConfiguration? Type612 { get; set; } + public global::Vectara.AgentConnectorStatus? Type612 { get; set; } /// /// /// - public global::Vectara.BaseWebSource? Type613 { get; set; } + public global::Vectara.ListAgentConnectorsResponse? Type613 { get; set; } /// /// /// - public global::Vectara.SitemapPagesSource? Type614 { get; set; } + public global::System.Collections.Generic.IList? Type614 { get; set; } /// /// /// - public global::Vectara.BaseCrawlPagesSource? Type615 { get; set; } + public global::Vectara.CreateAgentConnectorRequest? Type615 { get; set; } /// /// /// - public global::Vectara.CrawlPagesSource? Type616 { get; set; } + public global::Vectara.CreateAgentConnectorRequestType? Type616 { get; set; } /// /// /// - public global::Vectara.CrawlPagesSourceVariant2? Type617 { get; set; } + public global::Vectara.UpdateAgentConnectorRequest? Type617 { get; set; } /// /// /// - public global::Vectara.SitemapCrawlPagesSource? Type618 { get; set; } + public global::Vectara.PipelineStatus? Type618 { get; set; } /// /// /// - public global::Vectara.SitemapCrawlPagesSourceVariant2? Type619 { get; set; } + public global::Vectara.BaseS3SourceConfiguration? Type619 { get; set; } /// /// /// - public global::Vectara.WebPagesSource? Type620 { get; set; } + public global::Vectara.S3SourceConfiguration? Type620 { get; set; } /// /// /// - public global::Vectara.WebPagesSourceDiscriminator? Type621 { get; set; } + public global::Vectara.BaseWebSource? Type621 { get; set; } /// /// /// - public global::Vectara.WebPagesSourceDiscriminatorType? Type622 { get; set; } + public global::Vectara.SitemapPagesSource? Type622 { get; set; } /// /// /// - public global::Vectara.WebSourceConfiguration? Type623 { get; set; } + public global::Vectara.BaseCrawlPagesSource? Type623 { get; set; } /// /// /// - public global::Vectara.WebSourceConfigurationVariant2? Type624 { get; set; } + public global::Vectara.CrawlPagesSource? Type624 { get; set; } /// /// /// - public global::Vectara.PipelineSource? Type625 { get; set; } + public global::Vectara.CrawlPagesSourceVariant2? Type625 { get; set; } /// /// /// - public global::Vectara.PipelineSourceDiscriminator? Type626 { get; set; } + public global::Vectara.SitemapCrawlPagesSource? Type626 { get; set; } /// /// /// - public global::Vectara.PipelineSourceDiscriminatorType? Type627 { get; set; } + public global::Vectara.SitemapCrawlPagesSourceVariant2? Type627 { get; set; } /// /// /// - public global::Vectara.CronTriggerConfiguration? Type628 { get; set; } + public global::Vectara.WebPagesSource? Type628 { get; set; } /// /// /// - public global::Vectara.IntervalTriggerConfiguration? Type629 { get; set; } + public global::Vectara.WebPagesSourceDiscriminator? Type629 { get; set; } /// /// /// - public global::Vectara.ManualTriggerConfiguration? Type630 { get; set; } + public global::Vectara.WebPagesSourceDiscriminatorType? Type630 { get; set; } /// /// /// - public global::Vectara.PipelineTrigger? Type631 { get; set; } + public global::Vectara.WebSourceConfiguration? Type631 { get; set; } /// /// /// - public global::Vectara.PipelineTriggerDiscriminator? Type632 { get; set; } + public global::Vectara.WebSourceConfigurationVariant2? Type632 { get; set; } /// /// /// - public global::Vectara.PipelineTriggerDiscriminatorType? Type633 { get; set; } + public global::Vectara.PipelineSource? Type633 { get; set; } /// /// /// - public global::Vectara.ConditionVerification? Type634 { get; set; } + public global::Vectara.PipelineSourceDiscriminator? Type634 { get; set; } /// /// /// - public global::Vectara.AgentVerification? Type635 { get; set; } + public global::Vectara.PipelineSourceDiscriminatorType? Type635 { get; set; } /// /// /// - public global::Vectara.PipelineVerification? Type636 { get; set; } + public global::Vectara.CronTriggerConfiguration? Type636 { get; set; } /// /// /// - public global::Vectara.PipelineVerificationDiscriminator? Type637 { get; set; } + public global::Vectara.IntervalTriggerConfiguration? Type637 { get; set; } /// /// /// - public global::Vectara.PipelineVerificationDiscriminatorType? Type638 { get; set; } + public global::Vectara.ManualTriggerConfiguration? Type638 { get; set; } /// /// /// - public global::Vectara.AgentTransformConfiguration? Type639 { get; set; } + public global::Vectara.PipelineTrigger? Type639 { get; set; } /// /// /// - public global::Vectara.PipelineTransform? Type640 { get; set; } + public global::Vectara.PipelineTriggerDiscriminator? Type640 { get; set; } /// /// /// - public global::Vectara.PipelineTransformDiscriminator? Type641 { get; set; } + public global::Vectara.PipelineTriggerDiscriminatorType? Type641 { get; set; } /// /// /// - public global::Vectara.PipelineTransformDiscriminatorType? Type642 { get; set; } + public global::Vectara.ConditionVerification? Type642 { get; set; } /// /// /// - public global::Vectara.PipelineSyncMode? Type643 { get; set; } + public global::Vectara.AgentVerification? Type643 { get; set; } /// /// /// - public global::Vectara.PipelineWatermark? Type644 { get; set; } + public global::Vectara.PipelineVerification? Type644 { get; set; } /// /// /// - public global::Vectara.Pipeline? Type645 { get; set; } + public global::Vectara.PipelineVerificationDiscriminator? Type645 { get; set; } /// /// /// - public global::Vectara.ListPipelinesResponse? Type646 { get; set; } + public global::Vectara.PipelineVerificationDiscriminatorType? Type646 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type647 { get; set; } + public global::Vectara.AgentTransformConfiguration? Type647 { get; set; } /// /// /// - public global::Vectara.CreatePipelineRequest? Type648 { get; set; } + public global::Vectara.PipelineTransform? Type648 { get; set; } /// /// /// - public global::Vectara.UpdateS3SourceConfiguration? Type649 { get; set; } + public global::Vectara.PipelineTransformDiscriminator? Type649 { get; set; } /// /// /// - public global::Vectara.UpdateWebSourceConfiguration? Type650 { get; set; } + public global::Vectara.PipelineTransformDiscriminatorType? Type650 { get; set; } /// /// /// - public global::Vectara.UpdateWebSourceConfigurationVariant2? Type651 { get; set; } + public global::Vectara.PipelineSyncMode? Type651 { get; set; } /// /// /// - public global::Vectara.UpdatePipelineSource? Type652 { get; set; } + public global::Vectara.PipelineWatermark? Type652 { get; set; } /// /// /// - public global::Vectara.UpdatePipelineSourceDiscriminator? Type653 { get; set; } + public global::Vectara.Pipeline? Type653 { get; set; } /// /// /// - public global::Vectara.UpdatePipelineSourceDiscriminatorType? Type654 { get; set; } + public global::Vectara.ListPipelinesResponse? Type654 { get; set; } /// /// /// - public global::Vectara.UpdatePipelineRequest? Type655 { get; set; } + public global::System.Collections.Generic.IList? Type655 { get; set; } /// /// /// - public global::Vectara.PipelineRunStatus? Type656 { get; set; } + public global::Vectara.CreatePipelineRequest? Type656 { get; set; } /// /// /// - public global::Vectara.PipelineRunTriggerType? Type657 { get; set; } + public global::Vectara.UpdateS3SourceConfiguration? Type657 { get; set; } /// /// /// - public global::Vectara.PipelineRun? Type658 { get; set; } + public global::Vectara.UpdateWebSourceConfiguration? Type658 { get; set; } /// /// /// - public global::Vectara.DeadLetterStatus? Type659 { get; set; } + public global::Vectara.UpdateWebSourceConfigurationVariant2? Type659 { get; set; } /// /// /// - public global::Vectara.DeadLetterOrigin? Type660 { get; set; } + public global::Vectara.UpdatePipelineSource? Type660 { get; set; } /// /// /// - public global::Vectara.PipelineDeadLetterEntry? Type661 { get; set; } + public global::Vectara.UpdatePipelineSourceDiscriminator? Type661 { get; set; } /// /// /// - public global::Vectara.ListPipelineDeadLetterEntriesResponse? Type662 { get; set; } + public global::Vectara.UpdatePipelineSourceDiscriminatorType? Type662 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type663 { get; set; } + public global::Vectara.UpdatePipelineRequest? Type663 { get; set; } /// /// /// - public global::Vectara.CreatePipelineDeadLetterEntryRequest? Type664 { get; set; } + public global::Vectara.PipelineRunStatus? Type664 { get; set; } /// /// /// - public global::Vectara.ProcessPipelineDeadLetterEntriesRequest? Type665 { get; set; } + public global::Vectara.PipelineRunTriggerType? Type665 { get; set; } /// /// /// - public global::Vectara.ListPipelineRunsResponse? Type666 { get; set; } + public global::Vectara.PipelineRun? Type666 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type667 { get; set; } + public global::Vectara.DeadLetterStatus? Type667 { get; set; } /// /// /// - public global::Vectara.PipelineRunEventType? Type668 { get; set; } + public global::Vectara.DeadLetterOrigin? Type668 { get; set; } /// /// /// - public global::Vectara.SortOrder? Type669 { get; set; } + public global::Vectara.PipelineDeadLetterEntry? Type669 { get; set; } /// /// /// - public global::Vectara.PipelineRunEventBase? Type670 { get; set; } + public global::Vectara.ListPipelineDeadLetterEntriesResponse? Type670 { get; set; } /// /// /// - public global::Vectara.RunStartedEvent? Type671 { get; set; } + public global::System.Collections.Generic.IList? Type671 { get; set; } /// /// /// - public global::Vectara.RunStartedEventVariant2? Type672 { get; set; } + public global::Vectara.CreatePipelineDeadLetterEntryRequest? Type672 { get; set; } /// /// /// - public global::Vectara.RunCompletedEventStatus? Type673 { get; set; } + public global::Vectara.ProcessPipelineDeadLetterEntriesRequest? Type673 { get; set; } /// /// /// - public global::Vectara.RunCompletedEvent? Type674 { get; set; } + public global::Vectara.ListPipelineRunsResponse? Type674 { get; set; } /// /// /// - public global::Vectara.RunCompletedEventVariant2? Type675 { get; set; } + public global::System.Collections.Generic.IList? Type675 { get; set; } /// /// /// - public global::Vectara.RecordProcessingEventStatus? Type676 { get; set; } + public global::Vectara.PipelineRunEventType? Type676 { get; set; } /// /// /// - public global::Vectara.RecordProcessingEvent? Type677 { get; set; } + public global::Vectara.SortOrder? Type677 { get; set; } /// /// /// - public global::Vectara.RecordProcessingEventVariant2? Type678 { get; set; } + public global::Vectara.PipelineRunEventBase? Type678 { get; set; } /// /// /// - public global::Vectara.WatermarkAdvancedEvent? Type679 { get; set; } + public global::Vectara.RunStartedEvent? Type679 { get; set; } /// /// /// - public global::Vectara.WatermarkAdvancedEventVariant2? Type680 { get; set; } + public global::Vectara.RunStartedEventVariant2? Type680 { get; set; } /// /// /// - public global::Vectara.PipelineRunEvent? Type681 { get; set; } + public global::Vectara.RunCompletedEventStatus? Type681 { get; set; } /// /// /// - public global::Vectara.PipelineRunEventDiscriminator? Type682 { get; set; } + public global::Vectara.RunCompletedEvent? Type682 { get; set; } /// /// /// - public global::Vectara.PipelineRunEventDiscriminatorType? Type683 { get; set; } + public global::Vectara.RunCompletedEventVariant2? Type683 { get; set; } /// /// /// - public global::Vectara.ListPipelineRunEventsResponse? Type684 { get; set; } + public global::Vectara.RecordProcessingEventStatus? Type684 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type685 { get; set; } + public global::Vectara.RecordProcessingEvent? Type685 { get; set; } /// /// /// - public global::Vectara.MetricKind? Type686 { get; set; } + public global::Vectara.RecordProcessingEventVariant2? Type686 { get; set; } /// /// /// - public global::Vectara.MetricDescriptor? Type687 { get; set; } + public global::Vectara.WatermarkAdvancedEvent? Type687 { get; set; } /// /// /// - public global::Vectara.ListMetricsResponse? Type688 { get; set; } + public global::Vectara.WatermarkAdvancedEventVariant2? Type688 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type689 { get; set; } + public global::Vectara.PipelineRunEvent? Type689 { get; set; } /// /// /// - public global::Vectara.MetricSeriesBase? Type690 { get; set; } + public global::Vectara.PipelineRunEventDiscriminator? Type690 { get; set; } /// /// /// - public global::Vectara.ScalarMetricPoint? Type691 { get; set; } + public global::Vectara.PipelineRunEventDiscriminatorType? Type691 { get; set; } /// /// /// - public global::Vectara.CounterMetricSeries? Type692 { get; set; } + public global::Vectara.ListPipelineRunEventsResponse? Type692 { get; set; } /// /// /// - public global::Vectara.CounterMetricSeriesVariant2? Type693 { get; set; } + public global::System.Collections.Generic.IList? Type693 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type694 { get; set; } + public global::Vectara.MetricKind? Type694 { get; set; } /// /// /// - public global::Vectara.GaugeMetricSeries? Type695 { get; set; } + public global::Vectara.MetricDescriptor? Type695 { get; set; } /// /// /// - public global::Vectara.GaugeMetricSeriesVariant2? Type696 { get; set; } + public global::Vectara.ListMetricsResponse? Type696 { get; set; } /// /// /// - public global::Vectara.PercentilesMetricPoint? Type697 { get; set; } + public global::System.Collections.Generic.IList? Type697 { get; set; } /// /// /// - public global::Vectara.PercentilesMetricSeries? Type698 { get; set; } + public global::Vectara.MetricSeriesBase? Type698 { get; set; } /// /// /// - public global::Vectara.PercentilesMetricSeriesVariant2? Type699 { get; set; } + public global::Vectara.ScalarMetricPoint? Type699 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type700 { get; set; } + public global::Vectara.CounterMetricSeries? Type700 { get; set; } /// /// /// - public global::Vectara.HistogramBin? Type701 { get; set; } + public global::Vectara.CounterMetricSeriesVariant2? Type701 { get; set; } /// /// /// - public global::Vectara.DistributionMetricPoint? Type702 { get; set; } + public global::System.Collections.Generic.IList? Type702 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type703 { get; set; } + public global::Vectara.GaugeMetricSeries? Type703 { get; set; } /// /// /// - public global::Vectara.DistributionMetricSeries? Type704 { get; set; } + public global::Vectara.GaugeMetricSeriesVariant2? Type704 { get; set; } /// /// /// - public global::Vectara.DistributionMetricSeriesVariant2? Type705 { get; set; } + public global::Vectara.PercentilesMetricPoint? Type705 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type706 { get; set; } + public global::Vectara.PercentilesMetricSeries? Type706 { get; set; } /// /// /// - public global::Vectara.MetricSeries? Type707 { get; set; } + public global::Vectara.PercentilesMetricSeriesVariant2? Type707 { get; set; } /// /// /// - public global::Vectara.MetricSeriesDiscriminator? Type708 { get; set; } + public global::System.Collections.Generic.IList? Type708 { get; set; } /// /// /// - public global::Vectara.MetricSeriesDiscriminatorKind? Type709 { get; set; } + public global::Vectara.HistogramBin? Type709 { get; set; } /// /// /// - public global::Vectara.AgentTrace? Type710 { get; set; } + public global::Vectara.DistributionMetricPoint? Type710 { get; set; } /// /// /// - public global::Vectara.AgentTraceStatus? Type711 { get; set; } + public global::System.Collections.Generic.IList? Type711 { get; set; } /// /// /// - public global::Vectara.ListAgentTracesResponse? Type712 { get; set; } + public global::Vectara.DistributionMetricSeries? Type712 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type713 { get; set; } + public global::Vectara.DistributionMetricSeriesVariant2? Type713 { get; set; } /// /// /// - public global::Vectara.AgentTraceSpanStatus? Type714 { get; set; } + public global::System.Collections.Generic.IList? Type714 { get; set; } /// /// /// - public global::Vectara.AgentTraceSpanBase? Type715 { get; set; } + public global::Vectara.MetricSeries? Type715 { get; set; } /// /// /// - public global::Vectara.AgentTraceInputFile? Type716 { get; set; } + public global::Vectara.MetricSeriesDiscriminator? Type716 { get; set; } /// /// /// - public global::Vectara.InvokeAgentSpanAttributes? Type717 { get; set; } + public global::Vectara.MetricSeriesDiscriminatorKind? Type717 { get; set; } /// /// /// - public global::Vectara.InvokeAgentSpanAttributesOutputType? Type718 { get; set; } + public global::Vectara.AgentTrace? Type718 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type719 { get; set; } + public global::Vectara.AgentTraceStatus? Type719 { get; set; } /// /// /// - public global::Vectara.InvokeAgentSpanContent? Type720 { get; set; } + public global::Vectara.ListAgentTracesResponse? Type720 { get; set; } /// /// /// - public global::Vectara.InvokeAgentTraceSpan? Type721 { get; set; } + public global::System.Collections.Generic.IList? Type721 { get; set; } /// /// /// - public global::Vectara.InvokeAgentTraceSpanVariant2? Type722 { get; set; } + public global::Vectara.AgentTraceSpanStatus? Type722 { get; set; } /// /// /// - public global::Vectara.ChatSpanAttributes? Type723 { get; set; } + public global::Vectara.AgentTraceSpanBase? Type723 { get; set; } /// /// /// - public global::Vectara.ChatTraceSpan? Type724 { get; set; } + public global::Vectara.AgentTraceInputFile? Type724 { get; set; } /// /// /// - public global::Vectara.ChatTraceSpanVariant2? Type725 { get; set; } + public global::Vectara.InvokeAgentSpanAttributes? Type725 { get; set; } /// /// /// - public global::Vectara.ExecuteToolSpanAttributes? Type726 { get; set; } + public global::Vectara.InvokeAgentSpanAttributesOutputType? Type726 { get; set; } /// /// /// - public global::Vectara.ExecuteToolSpanContent? Type727 { get; set; } + public global::System.Collections.Generic.IList? Type727 { get; set; } /// /// /// - public global::Vectara.ExecuteToolTraceSpan? Type728 { get; set; } + public global::Vectara.InvokeAgentSpanContent? Type728 { get; set; } /// /// /// - public global::Vectara.ExecuteToolTraceSpanVariant2? Type729 { get; set; } + public global::Vectara.InvokeAgentTraceSpan? Type729 { get; set; } /// /// /// - public global::Vectara.ThinkingSpanContent? Type730 { get; set; } + public global::Vectara.InvokeAgentTraceSpanVariant2? Type730 { get; set; } /// /// /// - public global::Vectara.ThinkingTraceSpan? Type731 { get; set; } + public global::Vectara.ChatSpanAttributes? Type731 { get; set; } /// /// /// - public global::Vectara.ThinkingTraceSpanVariant2? Type732 { get; set; } + public global::Vectara.ChatTraceSpan? Type732 { get; set; } /// /// /// - public global::Vectara.OutputSpanContent? Type733 { get; set; } + public global::Vectara.ChatTraceSpanVariant2? Type733 { get; set; } /// /// /// - public global::Vectara.OutputTraceSpan? Type734 { get; set; } + public global::Vectara.ExecuteToolSpanAttributes? Type734 { get; set; } /// /// /// - public global::Vectara.OutputTraceSpanVariant2? Type735 { get; set; } + public global::Vectara.ExecuteToolSpanContent? Type735 { get; set; } /// /// /// - public global::Vectara.GuardrailSpanAttributes? Type736 { get; set; } + public global::Vectara.ExecuteToolTraceSpan? Type736 { get; set; } /// /// /// - public global::Vectara.GuardrailSpanContent? Type737 { get; set; } + public global::Vectara.ExecuteToolTraceSpanVariant2? Type737 { get; set; } /// /// /// - public global::Vectara.GuardrailTraceSpan? Type738 { get; set; } + public global::Vectara.ThinkingSpanContent? Type738 { get; set; } /// /// /// - public global::Vectara.GuardrailTraceSpanVariant2? Type739 { get; set; } + public global::Vectara.ThinkingTraceSpan? Type739 { get; set; } /// /// /// - public global::Vectara.StepTransitionSpanAttributes? Type740 { get; set; } + public global::Vectara.ThinkingTraceSpanVariant2? Type740 { get; set; } /// /// /// - public global::Vectara.StepTransitionTraceSpan? Type741 { get; set; } + public global::Vectara.OutputSpanContent? Type741 { get; set; } /// /// /// - public global::Vectara.StepTransitionTraceSpanVariant2? Type742 { get; set; } + public global::Vectara.OutputTraceSpan? Type742 { get; set; } /// /// /// - public global::Vectara.ImageReadSpanAttributes? Type743 { get; set; } + public global::Vectara.OutputTraceSpanVariant2? Type743 { get; set; } /// /// /// - public global::Vectara.ImageReadTraceSpan? Type744 { get; set; } + public global::Vectara.GuardrailSpanAttributes? Type744 { get; set; } /// /// /// - public global::Vectara.ImageReadTraceSpanVariant2? Type745 { get; set; } + public global::Vectara.GuardrailSpanContent? Type745 { get; set; } /// /// /// - public global::Vectara.CompactionSpanAttributes? Type746 { get; set; } + public global::Vectara.GuardrailTraceSpan? Type746 { get; set; } /// /// /// - public global::Vectara.CompactionTraceSpan? Type747 { get; set; } + public global::Vectara.GuardrailTraceSpanVariant2? Type747 { get; set; } /// /// /// - public global::Vectara.CompactionTraceSpanVariant2? Type748 { get; set; } + public global::Vectara.StepTransitionSpanAttributes? Type748 { get; set; } /// /// /// - public global::Vectara.AgentTraceSpan? Type749 { get; set; } + public global::Vectara.StepTransitionTraceSpan? Type749 { get; set; } /// /// /// - public global::Vectara.AgentTraceSpanDiscriminator? Type750 { get; set; } + public global::Vectara.StepTransitionTraceSpanVariant2? Type750 { get; set; } /// /// /// - public global::Vectara.AgentTraceSpanDiscriminatorOperation? Type751 { get; set; } + public global::Vectara.ImageReadSpanAttributes? Type751 { get; set; } /// /// /// - public global::Vectara.ListAgentTraceSpansResponse? Type752 { get; set; } + public global::Vectara.ImageReadTraceSpan? Type752 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type753 { get; set; } + public global::Vectara.ImageReadTraceSpanVariant2? Type753 { get; set; } /// /// /// - public global::Vectara.Glossary? Type754 { get; set; } + public global::Vectara.CompactionSpanAttributes? Type754 { get; set; } /// /// /// - public global::Vectara.ListGlossariesResponse? Type755 { get; set; } + public global::Vectara.CompactionTraceSpan? Type755 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type756 { get; set; } + public global::Vectara.CompactionTraceSpanVariant2? Type756 { get; set; } /// /// /// - public global::Vectara.CreateGlossaryRequest? Type757 { get; set; } + public global::Vectara.AgentTraceSpan? Type757 { get; set; } /// /// /// - public global::Vectara.UpdateGlossaryRequest? Type758 { get; set; } + public global::Vectara.AgentTraceSpanDiscriminator? Type758 { get; set; } /// /// /// - public global::Vectara.GlossaryEntry? Type759 { get; set; } + public global::Vectara.AgentTraceSpanDiscriminatorOperation? Type759 { get; set; } /// /// /// - public global::Vectara.GlossaryEntriesResponse? Type760 { get; set; } + public global::Vectara.ListAgentTraceSpansResponse? Type760 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type761 { get; set; } + public global::System.Collections.Generic.IList? Type761 { get; set; } /// /// /// - public global::Vectara.UpsertGlossaryEntriesRequest? Type762 { get; set; } + public global::Vectara.Glossary? Type762 { get; set; } /// /// /// - public global::Vectara.DeleteGlossaryEntriesRequest? Type763 { get; set; } + public global::Vectara.ListGlossariesResponse? Type763 { get; set; } /// /// /// - public global::Vectara.GetOAuthTokenRequest? Type764 { get; set; } + public global::System.Collections.Generic.IList? Type764 { get; set; } /// /// /// - public global::Vectara.CreateCorpusDocumentWaitFor? Type765 { get; set; } + public global::Vectara.CreateGlossaryRequest? Type765 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type766 { get; set; } + public global::Vectara.UpdateGlossaryRequest? Type766 { get; set; } /// /// /// - public global::Vectara.ListToolServersType? Type767 { get; set; } + public global::Vectara.GlossaryEntry? Type767 { get; set; } /// /// /// - public global::Vectara.ListToolsType? Type768 { get; set; } + public global::Vectara.GlossaryEntriesResponse? Type768 { get; set; } /// /// /// - public global::Vectara.ListInstructionsType? Type769 { get; set; } + public global::System.Collections.Generic.IList? Type769 { get; set; } /// /// /// - public global::Vectara.ListSessionArtifactsSortBy? Type770 { get; set; } + public global::Vectara.UpsertGlossaryEntriesRequest? Type770 { get; set; } /// /// /// - public global::Vectara.ListSessionArtifactsOrderBy? Type771 { get; set; } + public global::Vectara.DeleteGlossaryEntriesRequest? Type771 { get; set; } /// /// /// - public global::Vectara.ListAgentConnectorsType? Type772 { get; set; } + public global::Vectara.GetOAuthTokenRequest? Type772 { get; set; } /// /// /// - public global::Vectara.ListPipelinesSourceType? Type773 { get; set; } + public global::Vectara.CreateCorpusDocumentWaitFor? Type773 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type774 { get; set; } + public global::System.Collections.Generic.IList? Type774 { get; set; } /// /// /// - public global::Vectara.ListTracesStatus? Type775 { get; set; } + public global::Vectara.ListToolServersType? Type775 { get; set; } /// /// /// - public global::Vectara.ListTracesErrorType? Type776 { get; set; } + public global::Vectara.ListToolsType? Type776 { get; set; } /// /// /// - public global::Vectara.ListTracesOperation? Type777 { get; set; } + public global::Vectara.ListInstructionsType? Type777 { get; set; } /// /// /// - public global::Vectara.ListTracesToolErrorType? Type778 { get; set; } + public global::Vectara.ListSessionArtifactsSortBy? Type778 { get; set; } /// /// /// - public global::Vectara.ListTraceSpansOperation? Type779 { get; set; } + public global::Vectara.ListSessionArtifactsOrderBy? Type779 { get; set; } /// /// /// - public global::Vectara.AllOf? Type780 { get; set; } + public global::Vectara.ListAgentConnectorsType? Type780 { get; set; } /// /// /// - public global::Vectara.CreateUserResponse2? Type781 { get; set; } + public global::Vectara.ListPipelinesSourceType? Type781 { get; set; } /// /// /// - public global::Vectara.ResetUserPasswordResponse? Type782 { get; set; } + public global::System.Collections.Generic.IList? Type782 { get; set; } /// /// /// - public global::Vectara.GetTokenResponse? Type783 { get; set; } + public global::Vectara.ListTracesStatus? Type783 { get; set; } + /// + /// + /// + public global::Vectara.ListTracesErrorType? Type784 { get; set; } + /// + /// + /// + public global::Vectara.ListTracesOperation? Type785 { get; set; } + /// + /// + /// + public global::Vectara.ListTracesToolErrorType? Type786 { get; set; } + /// + /// + /// + public global::Vectara.ListTraceSpansOperation? Type787 { get; set; } + /// + /// + /// + public global::Vectara.AllOf? Type788 { get; set; } + /// + /// + /// + public global::Vectara.CreateUserResponse2? Type789 { get; set; } + /// + /// + /// + public global::Vectara.ResetUserPasswordResponse? Type790 { get; set; } + /// + /// + /// + public global::Vectara.GetTokenResponse? Type791 { get; set; } /// /// diff --git a/src/libs/Vectara/Generated/Vectara.LlmClient.ChatCompletion.g.cs b/src/libs/Vectara/Generated/Vectara.LlmClient.ChatCompletion.g.cs index 29fc938a..926635aa 100644 --- a/src/libs/Vectara/Generated/Vectara.LlmClient.ChatCompletion.g.cs +++ b/src/libs/Vectara/Generated/Vectara.LlmClient.ChatCompletion.g.cs @@ -498,18 +498,17 @@ partial void ProcessChatCompletionResponseContent( __exception_400 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Permissions do not allow creating a chat completion. if ((int)__response.StatusCode == 403) @@ -536,18 +535,17 @@ partial void ProcessChatCompletionResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -581,17 +579,15 @@ partial void ProcessChatCompletionResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -628,17 +624,15 @@ partial void ProcessChatCompletionResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.LlmClient.ChatCompletionAsStream.g.cs b/src/libs/Vectara/Generated/Vectara.LlmClient.ChatCompletionAsStream.g.cs index 94f62c36..0b80b031 100644 --- a/src/libs/Vectara/Generated/Vectara.LlmClient.ChatCompletionAsStream.g.cs +++ b/src/libs/Vectara/Generated/Vectara.LlmClient.ChatCompletionAsStream.g.cs @@ -418,17 +418,15 @@ partial void ProcessChatCompletionAsStreamResponse( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } using var __stream = await __response.Content.ReadAsStreamAsync( @@ -447,16 +445,15 @@ partial void ProcessChatCompletionAsStreamResponse( } var __streamedResponse = global::Vectara.CreateChatCompletionStreamResponse.FromJson(__content, JsonSerializerContext) ?? - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: $"Response deserialization failed for \"{__content}\" ", - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + innerException: null, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); yield return __streamedResponse; } diff --git a/src/libs/Vectara/Generated/Vectara.LlmsClient.Create.g.cs b/src/libs/Vectara/Generated/Vectara.LlmsClient.Create.g.cs index d168da54..540e549d 100644 --- a/src/libs/Vectara/Generated/Vectara.LlmsClient.Create.g.cs +++ b/src/libs/Vectara/Generated/Vectara.LlmsClient.Create.g.cs @@ -655,18 +655,17 @@ partial void ProcessCreateResponseContent( __exception_400 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Permissions do not allow creating an LLM if ((int)__response.StatusCode == 403) @@ -693,18 +692,17 @@ partial void ProcessCreateResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -738,17 +736,15 @@ partial void ProcessCreateResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -785,17 +781,15 @@ partial void ProcessCreateResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.LlmsClient.Delete.g.cs b/src/libs/Vectara/Generated/Vectara.LlmsClient.Delete.g.cs index 3ca683c2..704b5eda 100644 --- a/src/libs/Vectara/Generated/Vectara.LlmsClient.Delete.g.cs +++ b/src/libs/Vectara/Generated/Vectara.LlmsClient.Delete.g.cs @@ -395,18 +395,17 @@ await DeleteAsResponseAsync( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // LLM not found. if ((int)__response.StatusCode == 404) @@ -433,18 +432,17 @@ await DeleteAsResponseAsync( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -471,17 +469,15 @@ await DeleteAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -509,17 +505,15 @@ await DeleteAsResponseAsync( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.LlmsClient.Get.g.cs b/src/libs/Vectara/Generated/Vectara.LlmsClient.Get.g.cs index a5f4d7fd..09e3ca8c 100644 --- a/src/libs/Vectara/Generated/Vectara.LlmsClient.Get.g.cs +++ b/src/libs/Vectara/Generated/Vectara.LlmsClient.Get.g.cs @@ -404,18 +404,17 @@ partial void ProcessGetResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // LLM not found. if ((int)__response.StatusCode == 404) @@ -442,18 +441,17 @@ partial void ProcessGetResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -487,17 +485,15 @@ partial void ProcessGetResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -534,17 +530,15 @@ partial void ProcessGetResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.LlmsClient.List.g.cs b/src/libs/Vectara/Generated/Vectara.LlmsClient.List.g.cs index 4500c00b..af5fba60 100644 --- a/src/libs/Vectara/Generated/Vectara.LlmsClient.List.g.cs +++ b/src/libs/Vectara/Generated/Vectara.LlmsClient.List.g.cs @@ -425,18 +425,17 @@ partial void ProcessListResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + 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 ProcessListResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 ProcessListResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.LlmsClient.Update.g.cs b/src/libs/Vectara/Generated/Vectara.LlmsClient.Update.g.cs index 6a0a1687..6cd8de9e 100644 --- a/src/libs/Vectara/Generated/Vectara.LlmsClient.Update.g.cs +++ b/src/libs/Vectara/Generated/Vectara.LlmsClient.Update.g.cs @@ -444,18 +444,17 @@ partial void ProcessUpdateResponseContent( __exception_400 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Permissions do not allow updating this LLM or LLM is built-in if ((int)__response.StatusCode == 403) @@ -482,18 +481,17 @@ partial void ProcessUpdateResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // LLM not found if ((int)__response.StatusCode == 404) @@ -520,18 +518,17 @@ partial void ProcessUpdateResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -565,17 +562,15 @@ partial void ProcessUpdateResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -612,17 +607,15 @@ partial void ProcessUpdateResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.MetadataClient.QueryMetadata.g.cs b/src/libs/Vectara/Generated/Vectara.MetadataClient.QueryMetadata.g.cs index fc404946..b868230d 100644 --- a/src/libs/Vectara/Generated/Vectara.MetadataClient.QueryMetadata.g.cs +++ b/src/libs/Vectara/Generated/Vectara.MetadataClient.QueryMetadata.g.cs @@ -424,18 +424,17 @@ partial void ProcessQueryMetadataResponseContent( __exception_400 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Permissions do not allow querying metadata in the corpus. if ((int)__response.StatusCode == 403) @@ -462,18 +461,17 @@ partial void ProcessQueryMetadataResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Corpus not found. if ((int)__response.StatusCode == 404) @@ -500,18 +498,17 @@ partial void ProcessQueryMetadataResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -545,17 +542,15 @@ partial void ProcessQueryMetadataResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -592,17 +587,15 @@ partial void ProcessQueryMetadataResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.Models.AgentStreamedResponse.g.cs b/src/libs/Vectara/Generated/Vectara.Models.AgentStreamedResponse.g.cs index 7d2f8d72..826a0acc 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.AgentStreamedResponse.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.AgentStreamedResponse.g.cs @@ -387,6 +387,43 @@ public bool TryPickToolOutput( ? ToolOutput!.Value : throw new global::System.InvalidOperationException($"Expected union variant 'ToolOutput' but the value was {ToString()}."); + /// + /// A sideband event emitted by a tool during its execution (streaming only, not stored). Always falls between the tool's tool_input and tool_output events for the same tool_call_id. Polymorphic on `activity_type` — see GenericToolActivityEvent (free-form text) and SubAgentToolActivityEvent (relayed inner AgentEvent). + /// +#if NET6_0_OR_GREATER + public global::Vectara.ToolActivityEvent? ToolActivity { get; init; } +#else + public global::Vectara.ToolActivityEvent? ToolActivity { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ToolActivity))] +#endif + public bool IsToolActivity => ToolActivity != null; + + /// + /// + /// + public bool TryPickToolActivity( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.ToolActivityEvent? value) + { + value = ToolActivity; + return IsToolActivity; + } + + /// + /// + /// + public global::Vectara.ToolActivityEvent PickToolActivity() => IsToolActivity + ? ToolActivity!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'ToolActivity' but the value was {ToString()}."); + /// /// An event representing a complete agent response with structured JSON content conforming to a schema.
/// This event is published instead of AgentOutputEvent when the agent's output_parser is configured
@@ -1033,6 +1070,29 @@ public AgentStreamedResponse(global::Vectara.ToolOutputEvent? value) ///
public static AgentStreamedResponse FromToolOutput(global::Vectara.ToolOutputEvent? value) => new AgentStreamedResponse(value); + /// + /// + /// + public static implicit operator AgentStreamedResponse(global::Vectara.ToolActivityEvent value) => new AgentStreamedResponse((global::Vectara.ToolActivityEvent?)value); + + /// + /// + /// + public static implicit operator global::Vectara.ToolActivityEvent?(AgentStreamedResponse @this) => @this.ToolActivity; + + /// + /// + /// + public AgentStreamedResponse(global::Vectara.ToolActivityEvent? value) + { + ToolActivity = value; + } + + /// + /// + /// + public static AgentStreamedResponse FromToolActivity(global::Vectara.ToolActivityEvent? value) => new AgentStreamedResponse(value); + /// /// /// @@ -1301,6 +1361,7 @@ public AgentStreamedResponse( global::Vectara.StreamingThinkingEnd? streamingThinkingEnd, global::Vectara.ToolInputEvent? toolInput, global::Vectara.ToolOutputEvent? toolOutput, + global::Vectara.ToolActivityEvent? toolActivity, global::Vectara.StructuredOutputEvent? structuredOutput, global::Vectara.ContextLimitExceededEvent? contextLimitExceeded, global::Vectara.StepTransitionLimitExceededEvent? stepTransitionLimitExceeded, @@ -1326,6 +1387,7 @@ public AgentStreamedResponse( StreamingThinkingEnd = streamingThinkingEnd; ToolInput = toolInput; ToolOutput = toolOutput; + ToolActivity = toolActivity; StructuredOutput = structuredOutput; ContextLimitExceeded = contextLimitExceeded; StepTransitionLimitExceeded = stepTransitionLimitExceeded; @@ -1354,6 +1416,7 @@ SessionInterrupted as object ?? StepTransitionLimitExceeded as object ?? ContextLimitExceeded as object ?? StructuredOutput as object ?? + ToolActivity as object ?? ToolOutput as object ?? ToolInput as object ?? StreamingThinkingEnd as object ?? @@ -1380,6 +1443,7 @@ SkillLoad as object StreamingThinkingEnd?.ToString() ?? ToolInput?.ToString() ?? ToolOutput?.ToString() ?? + ToolActivity?.ToString() ?? StructuredOutput?.ToString() ?? ContextLimitExceeded?.ToString() ?? StepTransitionLimitExceeded?.ToString() ?? @@ -1398,7 +1462,7 @@ SkillLoad as object ///
public bool Validate() { - return IsSkillLoad && !IsThinking && !IsArtifactUpload && !IsInputMessage && !IsStreamingAgentOutput && !IsStreamingAgentOutputEnd && !IsStreamingThinking && !IsStreamingThinkingEnd && !IsToolInput && !IsToolOutput && !IsStructuredOutput && !IsContextLimitExceeded && !IsStepTransitionLimitExceeded && !IsSessionInterrupted && !IsImageRead && !IsStepTransition && !IsContextConsumed && !IsCompactionStarted && !IsCompaction && !IsError && !IsEnd || !IsSkillLoad && IsThinking && !IsArtifactUpload && !IsInputMessage && !IsStreamingAgentOutput && !IsStreamingAgentOutputEnd && !IsStreamingThinking && !IsStreamingThinkingEnd && !IsToolInput && !IsToolOutput && !IsStructuredOutput && !IsContextLimitExceeded && !IsStepTransitionLimitExceeded && !IsSessionInterrupted && !IsImageRead && !IsStepTransition && !IsContextConsumed && !IsCompactionStarted && !IsCompaction && !IsError && !IsEnd || !IsSkillLoad && !IsThinking && IsArtifactUpload && !IsInputMessage && !IsStreamingAgentOutput && !IsStreamingAgentOutputEnd && !IsStreamingThinking && !IsStreamingThinkingEnd && !IsToolInput && !IsToolOutput && !IsStructuredOutput && !IsContextLimitExceeded && !IsStepTransitionLimitExceeded && !IsSessionInterrupted && !IsImageRead && !IsStepTransition && !IsContextConsumed && !IsCompactionStarted && !IsCompaction && !IsError && !IsEnd || !IsSkillLoad && !IsThinking && !IsArtifactUpload && IsInputMessage && !IsStreamingAgentOutput && !IsStreamingAgentOutputEnd && !IsStreamingThinking && !IsStreamingThinkingEnd && !IsToolInput && !IsToolOutput && !IsStructuredOutput && !IsContextLimitExceeded && !IsStepTransitionLimitExceeded && !IsSessionInterrupted && !IsImageRead && !IsStepTransition && !IsContextConsumed && !IsCompactionStarted && !IsCompaction && !IsError && !IsEnd || !IsSkillLoad && !IsThinking && !IsArtifactUpload && !IsInputMessage && IsStreamingAgentOutput && !IsStreamingAgentOutputEnd && !IsStreamingThinking && !IsStreamingThinkingEnd && !IsToolInput && !IsToolOutput && !IsStructuredOutput && !IsContextLimitExceeded && !IsStepTransitionLimitExceeded && !IsSessionInterrupted && !IsImageRead && !IsStepTransition && !IsContextConsumed && !IsCompactionStarted && !IsCompaction && !IsError && !IsEnd || !IsSkillLoad && !IsThinking && !IsArtifactUpload && !IsInputMessage && !IsStreamingAgentOutput && IsStreamingAgentOutputEnd && !IsStreamingThinking && !IsStreamingThinkingEnd && !IsToolInput && !IsToolOutput && !IsStructuredOutput && !IsContextLimitExceeded && !IsStepTransitionLimitExceeded && !IsSessionInterrupted && !IsImageRead && !IsStepTransition && !IsContextConsumed && !IsCompactionStarted && !IsCompaction && !IsError && !IsEnd || !IsSkillLoad && !IsThinking && !IsArtifactUpload && !IsInputMessage && !IsStreamingAgentOutput && !IsStreamingAgentOutputEnd && IsStreamingThinking && !IsStreamingThinkingEnd && !IsToolInput && !IsToolOutput && !IsStructuredOutput && !IsContextLimitExceeded && !IsStepTransitionLimitExceeded && !IsSessionInterrupted && !IsImageRead && !IsStepTransition && !IsContextConsumed && !IsCompactionStarted && !IsCompaction && !IsError && !IsEnd || !IsSkillLoad && !IsThinking && !IsArtifactUpload && !IsInputMessage && !IsStreamingAgentOutput && !IsStreamingAgentOutputEnd && !IsStreamingThinking && IsStreamingThinkingEnd && !IsToolInput && !IsToolOutput && !IsStructuredOutput && !IsContextLimitExceeded && !IsStepTransitionLimitExceeded && !IsSessionInterrupted && !IsImageRead && !IsStepTransition && !IsContextConsumed && !IsCompactionStarted && !IsCompaction && !IsError && !IsEnd || !IsSkillLoad && !IsThinking && !IsArtifactUpload && !IsInputMessage && !IsStreamingAgentOutput && !IsStreamingAgentOutputEnd && !IsStreamingThinking && !IsStreamingThinkingEnd && IsToolInput && !IsToolOutput && !IsStructuredOutput && !IsContextLimitExceeded && !IsStepTransitionLimitExceeded && !IsSessionInterrupted && !IsImageRead && !IsStepTransition && !IsContextConsumed && !IsCompactionStarted && !IsCompaction && !IsError && !IsEnd || !IsSkillLoad && !IsThinking && !IsArtifactUpload && !IsInputMessage && !IsStreamingAgentOutput && !IsStreamingAgentOutputEnd && !IsStreamingThinking && !IsStreamingThinkingEnd && !IsToolInput && IsToolOutput && !IsStructuredOutput && !IsContextLimitExceeded && !IsStepTransitionLimitExceeded && !IsSessionInterrupted && !IsImageRead && !IsStepTransition && !IsContextConsumed && !IsCompactionStarted && !IsCompaction && !IsError && !IsEnd || !IsSkillLoad && !IsThinking && !IsArtifactUpload && !IsInputMessage && !IsStreamingAgentOutput && !IsStreamingAgentOutputEnd && !IsStreamingThinking && !IsStreamingThinkingEnd && !IsToolInput && !IsToolOutput && IsStructuredOutput && !IsContextLimitExceeded && !IsStepTransitionLimitExceeded && !IsSessionInterrupted && !IsImageRead && !IsStepTransition && !IsContextConsumed && !IsCompactionStarted && !IsCompaction && !IsError && !IsEnd || !IsSkillLoad && !IsThinking && !IsArtifactUpload && !IsInputMessage && !IsStreamingAgentOutput && !IsStreamingAgentOutputEnd && !IsStreamingThinking && !IsStreamingThinkingEnd && !IsToolInput && !IsToolOutput && !IsStructuredOutput && IsContextLimitExceeded && !IsStepTransitionLimitExceeded && !IsSessionInterrupted && !IsImageRead && !IsStepTransition && !IsContextConsumed && !IsCompactionStarted && !IsCompaction && !IsError && !IsEnd || !IsSkillLoad && !IsThinking && !IsArtifactUpload && !IsInputMessage && !IsStreamingAgentOutput && !IsStreamingAgentOutputEnd && !IsStreamingThinking && !IsStreamingThinkingEnd && !IsToolInput && !IsToolOutput && !IsStructuredOutput && !IsContextLimitExceeded && IsStepTransitionLimitExceeded && !IsSessionInterrupted && !IsImageRead && !IsStepTransition && !IsContextConsumed && !IsCompactionStarted && !IsCompaction && !IsError && !IsEnd || !IsSkillLoad && !IsThinking && !IsArtifactUpload && !IsInputMessage && !IsStreamingAgentOutput && !IsStreamingAgentOutputEnd && !IsStreamingThinking && !IsStreamingThinkingEnd && !IsToolInput && !IsToolOutput && !IsStructuredOutput && !IsContextLimitExceeded && !IsStepTransitionLimitExceeded && IsSessionInterrupted && !IsImageRead && !IsStepTransition && !IsContextConsumed && !IsCompactionStarted && !IsCompaction && !IsError && !IsEnd || !IsSkillLoad && !IsThinking && !IsArtifactUpload && !IsInputMessage && !IsStreamingAgentOutput && !IsStreamingAgentOutputEnd && !IsStreamingThinking && !IsStreamingThinkingEnd && !IsToolInput && !IsToolOutput && !IsStructuredOutput && !IsContextLimitExceeded && !IsStepTransitionLimitExceeded && !IsSessionInterrupted && IsImageRead && !IsStepTransition && !IsContextConsumed && !IsCompactionStarted && !IsCompaction && !IsError && !IsEnd || !IsSkillLoad && !IsThinking && !IsArtifactUpload && !IsInputMessage && !IsStreamingAgentOutput && !IsStreamingAgentOutputEnd && !IsStreamingThinking && !IsStreamingThinkingEnd && !IsToolInput && !IsToolOutput && !IsStructuredOutput && !IsContextLimitExceeded && !IsStepTransitionLimitExceeded && !IsSessionInterrupted && !IsImageRead && IsStepTransition && !IsContextConsumed && !IsCompactionStarted && !IsCompaction && !IsError && !IsEnd || !IsSkillLoad && !IsThinking && !IsArtifactUpload && !IsInputMessage && !IsStreamingAgentOutput && !IsStreamingAgentOutputEnd && !IsStreamingThinking && !IsStreamingThinkingEnd && !IsToolInput && !IsToolOutput && !IsStructuredOutput && !IsContextLimitExceeded && !IsStepTransitionLimitExceeded && !IsSessionInterrupted && !IsImageRead && !IsStepTransition && IsContextConsumed && !IsCompactionStarted && !IsCompaction && !IsError && !IsEnd || !IsSkillLoad && !IsThinking && !IsArtifactUpload && !IsInputMessage && !IsStreamingAgentOutput && !IsStreamingAgentOutputEnd && !IsStreamingThinking && !IsStreamingThinkingEnd && !IsToolInput && !IsToolOutput && !IsStructuredOutput && !IsContextLimitExceeded && !IsStepTransitionLimitExceeded && !IsSessionInterrupted && !IsImageRead && !IsStepTransition && !IsContextConsumed && IsCompactionStarted && !IsCompaction && !IsError && !IsEnd || !IsSkillLoad && !IsThinking && !IsArtifactUpload && !IsInputMessage && !IsStreamingAgentOutput && !IsStreamingAgentOutputEnd && !IsStreamingThinking && !IsStreamingThinkingEnd && !IsToolInput && !IsToolOutput && !IsStructuredOutput && !IsContextLimitExceeded && !IsStepTransitionLimitExceeded && !IsSessionInterrupted && !IsImageRead && !IsStepTransition && !IsContextConsumed && !IsCompactionStarted && IsCompaction && !IsError && !IsEnd || !IsSkillLoad && !IsThinking && !IsArtifactUpload && !IsInputMessage && !IsStreamingAgentOutput && !IsStreamingAgentOutputEnd && !IsStreamingThinking && !IsStreamingThinkingEnd && !IsToolInput && !IsToolOutput && !IsStructuredOutput && !IsContextLimitExceeded && !IsStepTransitionLimitExceeded && !IsSessionInterrupted && !IsImageRead && !IsStepTransition && !IsContextConsumed && !IsCompactionStarted && !IsCompaction && IsError && !IsEnd || !IsSkillLoad && !IsThinking && !IsArtifactUpload && !IsInputMessage && !IsStreamingAgentOutput && !IsStreamingAgentOutputEnd && !IsStreamingThinking && !IsStreamingThinkingEnd && !IsToolInput && !IsToolOutput && !IsStructuredOutput && !IsContextLimitExceeded && !IsStepTransitionLimitExceeded && !IsSessionInterrupted && !IsImageRead && !IsStepTransition && !IsContextConsumed && !IsCompactionStarted && !IsCompaction && !IsError && IsEnd; + return IsSkillLoad && !IsThinking && !IsArtifactUpload && !IsInputMessage && !IsStreamingAgentOutput && !IsStreamingAgentOutputEnd && !IsStreamingThinking && !IsStreamingThinkingEnd && !IsToolInput && !IsToolOutput && !IsToolActivity && !IsStructuredOutput && !IsContextLimitExceeded && !IsStepTransitionLimitExceeded && !IsSessionInterrupted && !IsImageRead && !IsStepTransition && !IsContextConsumed && !IsCompactionStarted && !IsCompaction && !IsError && !IsEnd || !IsSkillLoad && IsThinking && !IsArtifactUpload && !IsInputMessage && !IsStreamingAgentOutput && !IsStreamingAgentOutputEnd && !IsStreamingThinking && !IsStreamingThinkingEnd && !IsToolInput && !IsToolOutput && !IsToolActivity && !IsStructuredOutput && !IsContextLimitExceeded && !IsStepTransitionLimitExceeded && !IsSessionInterrupted && !IsImageRead && !IsStepTransition && !IsContextConsumed && !IsCompactionStarted && !IsCompaction && !IsError && !IsEnd || !IsSkillLoad && !IsThinking && IsArtifactUpload && !IsInputMessage && !IsStreamingAgentOutput && !IsStreamingAgentOutputEnd && !IsStreamingThinking && !IsStreamingThinkingEnd && !IsToolInput && !IsToolOutput && !IsToolActivity && !IsStructuredOutput && !IsContextLimitExceeded && !IsStepTransitionLimitExceeded && !IsSessionInterrupted && !IsImageRead && !IsStepTransition && !IsContextConsumed && !IsCompactionStarted && !IsCompaction && !IsError && !IsEnd || !IsSkillLoad && !IsThinking && !IsArtifactUpload && IsInputMessage && !IsStreamingAgentOutput && !IsStreamingAgentOutputEnd && !IsStreamingThinking && !IsStreamingThinkingEnd && !IsToolInput && !IsToolOutput && !IsToolActivity && !IsStructuredOutput && !IsContextLimitExceeded && !IsStepTransitionLimitExceeded && !IsSessionInterrupted && !IsImageRead && !IsStepTransition && !IsContextConsumed && !IsCompactionStarted && !IsCompaction && !IsError && !IsEnd || !IsSkillLoad && !IsThinking && !IsArtifactUpload && !IsInputMessage && IsStreamingAgentOutput && !IsStreamingAgentOutputEnd && !IsStreamingThinking && !IsStreamingThinkingEnd && !IsToolInput && !IsToolOutput && !IsToolActivity && !IsStructuredOutput && !IsContextLimitExceeded && !IsStepTransitionLimitExceeded && !IsSessionInterrupted && !IsImageRead && !IsStepTransition && !IsContextConsumed && !IsCompactionStarted && !IsCompaction && !IsError && !IsEnd || !IsSkillLoad && !IsThinking && !IsArtifactUpload && !IsInputMessage && !IsStreamingAgentOutput && IsStreamingAgentOutputEnd && !IsStreamingThinking && !IsStreamingThinkingEnd && !IsToolInput && !IsToolOutput && !IsToolActivity && !IsStructuredOutput && !IsContextLimitExceeded && !IsStepTransitionLimitExceeded && !IsSessionInterrupted && !IsImageRead && !IsStepTransition && !IsContextConsumed && !IsCompactionStarted && !IsCompaction && !IsError && !IsEnd || !IsSkillLoad && !IsThinking && !IsArtifactUpload && !IsInputMessage && !IsStreamingAgentOutput && !IsStreamingAgentOutputEnd && IsStreamingThinking && !IsStreamingThinkingEnd && !IsToolInput && !IsToolOutput && !IsToolActivity && !IsStructuredOutput && !IsContextLimitExceeded && !IsStepTransitionLimitExceeded && !IsSessionInterrupted && !IsImageRead && !IsStepTransition && !IsContextConsumed && !IsCompactionStarted && !IsCompaction && !IsError && !IsEnd || !IsSkillLoad && !IsThinking && !IsArtifactUpload && !IsInputMessage && !IsStreamingAgentOutput && !IsStreamingAgentOutputEnd && !IsStreamingThinking && IsStreamingThinkingEnd && !IsToolInput && !IsToolOutput && !IsToolActivity && !IsStructuredOutput && !IsContextLimitExceeded && !IsStepTransitionLimitExceeded && !IsSessionInterrupted && !IsImageRead && !IsStepTransition && !IsContextConsumed && !IsCompactionStarted && !IsCompaction && !IsError && !IsEnd || !IsSkillLoad && !IsThinking && !IsArtifactUpload && !IsInputMessage && !IsStreamingAgentOutput && !IsStreamingAgentOutputEnd && !IsStreamingThinking && !IsStreamingThinkingEnd && IsToolInput && !IsToolOutput && !IsToolActivity && !IsStructuredOutput && !IsContextLimitExceeded && !IsStepTransitionLimitExceeded && !IsSessionInterrupted && !IsImageRead && !IsStepTransition && !IsContextConsumed && !IsCompactionStarted && !IsCompaction && !IsError && !IsEnd || !IsSkillLoad && !IsThinking && !IsArtifactUpload && !IsInputMessage && !IsStreamingAgentOutput && !IsStreamingAgentOutputEnd && !IsStreamingThinking && !IsStreamingThinkingEnd && !IsToolInput && IsToolOutput && !IsToolActivity && !IsStructuredOutput && !IsContextLimitExceeded && !IsStepTransitionLimitExceeded && !IsSessionInterrupted && !IsImageRead && !IsStepTransition && !IsContextConsumed && !IsCompactionStarted && !IsCompaction && !IsError && !IsEnd || !IsSkillLoad && !IsThinking && !IsArtifactUpload && !IsInputMessage && !IsStreamingAgentOutput && !IsStreamingAgentOutputEnd && !IsStreamingThinking && !IsStreamingThinkingEnd && !IsToolInput && !IsToolOutput && IsToolActivity && !IsStructuredOutput && !IsContextLimitExceeded && !IsStepTransitionLimitExceeded && !IsSessionInterrupted && !IsImageRead && !IsStepTransition && !IsContextConsumed && !IsCompactionStarted && !IsCompaction && !IsError && !IsEnd || !IsSkillLoad && !IsThinking && !IsArtifactUpload && !IsInputMessage && !IsStreamingAgentOutput && !IsStreamingAgentOutputEnd && !IsStreamingThinking && !IsStreamingThinkingEnd && !IsToolInput && !IsToolOutput && !IsToolActivity && IsStructuredOutput && !IsContextLimitExceeded && !IsStepTransitionLimitExceeded && !IsSessionInterrupted && !IsImageRead && !IsStepTransition && !IsContextConsumed && !IsCompactionStarted && !IsCompaction && !IsError && !IsEnd || !IsSkillLoad && !IsThinking && !IsArtifactUpload && !IsInputMessage && !IsStreamingAgentOutput && !IsStreamingAgentOutputEnd && !IsStreamingThinking && !IsStreamingThinkingEnd && !IsToolInput && !IsToolOutput && !IsToolActivity && !IsStructuredOutput && IsContextLimitExceeded && !IsStepTransitionLimitExceeded && !IsSessionInterrupted && !IsImageRead && !IsStepTransition && !IsContextConsumed && !IsCompactionStarted && !IsCompaction && !IsError && !IsEnd || !IsSkillLoad && !IsThinking && !IsArtifactUpload && !IsInputMessage && !IsStreamingAgentOutput && !IsStreamingAgentOutputEnd && !IsStreamingThinking && !IsStreamingThinkingEnd && !IsToolInput && !IsToolOutput && !IsToolActivity && !IsStructuredOutput && !IsContextLimitExceeded && IsStepTransitionLimitExceeded && !IsSessionInterrupted && !IsImageRead && !IsStepTransition && !IsContextConsumed && !IsCompactionStarted && !IsCompaction && !IsError && !IsEnd || !IsSkillLoad && !IsThinking && !IsArtifactUpload && !IsInputMessage && !IsStreamingAgentOutput && !IsStreamingAgentOutputEnd && !IsStreamingThinking && !IsStreamingThinkingEnd && !IsToolInput && !IsToolOutput && !IsToolActivity && !IsStructuredOutput && !IsContextLimitExceeded && !IsStepTransitionLimitExceeded && IsSessionInterrupted && !IsImageRead && !IsStepTransition && !IsContextConsumed && !IsCompactionStarted && !IsCompaction && !IsError && !IsEnd || !IsSkillLoad && !IsThinking && !IsArtifactUpload && !IsInputMessage && !IsStreamingAgentOutput && !IsStreamingAgentOutputEnd && !IsStreamingThinking && !IsStreamingThinkingEnd && !IsToolInput && !IsToolOutput && !IsToolActivity && !IsStructuredOutput && !IsContextLimitExceeded && !IsStepTransitionLimitExceeded && !IsSessionInterrupted && IsImageRead && !IsStepTransition && !IsContextConsumed && !IsCompactionStarted && !IsCompaction && !IsError && !IsEnd || !IsSkillLoad && !IsThinking && !IsArtifactUpload && !IsInputMessage && !IsStreamingAgentOutput && !IsStreamingAgentOutputEnd && !IsStreamingThinking && !IsStreamingThinkingEnd && !IsToolInput && !IsToolOutput && !IsToolActivity && !IsStructuredOutput && !IsContextLimitExceeded && !IsStepTransitionLimitExceeded && !IsSessionInterrupted && !IsImageRead && IsStepTransition && !IsContextConsumed && !IsCompactionStarted && !IsCompaction && !IsError && !IsEnd || !IsSkillLoad && !IsThinking && !IsArtifactUpload && !IsInputMessage && !IsStreamingAgentOutput && !IsStreamingAgentOutputEnd && !IsStreamingThinking && !IsStreamingThinkingEnd && !IsToolInput && !IsToolOutput && !IsToolActivity && !IsStructuredOutput && !IsContextLimitExceeded && !IsStepTransitionLimitExceeded && !IsSessionInterrupted && !IsImageRead && !IsStepTransition && IsContextConsumed && !IsCompactionStarted && !IsCompaction && !IsError && !IsEnd || !IsSkillLoad && !IsThinking && !IsArtifactUpload && !IsInputMessage && !IsStreamingAgentOutput && !IsStreamingAgentOutputEnd && !IsStreamingThinking && !IsStreamingThinkingEnd && !IsToolInput && !IsToolOutput && !IsToolActivity && !IsStructuredOutput && !IsContextLimitExceeded && !IsStepTransitionLimitExceeded && !IsSessionInterrupted && !IsImageRead && !IsStepTransition && !IsContextConsumed && IsCompactionStarted && !IsCompaction && !IsError && !IsEnd || !IsSkillLoad && !IsThinking && !IsArtifactUpload && !IsInputMessage && !IsStreamingAgentOutput && !IsStreamingAgentOutputEnd && !IsStreamingThinking && !IsStreamingThinkingEnd && !IsToolInput && !IsToolOutput && !IsToolActivity && !IsStructuredOutput && !IsContextLimitExceeded && !IsStepTransitionLimitExceeded && !IsSessionInterrupted && !IsImageRead && !IsStepTransition && !IsContextConsumed && !IsCompactionStarted && IsCompaction && !IsError && !IsEnd || !IsSkillLoad && !IsThinking && !IsArtifactUpload && !IsInputMessage && !IsStreamingAgentOutput && !IsStreamingAgentOutputEnd && !IsStreamingThinking && !IsStreamingThinkingEnd && !IsToolInput && !IsToolOutput && !IsToolActivity && !IsStructuredOutput && !IsContextLimitExceeded && !IsStepTransitionLimitExceeded && !IsSessionInterrupted && !IsImageRead && !IsStepTransition && !IsContextConsumed && !IsCompactionStarted && !IsCompaction && IsError && !IsEnd || !IsSkillLoad && !IsThinking && !IsArtifactUpload && !IsInputMessage && !IsStreamingAgentOutput && !IsStreamingAgentOutputEnd && !IsStreamingThinking && !IsStreamingThinkingEnd && !IsToolInput && !IsToolOutput && !IsToolActivity && !IsStructuredOutput && !IsContextLimitExceeded && !IsStepTransitionLimitExceeded && !IsSessionInterrupted && !IsImageRead && !IsStepTransition && !IsContextConsumed && !IsCompactionStarted && !IsCompaction && !IsError && IsEnd; } /// @@ -1415,6 +1479,7 @@ public bool Validate() global::System.Func? streamingThinkingEnd = null, global::System.Func? toolInput = null, global::System.Func? toolOutput = null, + global::System.Func? toolActivity = null, global::System.Func? structuredOutput = null, global::System.Func? contextLimitExceeded = null, global::System.Func? stepTransitionLimitExceeded = null, @@ -1473,6 +1538,10 @@ public bool Validate() { return toolOutput(ToolOutput!); } + else if (IsToolActivity && toolActivity != null) + { + return toolActivity(ToolActivity!); + } else if (IsStructuredOutput && structuredOutput != null) { return structuredOutput(StructuredOutput!); @@ -1545,6 +1614,8 @@ public void Match( global::System.Action? toolOutput = null, + global::System.Action? toolActivity = null, + global::System.Action? structuredOutput = null, global::System.Action? contextLimitExceeded = null, @@ -1613,6 +1684,10 @@ public void Match( { toolOutput?.Invoke(ToolOutput!); } + else if (IsToolActivity) + { + toolActivity?.Invoke(ToolActivity!); + } else if (IsStructuredOutput) { structuredOutput?.Invoke(StructuredOutput!); @@ -1673,6 +1748,7 @@ public void Switch( global::System.Action? streamingThinkingEnd = null, global::System.Action? toolInput = null, global::System.Action? toolOutput = null, + global::System.Action? toolActivity = null, global::System.Action? structuredOutput = null, global::System.Action? contextLimitExceeded = null, global::System.Action? stepTransitionLimitExceeded = null, @@ -1731,6 +1807,10 @@ public void Switch( { toolOutput?.Invoke(ToolOutput!); } + else if (IsToolActivity) + { + toolActivity?.Invoke(ToolActivity!); + } else if (IsStructuredOutput) { structuredOutput?.Invoke(StructuredOutput!); @@ -1804,6 +1884,8 @@ public override int GetHashCode() typeof(global::Vectara.ToolInputEvent), ToolOutput, typeof(global::Vectara.ToolOutputEvent), + ToolActivity, + typeof(global::Vectara.ToolActivityEvent), StructuredOutput, typeof(global::Vectara.StructuredOutputEvent), ContextLimitExceeded, @@ -1852,6 +1934,7 @@ public bool Equals(AgentStreamedResponse other) global::System.Collections.Generic.EqualityComparer.Default.Equals(StreamingThinkingEnd, other.StreamingThinkingEnd) && global::System.Collections.Generic.EqualityComparer.Default.Equals(ToolInput, other.ToolInput) && global::System.Collections.Generic.EqualityComparer.Default.Equals(ToolOutput, other.ToolOutput) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ToolActivity, other.ToolActivity) && global::System.Collections.Generic.EqualityComparer.Default.Equals(StructuredOutput, other.StructuredOutput) && global::System.Collections.Generic.EqualityComparer.Default.Equals(ContextLimitExceeded, other.ContextLimitExceeded) && global::System.Collections.Generic.EqualityComparer.Default.Equals(StepTransitionLimitExceeded, other.StepTransitionLimitExceeded) && diff --git a/src/libs/Vectara/Generated/Vectara.Models.AgentStreamedResponseDiscriminatorType.g.cs b/src/libs/Vectara/Generated/Vectara.Models.AgentStreamedResponseDiscriminatorType.g.cs index 3926b779..4c4992e8 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.AgentStreamedResponseDiscriminatorType.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.AgentStreamedResponseDiscriminatorType.g.cs @@ -87,6 +87,10 @@ public enum AgentStreamedResponseDiscriminatorType /// /// /// + ToolActivity, + /// + /// + /// ToolInput, /// /// @@ -125,6 +129,7 @@ public static string ToValueString(this AgentStreamedResponseDiscriminatorType v AgentStreamedResponseDiscriminatorType.StreamingThinkingEnd => "streaming_thinking_end", AgentStreamedResponseDiscriminatorType.StructuredOutput => "structured_output", AgentStreamedResponseDiscriminatorType.Thinking => "thinking", + AgentStreamedResponseDiscriminatorType.ToolActivity => "tool_activity", AgentStreamedResponseDiscriminatorType.ToolInput => "tool_input", AgentStreamedResponseDiscriminatorType.ToolOutput => "tool_output", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), @@ -156,6 +161,7 @@ public static string ToValueString(this AgentStreamedResponseDiscriminatorType v "streaming_thinking_end" => AgentStreamedResponseDiscriminatorType.StreamingThinkingEnd, "structured_output" => AgentStreamedResponseDiscriminatorType.StructuredOutput, "thinking" => AgentStreamedResponseDiscriminatorType.Thinking, + "tool_activity" => AgentStreamedResponseDiscriminatorType.ToolActivity, "tool_input" => AgentStreamedResponseDiscriminatorType.ToolInput, "tool_output" => AgentStreamedResponseDiscriminatorType.ToolOutput, _ => null, diff --git a/src/libs/Vectara/Generated/Vectara.Models.CreateVertexAILLMRequest.g.cs b/src/libs/Vectara/Generated/Vectara.Models.CreateVertexAILLMRequest.g.cs index 5a386c67..17573420 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.CreateVertexAILLMRequest.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.CreateVertexAILLMRequest.g.cs @@ -57,6 +57,12 @@ public sealed partial class CreateVertexAILLMRequest [global::System.Text.Json.Serialization.JsonRequired] public required global::Vectara.VertexAiAuth Auth { get; set; } + /// + /// Additional HTTP headers to include with requests to the Gemini API. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("headers")] + public global::System.Collections.Generic.Dictionary? Headers { get; set; } + /// /// Maximum time in seconds the platform will wait for the model to send data before considering the connection stale and terminating it. For example, this is used as the SSE idle timeout during streaming — if no new server-sent events arrive within this window the stream is closed with an error. If unset, the platform falls back to its default read timeout for that provider (typically 60 seconds for OpenAI / Anthropic; provider SDK default for Vertex). On update, omit the field to leave the configured value unchanged or send an explicit null to clear it.
/// Example: 300 @@ -109,6 +115,9 @@ public sealed partial class CreateVertexAILLMRequest /// /// Description of the LLM. /// + /// + /// Additional HTTP headers to include with requests to the Gemini API. + /// /// /// Maximum time in seconds the platform will wait for the model to send data before considering the connection stale and terminating it. For example, this is used as the SSE idle timeout during streaming — if no new server-sent events arrive within this window the stream is closed with an error. If unset, the platform falls back to its default read timeout for that provider (typically 60 seconds for OpenAI / Anthropic; provider SDK default for Vertex). On update, omit the field to leave the configured value unchanged or send an explicit null to clear it.
/// Example: 300 @@ -129,6 +138,7 @@ public CreateVertexAILLMRequest( string uri, global::Vectara.VertexAiAuth auth, string? description, + global::System.Collections.Generic.Dictionary? headers, int? idleTimeoutSeconds, object? testModelParameters, global::Vectara.LLMCapabilities? capabilities) @@ -139,6 +149,7 @@ public CreateVertexAILLMRequest( this.Model = model ?? throw new global::System.ArgumentNullException(nameof(model)); this.Uri = uri ?? throw new global::System.ArgumentNullException(nameof(uri)); this.Auth = auth; + this.Headers = headers; this.IdleTimeoutSeconds = idleTimeoutSeconds; this.TestModelParameters = testModelParameters; this.Capabilities = capabilities; diff --git a/src/libs/Vectara/Generated/Vectara.Models.CreateVertexAILLMRequestHeaders.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.CreateVertexAILLMRequestHeaders.Json.g.cs new file mode 100644 index 00000000..5abe6095 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.CreateVertexAILLMRequestHeaders.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public sealed partial class CreateVertexAILLMRequestHeaders + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Vectara.CreateVertexAILLMRequestHeaders? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.CreateVertexAILLMRequestHeaders), + jsonSerializerContext) as global::Vectara.CreateVertexAILLMRequestHeaders; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Vectara.CreateVertexAILLMRequestHeaders? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Vectara.CreateVertexAILLMRequestHeaders), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.CreateVertexAILLMRequestHeaders; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.CreateVertexAILLMRequestHeaders.g.cs b/src/libs/Vectara/Generated/Vectara.Models.CreateVertexAILLMRequestHeaders.g.cs new file mode 100644 index 00000000..f97c72a9 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.CreateVertexAILLMRequestHeaders.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// Additional HTTP headers to include with requests to the Gemini API. + /// + public sealed partial class CreateVertexAILLMRequestHeaders + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.GenericToolActivityEvent.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.GenericToolActivityEvent.Json.g.cs new file mode 100644 index 00000000..a4ab78ee --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.GenericToolActivityEvent.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public readonly partial struct GenericToolActivityEvent + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Vectara.GenericToolActivityEvent? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.GenericToolActivityEvent), + jsonSerializerContext) as global::Vectara.GenericToolActivityEvent?; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Vectara.GenericToolActivityEvent? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Vectara.GenericToolActivityEvent), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.GenericToolActivityEvent?; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.GenericToolActivityEvent.g.cs b/src/libs/Vectara/Generated/Vectara.Models.GenericToolActivityEvent.g.cs new file mode 100644 index 00000000..193f0825 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.GenericToolActivityEvent.g.cs @@ -0,0 +1,295 @@ +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace Vectara +{ + /// + /// A free-form progress update from a tool. The only payload is a human-readable message. + /// + public readonly partial struct GenericToolActivityEvent : global::System.IEquatable + { + /// + /// Base properties shared by all tool activity event types. + /// +#if NET6_0_OR_GREATER + public global::Vectara.ToolActivityEventBase? Base { get; init; } +#else + public global::Vectara.ToolActivityEventBase? Base { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Base))] +#endif + public bool IsBase => Base != null; + + /// + /// + /// + public bool TryPickBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.ToolActivityEventBase? value) + { + value = Base; + return IsBase; + } + + /// + /// + /// + public global::Vectara.ToolActivityEventBase PickBase() => IsBase + ? Base! + : throw new global::System.InvalidOperationException($"Expected union variant 'Base' but the value was {ToString()}."); + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::Vectara.GenericToolActivityEventVariant2? GenericToolActivityEventVariant2 { get; init; } +#else + public global::Vectara.GenericToolActivityEventVariant2? GenericToolActivityEventVariant2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(GenericToolActivityEventVariant2))] +#endif + public bool IsGenericToolActivityEventVariant2 => GenericToolActivityEventVariant2 != null; + + /// + /// + /// + public bool TryPickGenericToolActivityEventVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.GenericToolActivityEventVariant2? value) + { + value = GenericToolActivityEventVariant2; + return IsGenericToolActivityEventVariant2; + } + + /// + /// + /// + public global::Vectara.GenericToolActivityEventVariant2 PickGenericToolActivityEventVariant2() => IsGenericToolActivityEventVariant2 + ? GenericToolActivityEventVariant2! + : throw new global::System.InvalidOperationException($"Expected union variant 'GenericToolActivityEventVariant2' but the value was {ToString()}."); + /// + /// + /// + public static implicit operator GenericToolActivityEvent(global::Vectara.ToolActivityEventBase value) => new GenericToolActivityEvent((global::Vectara.ToolActivityEventBase?)value); + + /// + /// + /// + public static implicit operator global::Vectara.ToolActivityEventBase?(GenericToolActivityEvent @this) => @this.Base; + + /// + /// + /// + public GenericToolActivityEvent(global::Vectara.ToolActivityEventBase? value) + { + Base = value; + } + + /// + /// + /// + public static GenericToolActivityEvent FromBase(global::Vectara.ToolActivityEventBase? value) => new GenericToolActivityEvent(value); + + /// + /// + /// + public static implicit operator GenericToolActivityEvent(global::Vectara.GenericToolActivityEventVariant2 value) => new GenericToolActivityEvent((global::Vectara.GenericToolActivityEventVariant2?)value); + + /// + /// + /// + public static implicit operator global::Vectara.GenericToolActivityEventVariant2?(GenericToolActivityEvent @this) => @this.GenericToolActivityEventVariant2; + + /// + /// + /// + public GenericToolActivityEvent(global::Vectara.GenericToolActivityEventVariant2? value) + { + GenericToolActivityEventVariant2 = value; + } + + /// + /// + /// + public static GenericToolActivityEvent FromGenericToolActivityEventVariant2(global::Vectara.GenericToolActivityEventVariant2? value) => new GenericToolActivityEvent(value); + + /// + /// + /// + public GenericToolActivityEvent( + global::Vectara.ToolActivityEventBase? @base, + global::Vectara.GenericToolActivityEventVariant2? genericToolActivityEventVariant2 + ) + { + Base = @base; + GenericToolActivityEventVariant2 = genericToolActivityEventVariant2; + } + + /// + /// + /// + public object? Object => + GenericToolActivityEventVariant2 as object ?? + Base as object + ; + + /// + /// + /// + public override string? ToString() => + Base?.ToString() ?? + GenericToolActivityEventVariant2?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsBase && IsGenericToolActivityEventVariant2; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? @base = null, + global::System.Func? genericToolActivityEventVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsBase && @base != null) + { + return @base(Base!); + } + else if (IsGenericToolActivityEventVariant2 && genericToolActivityEventVariant2 != null) + { + return genericToolActivityEventVariant2(GenericToolActivityEventVariant2!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? @base = null, + + global::System.Action? genericToolActivityEventVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsBase) + { + @base?.Invoke(Base!); + } + else if (IsGenericToolActivityEventVariant2) + { + genericToolActivityEventVariant2?.Invoke(GenericToolActivityEventVariant2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? @base = null, + global::System.Action? genericToolActivityEventVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsBase) + { + @base?.Invoke(Base!); + } + else if (IsGenericToolActivityEventVariant2) + { + genericToolActivityEventVariant2?.Invoke(GenericToolActivityEventVariant2!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Base, + typeof(global::Vectara.ToolActivityEventBase), + GenericToolActivityEventVariant2, + typeof(global::Vectara.GenericToolActivityEventVariant2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + + return global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(GenericToolActivityEvent other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Base, other.Base) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(GenericToolActivityEventVariant2, other.GenericToolActivityEventVariant2) + ; + } + + /// + /// + /// + public static bool operator ==(GenericToolActivityEvent obj1, GenericToolActivityEvent obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(GenericToolActivityEvent obj1, GenericToolActivityEvent obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is GenericToolActivityEvent o && Equals(o); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.GenericToolActivityEventVariant2.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.GenericToolActivityEventVariant2.Json.g.cs new file mode 100644 index 00000000..0ad626df --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.GenericToolActivityEventVariant2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public sealed partial class GenericToolActivityEventVariant2 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Vectara.GenericToolActivityEventVariant2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.GenericToolActivityEventVariant2), + jsonSerializerContext) as global::Vectara.GenericToolActivityEventVariant2; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Vectara.GenericToolActivityEventVariant2? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Vectara.GenericToolActivityEventVariant2), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.GenericToolActivityEventVariant2; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.GenericToolActivityEventVariant2.g.cs b/src/libs/Vectara/Generated/Vectara.Models.GenericToolActivityEventVariant2.g.cs new file mode 100644 index 00000000..43177eea --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.GenericToolActivityEventVariant2.g.cs @@ -0,0 +1,68 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// + /// + public sealed partial class GenericToolActivityEventVariant2 + { + /// + /// Discriminator for ToolActivityEvent subtypes.
+ /// Default Value: generic
+ /// Example: generic + ///
+ /// "generic" + /// generic + [global::System.Text.Json.Serialization.JsonPropertyName("activity_type")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ActivityType { get; set; } = "generic"; + + /// + /// Human-readable progress update. Safe to render directly to the user.
+ /// Example: Sub-agent finished step 2 of 5 + ///
+ /// Sub-agent finished step 2 of 5 + [global::System.Text.Json.Serialization.JsonPropertyName("message")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Message { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Discriminator for ToolActivityEvent subtypes.
+ /// Default Value: generic
+ /// Example: generic + /// + /// + /// Human-readable progress update. Safe to render directly to the user.
+ /// Example: Sub-agent finished step 2 of 5 + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public GenericToolActivityEventVariant2( + string activityType, + string message) + { + this.ActivityType = activityType ?? throw new global::System.ArgumentNullException(nameof(activityType)); + this.Message = message ?? throw new global::System.ArgumentNullException(nameof(message)); + } + + /// + /// Initializes a new instance of the class. + /// + public GenericToolActivityEventVariant2() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.ListPipelinesSourceType.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ListPipelinesSourceType.g.cs index 441bed01..053c8b35 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.ListPipelinesSourceType.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.ListPipelinesSourceType.g.cs @@ -16,6 +16,10 @@ public enum ListPipelinesSourceType /// ///
Sharepoint, + /// + /// + /// + Web, } /// @@ -32,6 +36,7 @@ public static string ToValueString(this ListPipelinesSourceType value) { ListPipelinesSourceType.S3 => "s3", ListPipelinesSourceType.Sharepoint => "sharepoint", + ListPipelinesSourceType.Web => "web", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } @@ -44,6 +49,7 @@ public static string ToValueString(this ListPipelinesSourceType value) { "s3" => ListPipelinesSourceType.S3, "sharepoint" => ListPipelinesSourceType.Sharepoint, + "web" => ListPipelinesSourceType.Web, _ => null, }; } diff --git a/src/libs/Vectara/Generated/Vectara.Models.SubAgentToolActivityEvent.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.SubAgentToolActivityEvent.Json.g.cs new file mode 100644 index 00000000..6de03280 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.SubAgentToolActivityEvent.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public readonly partial struct SubAgentToolActivityEvent + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Vectara.SubAgentToolActivityEvent? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.SubAgentToolActivityEvent), + jsonSerializerContext) as global::Vectara.SubAgentToolActivityEvent?; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Vectara.SubAgentToolActivityEvent? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Vectara.SubAgentToolActivityEvent), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.SubAgentToolActivityEvent?; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.SubAgentToolActivityEvent.g.cs b/src/libs/Vectara/Generated/Vectara.Models.SubAgentToolActivityEvent.g.cs new file mode 100644 index 00000000..fae5c8e0 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.SubAgentToolActivityEvent.g.cs @@ -0,0 +1,295 @@ +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace Vectara +{ + /// + /// A relayed event from a sub-agent's inner execution stream, emitted by the sub_agent tool while it runs. + /// + public readonly partial struct SubAgentToolActivityEvent : global::System.IEquatable + { + /// + /// Base properties shared by all tool activity event types. + /// +#if NET6_0_OR_GREATER + public global::Vectara.ToolActivityEventBase? Base { get; init; } +#else + public global::Vectara.ToolActivityEventBase? Base { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Base))] +#endif + public bool IsBase => Base != null; + + /// + /// + /// + public bool TryPickBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.ToolActivityEventBase? value) + { + value = Base; + return IsBase; + } + + /// + /// + /// + public global::Vectara.ToolActivityEventBase PickBase() => IsBase + ? Base! + : throw new global::System.InvalidOperationException($"Expected union variant 'Base' but the value was {ToString()}."); + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::Vectara.SubAgentToolActivityEventVariant2? SubAgentToolActivityEventVariant2 { get; init; } +#else + public global::Vectara.SubAgentToolActivityEventVariant2? SubAgentToolActivityEventVariant2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(SubAgentToolActivityEventVariant2))] +#endif + public bool IsSubAgentToolActivityEventVariant2 => SubAgentToolActivityEventVariant2 != null; + + /// + /// + /// + public bool TryPickSubAgentToolActivityEventVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.SubAgentToolActivityEventVariant2? value) + { + value = SubAgentToolActivityEventVariant2; + return IsSubAgentToolActivityEventVariant2; + } + + /// + /// + /// + public global::Vectara.SubAgentToolActivityEventVariant2 PickSubAgentToolActivityEventVariant2() => IsSubAgentToolActivityEventVariant2 + ? SubAgentToolActivityEventVariant2! + : throw new global::System.InvalidOperationException($"Expected union variant 'SubAgentToolActivityEventVariant2' but the value was {ToString()}."); + /// + /// + /// + public static implicit operator SubAgentToolActivityEvent(global::Vectara.ToolActivityEventBase value) => new SubAgentToolActivityEvent((global::Vectara.ToolActivityEventBase?)value); + + /// + /// + /// + public static implicit operator global::Vectara.ToolActivityEventBase?(SubAgentToolActivityEvent @this) => @this.Base; + + /// + /// + /// + public SubAgentToolActivityEvent(global::Vectara.ToolActivityEventBase? value) + { + Base = value; + } + + /// + /// + /// + public static SubAgentToolActivityEvent FromBase(global::Vectara.ToolActivityEventBase? value) => new SubAgentToolActivityEvent(value); + + /// + /// + /// + public static implicit operator SubAgentToolActivityEvent(global::Vectara.SubAgentToolActivityEventVariant2 value) => new SubAgentToolActivityEvent((global::Vectara.SubAgentToolActivityEventVariant2?)value); + + /// + /// + /// + public static implicit operator global::Vectara.SubAgentToolActivityEventVariant2?(SubAgentToolActivityEvent @this) => @this.SubAgentToolActivityEventVariant2; + + /// + /// + /// + public SubAgentToolActivityEvent(global::Vectara.SubAgentToolActivityEventVariant2? value) + { + SubAgentToolActivityEventVariant2 = value; + } + + /// + /// + /// + public static SubAgentToolActivityEvent FromSubAgentToolActivityEventVariant2(global::Vectara.SubAgentToolActivityEventVariant2? value) => new SubAgentToolActivityEvent(value); + + /// + /// + /// + public SubAgentToolActivityEvent( + global::Vectara.ToolActivityEventBase? @base, + global::Vectara.SubAgentToolActivityEventVariant2? subAgentToolActivityEventVariant2 + ) + { + Base = @base; + SubAgentToolActivityEventVariant2 = subAgentToolActivityEventVariant2; + } + + /// + /// + /// + public object? Object => + SubAgentToolActivityEventVariant2 as object ?? + Base as object + ; + + /// + /// + /// + public override string? ToString() => + Base?.ToString() ?? + SubAgentToolActivityEventVariant2?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsBase && IsSubAgentToolActivityEventVariant2; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? @base = null, + global::System.Func? subAgentToolActivityEventVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsBase && @base != null) + { + return @base(Base!); + } + else if (IsSubAgentToolActivityEventVariant2 && subAgentToolActivityEventVariant2 != null) + { + return subAgentToolActivityEventVariant2(SubAgentToolActivityEventVariant2!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? @base = null, + + global::System.Action? subAgentToolActivityEventVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsBase) + { + @base?.Invoke(Base!); + } + else if (IsSubAgentToolActivityEventVariant2) + { + subAgentToolActivityEventVariant2?.Invoke(SubAgentToolActivityEventVariant2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? @base = null, + global::System.Action? subAgentToolActivityEventVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsBase) + { + @base?.Invoke(Base!); + } + else if (IsSubAgentToolActivityEventVariant2) + { + subAgentToolActivityEventVariant2?.Invoke(SubAgentToolActivityEventVariant2!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Base, + typeof(global::Vectara.ToolActivityEventBase), + SubAgentToolActivityEventVariant2, + typeof(global::Vectara.SubAgentToolActivityEventVariant2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + + return global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(SubAgentToolActivityEvent other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Base, other.Base) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(SubAgentToolActivityEventVariant2, other.SubAgentToolActivityEventVariant2) + ; + } + + /// + /// + /// + public static bool operator ==(SubAgentToolActivityEvent obj1, SubAgentToolActivityEvent obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(SubAgentToolActivityEvent obj1, SubAgentToolActivityEvent obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is SubAgentToolActivityEvent o && Equals(o); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.SubAgentToolActivityEventVariant2.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.SubAgentToolActivityEventVariant2.Json.g.cs new file mode 100644 index 00000000..d10013d1 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.SubAgentToolActivityEventVariant2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public sealed partial class SubAgentToolActivityEventVariant2 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Vectara.SubAgentToolActivityEventVariant2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.SubAgentToolActivityEventVariant2), + jsonSerializerContext) as global::Vectara.SubAgentToolActivityEventVariant2; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Vectara.SubAgentToolActivityEventVariant2? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Vectara.SubAgentToolActivityEventVariant2), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.SubAgentToolActivityEventVariant2; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.SubAgentToolActivityEventVariant2.g.cs b/src/libs/Vectara/Generated/Vectara.Models.SubAgentToolActivityEventVariant2.g.cs new file mode 100644 index 00000000..ba191fea --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.SubAgentToolActivityEventVariant2.g.cs @@ -0,0 +1,66 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// + /// + public sealed partial class SubAgentToolActivityEventVariant2 + { + /// + /// Discriminator for ToolActivityEvent subtypes.
+ /// Default Value: sub_agent
+ /// Example: sub_agent + ///
+ /// "sub_agent" + /// sub_agent + [global::System.Text.Json.Serialization.JsonPropertyName("activity_type")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ActivityType { get; set; } = "sub_agent"; + + /// + /// An event in an agent session conversation. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("agent_event")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Vectara.JsonConverters.AgentEventJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Vectara.AgentEvent AgentEvent { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Discriminator for ToolActivityEvent subtypes.
+ /// Default Value: sub_agent
+ /// Example: sub_agent + /// + /// + /// An event in an agent session conversation. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public SubAgentToolActivityEventVariant2( + string activityType, + global::Vectara.AgentEvent agentEvent) + { + this.ActivityType = activityType ?? throw new global::System.ArgumentNullException(nameof(activityType)); + this.AgentEvent = agentEvent; + } + + /// + /// Initializes a new instance of the class. + /// + public SubAgentToolActivityEventVariant2() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.ToolActivityEvent.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ToolActivityEvent.Json.g.cs new file mode 100644 index 00000000..4d66bc05 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.ToolActivityEvent.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public readonly partial struct ToolActivityEvent + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Vectara.ToolActivityEvent? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.ToolActivityEvent), + jsonSerializerContext) as global::Vectara.ToolActivityEvent?; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Vectara.ToolActivityEvent? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Vectara.ToolActivityEvent), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.ToolActivityEvent?; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.ToolActivityEvent.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ToolActivityEvent.g.cs new file mode 100644 index 00000000..bc370320 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.ToolActivityEvent.g.cs @@ -0,0 +1,303 @@ +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace Vectara +{ + /// + /// A sideband event emitted by a tool during its execution (streaming only, not stored). Always falls between the tool's tool_input and tool_output events for the same tool_call_id. Polymorphic on `activity_type` — see GenericToolActivityEvent (free-form text) and SubAgentToolActivityEvent (relayed inner AgentEvent). + /// + public readonly partial struct ToolActivityEvent : global::System.IEquatable + { + /// + /// + /// + public global::Vectara.ToolActivityEventDiscriminatorActivityType? ActivityType { get; } + + /// + /// A free-form progress update from a tool. The only payload is a human-readable message. + /// +#if NET6_0_OR_GREATER + public global::Vectara.GenericToolActivityEvent? Generic { get; init; } +#else + public global::Vectara.GenericToolActivityEvent? Generic { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Generic))] +#endif + public bool IsGeneric => Generic != null; + + /// + /// + /// + public bool TryPickGeneric( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.GenericToolActivityEvent? value) + { + value = Generic; + return IsGeneric; + } + + /// + /// + /// + public global::Vectara.GenericToolActivityEvent PickGeneric() => IsGeneric + ? Generic!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'Generic' but the value was {ToString()}."); + + /// + /// A relayed event from a sub-agent's inner execution stream, emitted by the sub_agent tool while it runs. + /// +#if NET6_0_OR_GREATER + public global::Vectara.SubAgentToolActivityEvent? SubAgent { get; init; } +#else + public global::Vectara.SubAgentToolActivityEvent? SubAgent { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(SubAgent))] +#endif + public bool IsSubAgent => SubAgent != null; + + /// + /// + /// + public bool TryPickSubAgent( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.SubAgentToolActivityEvent? value) + { + value = SubAgent; + return IsSubAgent; + } + + /// + /// + /// + public global::Vectara.SubAgentToolActivityEvent PickSubAgent() => IsSubAgent + ? SubAgent!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'SubAgent' but the value was {ToString()}."); + /// + /// + /// + public static implicit operator ToolActivityEvent(global::Vectara.GenericToolActivityEvent value) => new ToolActivityEvent((global::Vectara.GenericToolActivityEvent?)value); + + /// + /// + /// + public static implicit operator global::Vectara.GenericToolActivityEvent?(ToolActivityEvent @this) => @this.Generic; + + /// + /// + /// + public ToolActivityEvent(global::Vectara.GenericToolActivityEvent? value) + { + Generic = value; + } + + /// + /// + /// + public static ToolActivityEvent FromGeneric(global::Vectara.GenericToolActivityEvent? value) => new ToolActivityEvent(value); + + /// + /// + /// + public static implicit operator ToolActivityEvent(global::Vectara.SubAgentToolActivityEvent value) => new ToolActivityEvent((global::Vectara.SubAgentToolActivityEvent?)value); + + /// + /// + /// + public static implicit operator global::Vectara.SubAgentToolActivityEvent?(ToolActivityEvent @this) => @this.SubAgent; + + /// + /// + /// + public ToolActivityEvent(global::Vectara.SubAgentToolActivityEvent? value) + { + SubAgent = value; + } + + /// + /// + /// + public static ToolActivityEvent FromSubAgent(global::Vectara.SubAgentToolActivityEvent? value) => new ToolActivityEvent(value); + + /// + /// + /// + public ToolActivityEvent( + global::Vectara.ToolActivityEventDiscriminatorActivityType? activityType, + global::Vectara.GenericToolActivityEvent? generic, + global::Vectara.SubAgentToolActivityEvent? subAgent + ) + { + ActivityType = activityType; + + Generic = generic; + SubAgent = subAgent; + } + + /// + /// + /// + public object? Object => + SubAgent as object ?? + Generic as object + ; + + /// + /// + /// + public override string? ToString() => + Generic?.ToString() ?? + SubAgent?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsGeneric && !IsSubAgent || !IsGeneric && IsSubAgent; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? generic = null, + global::System.Func? subAgent = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsGeneric && generic != null) + { + return generic(Generic!); + } + else if (IsSubAgent && subAgent != null) + { + return subAgent(SubAgent!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? generic = null, + + global::System.Action? subAgent = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsGeneric) + { + generic?.Invoke(Generic!); + } + else if (IsSubAgent) + { + subAgent?.Invoke(SubAgent!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? generic = null, + global::System.Action? subAgent = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsGeneric) + { + generic?.Invoke(Generic!); + } + else if (IsSubAgent) + { + subAgent?.Invoke(SubAgent!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Generic, + typeof(global::Vectara.GenericToolActivityEvent), + SubAgent, + typeof(global::Vectara.SubAgentToolActivityEvent), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + + return global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(ToolActivityEvent other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Generic, other.Generic) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(SubAgent, other.SubAgent) + ; + } + + /// + /// + /// + public static bool operator ==(ToolActivityEvent obj1, ToolActivityEvent obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(ToolActivityEvent obj1, ToolActivityEvent obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is ToolActivityEvent o && Equals(o); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.ToolActivityEventBase.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ToolActivityEventBase.Json.g.cs new file mode 100644 index 00000000..98819247 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.ToolActivityEventBase.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public sealed partial class ToolActivityEventBase + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Vectara.ToolActivityEventBase? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.ToolActivityEventBase), + jsonSerializerContext) as global::Vectara.ToolActivityEventBase; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Vectara.ToolActivityEventBase? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Vectara.ToolActivityEventBase), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.ToolActivityEventBase; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.ToolActivityEventBase.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ToolActivityEventBase.g.cs new file mode 100644 index 00000000..351f13ff --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.ToolActivityEventBase.g.cs @@ -0,0 +1,105 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// Base properties shared by all tool activity event types. + /// + public sealed partial class ToolActivityEventBase + { + /// + /// The type of streaming event.
+ /// Default Value: tool_activity
+ /// Example: tool_activity + ///
+ /// "tool_activity" + /// tool_activity + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Type { get; set; } = "tool_activity"; + + /// + /// The tool_call_id of the tool invocation this activity belongs to. Matches tool_input/tool_output.
+ /// Example: call_tool_search_001 + ///
+ /// call_tool_search_001 + [global::System.Text.Json.Serialization.JsonPropertyName("tool_call_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ToolCallId { get; set; } + + /// + /// The name of the tool configuration emitting the activity. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("tool_configuration_name")] + public string? ToolConfigurationName { get; set; } + + /// + /// Name of the tool emitting the activity. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("tool_name")] + public string? ToolName { get; set; } + + /// + /// Timestamp when the event was created.
+ /// Example: 2024-01-15T10:35:00Z + ///
+ /// 2024-01-15T10:35:00Z + [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTime CreatedAt { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The type of streaming event.
+ /// Default Value: tool_activity
+ /// Example: tool_activity + /// + /// + /// The tool_call_id of the tool invocation this activity belongs to. Matches tool_input/tool_output.
+ /// Example: call_tool_search_001 + /// + /// + /// Timestamp when the event was created.
+ /// Example: 2024-01-15T10:35:00Z + /// + /// + /// The name of the tool configuration emitting the activity. + /// + /// + /// Name of the tool emitting the activity. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ToolActivityEventBase( + string type, + string toolCallId, + global::System.DateTime createdAt, + string? toolConfigurationName, + string? toolName) + { + this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); + this.ToolCallId = toolCallId ?? throw new global::System.ArgumentNullException(nameof(toolCallId)); + this.ToolConfigurationName = toolConfigurationName; + this.ToolName = toolName; + this.CreatedAt = createdAt; + } + + /// + /// Initializes a new instance of the class. + /// + public ToolActivityEventBase() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.ToolActivityEventDiscriminator.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ToolActivityEventDiscriminator.Json.g.cs new file mode 100644 index 00000000..060ece37 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.ToolActivityEventDiscriminator.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public sealed partial class ToolActivityEventDiscriminator + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Vectara.ToolActivityEventDiscriminator? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.ToolActivityEventDiscriminator), + jsonSerializerContext) as global::Vectara.ToolActivityEventDiscriminator; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Vectara.ToolActivityEventDiscriminator? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Vectara.ToolActivityEventDiscriminator), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.ToolActivityEventDiscriminator; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.ToolActivityEventDiscriminator.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ToolActivityEventDiscriminator.g.cs new file mode 100644 index 00000000..fd067611 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.ToolActivityEventDiscriminator.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// + /// + public sealed partial class ToolActivityEventDiscriminator + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("activity_type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Vectara.JsonConverters.ToolActivityEventDiscriminatorActivityTypeJsonConverter))] + public global::Vectara.ToolActivityEventDiscriminatorActivityType? ActivityType { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ToolActivityEventDiscriminator( + global::Vectara.ToolActivityEventDiscriminatorActivityType? activityType) + { + this.ActivityType = activityType; + } + + /// + /// Initializes a new instance of the class. + /// + public ToolActivityEventDiscriminator() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.ToolActivityEventDiscriminatorActivityType.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ToolActivityEventDiscriminatorActivityType.g.cs new file mode 100644 index 00000000..8caf555e --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.ToolActivityEventDiscriminatorActivityType.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// + /// + public enum ToolActivityEventDiscriminatorActivityType + { + /// + /// + /// + Generic, + /// + /// + /// + SubAgent, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ToolActivityEventDiscriminatorActivityTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ToolActivityEventDiscriminatorActivityType value) + { + return value switch + { + ToolActivityEventDiscriminatorActivityType.Generic => "generic", + ToolActivityEventDiscriminatorActivityType.SubAgent => "sub_agent", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ToolActivityEventDiscriminatorActivityType? ToEnum(string value) + { + return value switch + { + "generic" => ToolActivityEventDiscriminatorActivityType.Generic, + "sub_agent" => ToolActivityEventDiscriminatorActivityType.SubAgent, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.UpdateVertexAILLMRequest.g.cs b/src/libs/Vectara/Generated/Vectara.Models.UpdateVertexAILLMRequest.g.cs index 280d2be5..4588d51c 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.UpdateVertexAILLMRequest.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.UpdateVertexAILLMRequest.g.cs @@ -41,6 +41,12 @@ public sealed partial class UpdateVertexAILLMRequest [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Vectara.JsonConverters.VertexAiAuthJsonConverter))] public global::Vectara.VertexAiAuth? Auth { get; set; } + /// + /// Additional HTTP headers to include with requests to the Gemini API. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("headers")] + public global::System.Collections.Generic.Dictionary? Headers { get; set; } + /// /// Maximum time in seconds the platform will wait for the model to send data before considering the connection stale and terminating it. For example, this is used as the SSE idle timeout during streaming — if no new server-sent events arrive within this window the stream is closed with an error. If unset, the platform falls back to its default read timeout for that provider (typically 60 seconds for OpenAI / Anthropic; provider SDK default for Vertex). On update, omit the field to leave the configured value unchanged or send an explicit null to clear it.
/// Example: 300 @@ -93,6 +99,9 @@ public sealed partial class UpdateVertexAILLMRequest /// /// Authentication configuration for Vertex AI /// + /// + /// Additional HTTP headers to include with requests to the Gemini API. + /// /// /// Maximum time in seconds the platform will wait for the model to send data before considering the connection stale and terminating it. For example, this is used as the SSE idle timeout during streaming — if no new server-sent events arrive within this window the stream is closed with an error. If unset, the platform falls back to its default read timeout for that provider (typically 60 seconds for OpenAI / Anthropic; provider SDK default for Vertex). On update, omit the field to leave the configured value unchanged or send an explicit null to clear it.
/// Example: 300 @@ -115,6 +124,7 @@ public UpdateVertexAILLMRequest( string? uri, string? description, global::Vectara.VertexAiAuth? auth, + global::System.Collections.Generic.Dictionary? headers, int? idleTimeoutSeconds, bool? enabled, object? testModelParameters, @@ -125,6 +135,7 @@ public UpdateVertexAILLMRequest( this.Uri = uri; this.Description = description; this.Auth = auth; + this.Headers = headers; this.IdleTimeoutSeconds = idleTimeoutSeconds; this.Enabled = enabled; this.TestModelParameters = testModelParameters; diff --git a/src/libs/Vectara/Generated/Vectara.Models.UpdateVertexAILLMRequestHeaders.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.UpdateVertexAILLMRequestHeaders.Json.g.cs new file mode 100644 index 00000000..b74dab26 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.UpdateVertexAILLMRequestHeaders.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public sealed partial class UpdateVertexAILLMRequestHeaders + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Vectara.UpdateVertexAILLMRequestHeaders? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.UpdateVertexAILLMRequestHeaders), + jsonSerializerContext) as global::Vectara.UpdateVertexAILLMRequestHeaders; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Vectara.UpdateVertexAILLMRequestHeaders? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Vectara.UpdateVertexAILLMRequestHeaders), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.UpdateVertexAILLMRequestHeaders; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.UpdateVertexAILLMRequestHeaders.g.cs b/src/libs/Vectara/Generated/Vectara.Models.UpdateVertexAILLMRequestHeaders.g.cs new file mode 100644 index 00000000..f44f36e4 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.UpdateVertexAILLMRequestHeaders.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// Additional HTTP headers to include with requests to the Gemini API. + /// + public sealed partial class UpdateVertexAILLMRequestHeaders + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.PipelineDeadLetterEntriesClient.Create.g.cs b/src/libs/Vectara/Generated/Vectara.PipelineDeadLetterEntriesClient.Create.g.cs index c7408f8b..e625974b 100644 --- a/src/libs/Vectara/Generated/Vectara.PipelineDeadLetterEntriesClient.Create.g.cs +++ b/src/libs/Vectara/Generated/Vectara.PipelineDeadLetterEntriesClient.Create.g.cs @@ -424,18 +424,17 @@ partial void ProcessCreateResponseContent( __exception_400 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Permissions do not allow creating dead letters for this pipeline. if ((int)__response.StatusCode == 403) @@ -462,18 +461,17 @@ partial void ProcessCreateResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Pipeline not found. if ((int)__response.StatusCode == 404) @@ -500,18 +498,17 @@ partial void ProcessCreateResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // A dead letter for this source record already exists and is being retried. if ((int)__response.StatusCode == 409) @@ -538,18 +535,17 @@ partial void ProcessCreateResponseContent( __exception_409 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_409 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_409, - statusCode: __response.StatusCode) - { - ResponseBody = __content_409, - ResponseObject = __value_409, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_409, + responseObject: __value_409, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -583,17 +579,15 @@ partial void ProcessCreateResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -630,17 +624,15 @@ partial void ProcessCreateResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.PipelineDeadLetterEntriesClient.Delete.g.cs b/src/libs/Vectara/Generated/Vectara.PipelineDeadLetterEntriesClient.Delete.g.cs index 70da8ba8..2fb055aa 100644 --- a/src/libs/Vectara/Generated/Vectara.PipelineDeadLetterEntriesClient.Delete.g.cs +++ b/src/libs/Vectara/Generated/Vectara.PipelineDeadLetterEntriesClient.Delete.g.cs @@ -406,18 +406,17 @@ await DeleteAsResponseAsync( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Pipeline or dead letter not found. if ((int)__response.StatusCode == 404) @@ -444,18 +443,17 @@ await DeleteAsResponseAsync( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -482,17 +480,15 @@ await DeleteAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -520,17 +516,15 @@ await DeleteAsResponseAsync( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.PipelineDeadLetterEntriesClient.Get.g.cs b/src/libs/Vectara/Generated/Vectara.PipelineDeadLetterEntriesClient.Get.g.cs index 9ccd2bae..4b0e8c78 100644 --- a/src/libs/Vectara/Generated/Vectara.PipelineDeadLetterEntriesClient.Get.g.cs +++ b/src/libs/Vectara/Generated/Vectara.PipelineDeadLetterEntriesClient.Get.g.cs @@ -413,18 +413,17 @@ partial void ProcessGetResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Pipeline or dead letter not found. if ((int)__response.StatusCode == 404) @@ -451,18 +450,17 @@ partial void ProcessGetResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -496,17 +494,15 @@ partial void ProcessGetResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 +539,15 @@ partial void ProcessGetResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.PipelineDeadLetterEntriesClient.List.g.cs b/src/libs/Vectara/Generated/Vectara.PipelineDeadLetterEntriesClient.List.g.cs index f4477fe2..53d4479f 100644 --- a/src/libs/Vectara/Generated/Vectara.PipelineDeadLetterEntriesClient.List.g.cs +++ b/src/libs/Vectara/Generated/Vectara.PipelineDeadLetterEntriesClient.List.g.cs @@ -484,18 +484,17 @@ partial void ProcessListResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Pipeline not found. if ((int)__response.StatusCode == 404) @@ -522,18 +521,17 @@ partial void ProcessListResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -567,17 +565,15 @@ partial void ProcessListResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -614,17 +610,15 @@ partial void ProcessListResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.PipelineDeadLetterEntriesClient.Process.g.cs b/src/libs/Vectara/Generated/Vectara.PipelineDeadLetterEntriesClient.Process.g.cs index 9627d740..e572cd7c 100644 --- a/src/libs/Vectara/Generated/Vectara.PipelineDeadLetterEntriesClient.Process.g.cs +++ b/src/libs/Vectara/Generated/Vectara.PipelineDeadLetterEntriesClient.Process.g.cs @@ -424,18 +424,17 @@ partial void ProcessProcessResponseContent( __exception_400 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Permissions do not allow processing dead letters for this pipeline. if ((int)__response.StatusCode == 403) @@ -462,18 +461,17 @@ partial void ProcessProcessResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Pipeline not found. if ((int)__response.StatusCode == 404) @@ -500,18 +498,17 @@ partial void ProcessProcessResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // A run is already in progress for this pipeline. if ((int)__response.StatusCode == 409) @@ -538,18 +535,17 @@ partial void ProcessProcessResponseContent( __exception_409 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_409 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_409, - statusCode: __response.StatusCode) - { - ResponseBody = __content_409, - ResponseObject = __value_409, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_409, + responseObject: __value_409, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -583,17 +579,15 @@ partial void ProcessProcessResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -630,17 +624,15 @@ partial void ProcessProcessResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.PipelineRunsClient.Cancel.g.cs b/src/libs/Vectara/Generated/Vectara.PipelineRunsClient.Cancel.g.cs index eae898f0..dcdd1336 100644 --- a/src/libs/Vectara/Generated/Vectara.PipelineRunsClient.Cancel.g.cs +++ b/src/libs/Vectara/Generated/Vectara.PipelineRunsClient.Cancel.g.cs @@ -412,18 +412,17 @@ await CancelAsResponseAsync( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Pipeline or run not found. if ((int)__response.StatusCode == 404) @@ -450,18 +449,17 @@ await CancelAsResponseAsync( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // The run is not in a cancellable state. It has already completed, failed, or had cancellation requested. if ((int)__response.StatusCode == 409) @@ -488,18 +486,17 @@ await CancelAsResponseAsync( __exception_409 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_409 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_409, - statusCode: __response.StatusCode) - { - ResponseBody = __content_409, - ResponseObject = __value_409, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_409, + responseObject: __value_409, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -526,17 +523,15 @@ await CancelAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -564,17 +559,15 @@ await CancelAsResponseAsync( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.PipelineRunsClient.Get.g.cs b/src/libs/Vectara/Generated/Vectara.PipelineRunsClient.Get.g.cs index e7f70283..63951bbd 100644 --- a/src/libs/Vectara/Generated/Vectara.PipelineRunsClient.Get.g.cs +++ b/src/libs/Vectara/Generated/Vectara.PipelineRunsClient.Get.g.cs @@ -419,18 +419,17 @@ partial void ProcessGetResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Pipeline or run not found. if ((int)__response.StatusCode == 404) @@ -457,18 +456,17 @@ partial void ProcessGetResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -502,17 +500,15 @@ partial void ProcessGetResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -549,17 +545,15 @@ partial void ProcessGetResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.PipelineRunsClient.List.g.cs b/src/libs/Vectara/Generated/Vectara.PipelineRunsClient.List.g.cs index bc0e321a..6d80485a 100644 --- a/src/libs/Vectara/Generated/Vectara.PipelineRunsClient.List.g.cs +++ b/src/libs/Vectara/Generated/Vectara.PipelineRunsClient.List.g.cs @@ -454,18 +454,17 @@ partial void ProcessListResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Pipeline not found. if ((int)__response.StatusCode == 404) @@ -492,18 +491,17 @@ partial void ProcessListResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -537,17 +535,15 @@ partial void ProcessListResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -584,17 +580,15 @@ partial void ProcessListResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.PipelineRunsClient.ListEvents.g.cs b/src/libs/Vectara/Generated/Vectara.PipelineRunsClient.ListEvents.g.cs index d30b7cf1..37d2d0d5 100644 --- a/src/libs/Vectara/Generated/Vectara.PipelineRunsClient.ListEvents.g.cs +++ b/src/libs/Vectara/Generated/Vectara.PipelineRunsClient.ListEvents.g.cs @@ -479,18 +479,17 @@ partial void ProcessListEventsResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Pipeline or run not found. if ((int)__response.StatusCode == 404) @@ -517,18 +516,17 @@ partial void ProcessListEventsResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -562,17 +560,15 @@ partial void ProcessListEventsResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -609,17 +605,15 @@ partial void ProcessListEventsResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.PipelinesClient.Create.g.cs b/src/libs/Vectara/Generated/Vectara.PipelinesClient.Create.g.cs index d946b62c..5ae341ce 100644 --- a/src/libs/Vectara/Generated/Vectara.PipelinesClient.Create.g.cs +++ b/src/libs/Vectara/Generated/Vectara.PipelinesClient.Create.g.cs @@ -409,18 +409,17 @@ partial void ProcessCreateResponseContent( __exception_400 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Permissions do not allow creating pipelines. if ((int)__response.StatusCode == 403) @@ -447,18 +446,17 @@ partial void ProcessCreateResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // A pipeline with this key already exists. if ((int)__response.StatusCode == 409) @@ -485,18 +483,17 @@ partial void ProcessCreateResponseContent( __exception_409 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_409 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_409, - statusCode: __response.StatusCode) - { - ResponseBody = __content_409, - ResponseObject = __value_409, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_409, + responseObject: __value_409, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -530,17 +527,15 @@ partial void ProcessCreateResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -577,17 +572,15 @@ partial void ProcessCreateResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.PipelinesClient.Delete.g.cs b/src/libs/Vectara/Generated/Vectara.PipelinesClient.Delete.g.cs index 1ffb0557..96ea1261 100644 --- a/src/libs/Vectara/Generated/Vectara.PipelinesClient.Delete.g.cs +++ b/src/libs/Vectara/Generated/Vectara.PipelinesClient.Delete.g.cs @@ -397,18 +397,17 @@ await DeleteAsResponseAsync( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Pipeline not found. if ((int)__response.StatusCode == 404) @@ -435,18 +434,17 @@ await DeleteAsResponseAsync( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -473,17 +471,15 @@ await DeleteAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 +507,15 @@ await DeleteAsResponseAsync( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.PipelinesClient.Get.g.cs b/src/libs/Vectara/Generated/Vectara.PipelinesClient.Get.g.cs index 985e8a20..f0ef7362 100644 --- a/src/libs/Vectara/Generated/Vectara.PipelinesClient.Get.g.cs +++ b/src/libs/Vectara/Generated/Vectara.PipelinesClient.Get.g.cs @@ -404,18 +404,17 @@ partial void ProcessGetResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Pipeline not found. if ((int)__response.StatusCode == 404) @@ -442,18 +441,17 @@ partial void ProcessGetResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -487,17 +485,15 @@ partial void ProcessGetResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -534,17 +530,15 @@ partial void ProcessGetResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.PipelinesClient.List.g.cs b/src/libs/Vectara/Generated/Vectara.PipelinesClient.List.g.cs index fd026dc7..5217d61f 100644 --- a/src/libs/Vectara/Generated/Vectara.PipelinesClient.List.g.cs +++ b/src/libs/Vectara/Generated/Vectara.PipelinesClient.List.g.cs @@ -459,18 +459,17 @@ partial void ProcessListResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -504,17 +503,15 @@ partial void ProcessListResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -551,17 +548,15 @@ partial void ProcessListResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.PipelinesClient.Replace.g.cs b/src/libs/Vectara/Generated/Vectara.PipelinesClient.Replace.g.cs index 45a7d7ea..67f926fb 100644 --- a/src/libs/Vectara/Generated/Vectara.PipelinesClient.Replace.g.cs +++ b/src/libs/Vectara/Generated/Vectara.PipelinesClient.Replace.g.cs @@ -424,18 +424,17 @@ partial void ProcessReplaceResponseContent( __exception_400 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Permissions do not allow replacing this pipeline. if ((int)__response.StatusCode == 403) @@ -462,18 +461,17 @@ partial void ProcessReplaceResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Pipeline not found. if ((int)__response.StatusCode == 404) @@ -500,18 +498,17 @@ partial void ProcessReplaceResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -545,17 +542,15 @@ partial void ProcessReplaceResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -592,17 +587,15 @@ partial void ProcessReplaceResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.PipelinesClient.Trigger.g.cs b/src/libs/Vectara/Generated/Vectara.PipelinesClient.Trigger.g.cs index dfc4d194..062ae8bb 100644 --- a/src/libs/Vectara/Generated/Vectara.PipelinesClient.Trigger.g.cs +++ b/src/libs/Vectara/Generated/Vectara.PipelinesClient.Trigger.g.cs @@ -404,18 +404,17 @@ partial void ProcessTriggerResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Pipeline not found. if ((int)__response.StatusCode == 404) @@ -442,18 +441,17 @@ partial void ProcessTriggerResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // A run is already in progress for this pipeline. if ((int)__response.StatusCode == 409) @@ -480,18 +478,17 @@ partial void ProcessTriggerResponseContent( __exception_409 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_409 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_409, - statusCode: __response.StatusCode) - { - ResponseBody = __content_409, - ResponseObject = __value_409, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_409, + responseObject: __value_409, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -525,17 +522,15 @@ partial void ProcessTriggerResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -572,17 +567,15 @@ partial void ProcessTriggerResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.PipelinesClient.Update.g.cs b/src/libs/Vectara/Generated/Vectara.PipelinesClient.Update.g.cs index c381e088..e3e5227f 100644 --- a/src/libs/Vectara/Generated/Vectara.PipelinesClient.Update.g.cs +++ b/src/libs/Vectara/Generated/Vectara.PipelinesClient.Update.g.cs @@ -424,18 +424,17 @@ partial void ProcessUpdateResponseContent( __exception_400 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Permissions do not allow updating this pipeline. if ((int)__response.StatusCode == 403) @@ -462,18 +461,17 @@ partial void ProcessUpdateResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Pipeline not found. if ((int)__response.StatusCode == 404) @@ -500,18 +498,17 @@ partial void ProcessUpdateResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -545,17 +542,15 @@ partial void ProcessUpdateResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -592,17 +587,15 @@ partial void ProcessUpdateResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.QueriesClient.Query2.g.cs b/src/libs/Vectara/Generated/Vectara.QueriesClient.Query2.g.cs index f46a4f9f..72f9b0a5 100644 --- a/src/libs/Vectara/Generated/Vectara.QueriesClient.Query2.g.cs +++ b/src/libs/Vectara/Generated/Vectara.QueriesClient.Query2.g.cs @@ -421,18 +421,17 @@ partial void ProcessQuery2ResponseContent( __exception_400 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Permissions do not allow querying one or more corpora in the request. if ((int)__response.StatusCode == 403) @@ -459,18 +458,17 @@ partial void ProcessQuery2ResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // One or more of the corpora were not found. if ((int)__response.StatusCode == 404) @@ -497,18 +495,17 @@ partial void ProcessQuery2ResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -542,17 +539,15 @@ partial void ProcessQuery2ResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -589,17 +584,15 @@ partial void ProcessQuery2ResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.QueriesClient.Query2AsStream.g.cs b/src/libs/Vectara/Generated/Vectara.QueriesClient.Query2AsStream.g.cs index 84c5cb0f..a54c02dc 100644 --- a/src/libs/Vectara/Generated/Vectara.QueriesClient.Query2AsStream.g.cs +++ b/src/libs/Vectara/Generated/Vectara.QueriesClient.Query2AsStream.g.cs @@ -376,17 +376,15 @@ partial void ProcessQuery2AsStreamResponse( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } using var __stream = await __response.Content.ReadAsStreamAsync( @@ -405,16 +403,15 @@ partial void ProcessQuery2AsStreamResponse( } var __streamedResponse = global::Vectara.QueryStreamedResponse.FromJson(__content, JsonSerializerContext) ?? - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: $"Response deserialization failed for \"{__content}\" ", - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + innerException: null, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); yield return __streamedResponse; } diff --git a/src/libs/Vectara/Generated/Vectara.QueryHistoryClient.Get.g.cs b/src/libs/Vectara/Generated/Vectara.QueryHistoryClient.Get.g.cs index b492ef54..f91a153a 100644 --- a/src/libs/Vectara/Generated/Vectara.QueryHistoryClient.Get.g.cs +++ b/src/libs/Vectara/Generated/Vectara.QueryHistoryClient.Get.g.cs @@ -400,18 +400,17 @@ partial void ProcessGetResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Query history not found. if ((int)__response.StatusCode == 404) @@ -438,18 +437,17 @@ partial void ProcessGetResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -483,17 +481,15 @@ partial void ProcessGetResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -530,17 +526,15 @@ partial void ProcessGetResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.QueryHistoryClient.List.g.cs b/src/libs/Vectara/Generated/Vectara.QueryHistoryClient.List.g.cs index 10397c61..ae7a7d7c 100644 --- a/src/libs/Vectara/Generated/Vectara.QueryHistoryClient.List.g.cs +++ b/src/libs/Vectara/Generated/Vectara.QueryHistoryClient.List.g.cs @@ -467,18 +467,17 @@ partial void ProcessListResponseContent( __exception_400 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Permissions do not allow listing query histories. if ((int)__response.StatusCode == 403) @@ -505,18 +504,17 @@ partial void ProcessListResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -550,17 +548,15 @@ partial void ProcessListResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -597,17 +593,15 @@ partial void ProcessListResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.RerankersClient.List.g.cs b/src/libs/Vectara/Generated/Vectara.RerankersClient.List.g.cs index 099bc917..c829cf33 100644 --- a/src/libs/Vectara/Generated/Vectara.RerankersClient.List.g.cs +++ b/src/libs/Vectara/Generated/Vectara.RerankersClient.List.g.cs @@ -431,18 +431,17 @@ partial void ProcessListResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + 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 ProcessListResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 ProcessListResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.TableExtractorsClient.List.g.cs b/src/libs/Vectara/Generated/Vectara.TableExtractorsClient.List.g.cs index 951c5eb1..6f430a05 100644 --- a/src/libs/Vectara/Generated/Vectara.TableExtractorsClient.List.g.cs +++ b/src/libs/Vectara/Generated/Vectara.TableExtractorsClient.List.g.cs @@ -389,18 +389,17 @@ partial void ProcessListResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -434,17 +433,15 @@ partial void ProcessListResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -481,17 +478,15 @@ partial void ProcessListResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.ToolServersClient.Create.g.cs b/src/libs/Vectara/Generated/Vectara.ToolServersClient.Create.g.cs index 143b3b2b..a5bad895 100644 --- a/src/libs/Vectara/Generated/Vectara.ToolServersClient.Create.g.cs +++ b/src/libs/Vectara/Generated/Vectara.ToolServersClient.Create.g.cs @@ -409,18 +409,17 @@ partial void ProcessCreateResponseContent( __exception_400 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Permissions do not allow creating tool servers. if ((int)__response.StatusCode == 403) @@ -447,18 +446,17 @@ partial void ProcessCreateResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -492,17 +490,15 @@ partial void ProcessCreateResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -539,17 +535,15 @@ partial void ProcessCreateResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.ToolServersClient.Delete.g.cs b/src/libs/Vectara/Generated/Vectara.ToolServersClient.Delete.g.cs index 57cb4983..481a530e 100644 --- a/src/libs/Vectara/Generated/Vectara.ToolServersClient.Delete.g.cs +++ b/src/libs/Vectara/Generated/Vectara.ToolServersClient.Delete.g.cs @@ -395,18 +395,17 @@ await DeleteAsResponseAsync( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Tool Server not found. if ((int)__response.StatusCode == 404) @@ -433,18 +432,17 @@ await DeleteAsResponseAsync( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -471,17 +469,15 @@ await DeleteAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -509,17 +505,15 @@ await DeleteAsResponseAsync( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.ToolServersClient.Get.g.cs b/src/libs/Vectara/Generated/Vectara.ToolServersClient.Get.g.cs index 40fa1cc6..00ff001b 100644 --- a/src/libs/Vectara/Generated/Vectara.ToolServersClient.Get.g.cs +++ b/src/libs/Vectara/Generated/Vectara.ToolServersClient.Get.g.cs @@ -402,18 +402,17 @@ partial void ProcessGetResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Tool Server not found. if ((int)__response.StatusCode == 404) @@ -440,18 +439,17 @@ partial void ProcessGetResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -485,17 +483,15 @@ partial void ProcessGetResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -532,17 +528,15 @@ partial void ProcessGetResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.ToolServersClient.List.g.cs b/src/libs/Vectara/Generated/Vectara.ToolServersClient.List.g.cs index d9cc4bc6..ee336275 100644 --- a/src/libs/Vectara/Generated/Vectara.ToolServersClient.List.g.cs +++ b/src/libs/Vectara/Generated/Vectara.ToolServersClient.List.g.cs @@ -457,18 +457,17 @@ partial void ProcessListResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -502,17 +501,15 @@ partial void ProcessListResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -549,17 +546,15 @@ partial void ProcessListResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.ToolServersClient.Sync.g.cs b/src/libs/Vectara/Generated/Vectara.ToolServersClient.Sync.g.cs index f3a71579..c4e4630c 100644 --- a/src/libs/Vectara/Generated/Vectara.ToolServersClient.Sync.g.cs +++ b/src/libs/Vectara/Generated/Vectara.ToolServersClient.Sync.g.cs @@ -395,18 +395,17 @@ await SyncAsResponseAsync( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Tool Server not found. if ((int)__response.StatusCode == 404) @@ -433,18 +432,17 @@ await SyncAsResponseAsync( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -471,17 +469,15 @@ await SyncAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -509,17 +505,15 @@ await SyncAsResponseAsync( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.ToolServersClient.Update.g.cs b/src/libs/Vectara/Generated/Vectara.ToolServersClient.Update.g.cs index ec3545f2..a23dae22 100644 --- a/src/libs/Vectara/Generated/Vectara.ToolServersClient.Update.g.cs +++ b/src/libs/Vectara/Generated/Vectara.ToolServersClient.Update.g.cs @@ -422,18 +422,17 @@ partial void ProcessUpdateResponseContent( __exception_400 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Permissions do not allow updating this tool server. if ((int)__response.StatusCode == 403) @@ -460,18 +459,17 @@ partial void ProcessUpdateResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Tool Server not found. if ((int)__response.StatusCode == 404) @@ -498,18 +496,17 @@ partial void ProcessUpdateResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -543,17 +540,15 @@ partial void ProcessUpdateResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -590,17 +585,15 @@ partial void ProcessUpdateResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.ToolsClient.Create.g.cs b/src/libs/Vectara/Generated/Vectara.ToolsClient.Create.g.cs index e3b1a005..76611b39 100644 --- a/src/libs/Vectara/Generated/Vectara.ToolsClient.Create.g.cs +++ b/src/libs/Vectara/Generated/Vectara.ToolsClient.Create.g.cs @@ -429,18 +429,17 @@ partial void ProcessCreateResponseContent( __exception_400 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Permissions do not allow creating tools. if ((int)__response.StatusCode == 403) @@ -467,18 +466,17 @@ partial void ProcessCreateResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // A tool with this name already exists. if ((int)__response.StatusCode == 409) @@ -505,18 +503,17 @@ partial void ProcessCreateResponseContent( __exception_409 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_409 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_409, - statusCode: __response.StatusCode) - { - ResponseBody = __content_409, - ResponseObject = __value_409, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_409, + responseObject: __value_409, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -550,17 +547,15 @@ partial void ProcessCreateResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -597,17 +592,15 @@ partial void ProcessCreateResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.ToolsClient.Delete.g.cs b/src/libs/Vectara/Generated/Vectara.ToolsClient.Delete.g.cs index 39004241..cba11b9d 100644 --- a/src/libs/Vectara/Generated/Vectara.ToolsClient.Delete.g.cs +++ b/src/libs/Vectara/Generated/Vectara.ToolsClient.Delete.g.cs @@ -395,18 +395,17 @@ await DeleteAsResponseAsync( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Tool not found. if ((int)__response.StatusCode == 404) @@ -433,18 +432,17 @@ await DeleteAsResponseAsync( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -471,17 +469,15 @@ await DeleteAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -509,17 +505,15 @@ await DeleteAsResponseAsync( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.ToolsClient.Get.g.cs b/src/libs/Vectara/Generated/Vectara.ToolsClient.Get.g.cs index b898a678..0fa8fa7f 100644 --- a/src/libs/Vectara/Generated/Vectara.ToolsClient.Get.g.cs +++ b/src/libs/Vectara/Generated/Vectara.ToolsClient.Get.g.cs @@ -402,18 +402,17 @@ partial void ProcessGetResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Tool not found. if ((int)__response.StatusCode == 404) @@ -440,18 +439,17 @@ partial void ProcessGetResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -485,17 +483,15 @@ partial void ProcessGetResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -532,17 +528,15 @@ partial void ProcessGetResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.ToolsClient.List.g.cs b/src/libs/Vectara/Generated/Vectara.ToolsClient.List.g.cs index 6ab2e6a8..aaf430df 100644 --- a/src/libs/Vectara/Generated/Vectara.ToolsClient.List.g.cs +++ b/src/libs/Vectara/Generated/Vectara.ToolsClient.List.g.cs @@ -485,18 +485,17 @@ partial void ProcessListResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -530,17 +529,15 @@ partial void ProcessListResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -577,17 +574,15 @@ partial void ProcessListResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.ToolsClient.Test.g.cs b/src/libs/Vectara/Generated/Vectara.ToolsClient.Test.g.cs index edf7bea1..03513e35 100644 --- a/src/libs/Vectara/Generated/Vectara.ToolsClient.Test.g.cs +++ b/src/libs/Vectara/Generated/Vectara.ToolsClient.Test.g.cs @@ -426,18 +426,17 @@ partial void ProcessTestResponseContent( __exception_400 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Permissions do not allow testing this tool. if ((int)__response.StatusCode == 403) @@ -464,18 +463,17 @@ partial void ProcessTestResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Tool not found or not a Lambda tool. if ((int)__response.StatusCode == 404) @@ -502,18 +500,17 @@ partial void ProcessTestResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Execution failed due to execution errors or resource limits. if ((int)__response.StatusCode == 500) @@ -540,18 +537,17 @@ partial void ProcessTestResponseContent( __exception_500 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.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) @@ -585,17 +581,15 @@ partial void ProcessTestResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -632,17 +626,15 @@ partial void ProcessTestResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.ToolsClient.TestWithoutCreation.g.cs b/src/libs/Vectara/Generated/Vectara.ToolsClient.TestWithoutCreation.g.cs index 1752283e..ce006443 100644 --- a/src/libs/Vectara/Generated/Vectara.ToolsClient.TestWithoutCreation.g.cs +++ b/src/libs/Vectara/Generated/Vectara.ToolsClient.TestWithoutCreation.g.cs @@ -421,18 +421,17 @@ partial void ProcessTestWithoutCreationResponseContent( __exception_400 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Permissions do not allow testing tools. if ((int)__response.StatusCode == 403) @@ -459,18 +458,17 @@ partial void ProcessTestWithoutCreationResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -504,17 +502,15 @@ partial void ProcessTestWithoutCreationResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -551,17 +547,15 @@ partial void ProcessTestWithoutCreationResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.ToolsClient.Update.g.cs b/src/libs/Vectara/Generated/Vectara.ToolsClient.Update.g.cs index c7335745..cdae39da 100644 --- a/src/libs/Vectara/Generated/Vectara.ToolsClient.Update.g.cs +++ b/src/libs/Vectara/Generated/Vectara.ToolsClient.Update.g.cs @@ -420,18 +420,17 @@ partial void ProcessUpdateResponseContent( __exception_400 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Permissions do not allow updating this tool. if ((int)__response.StatusCode == 403) @@ -458,18 +457,17 @@ partial void ProcessUpdateResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Tool not found. if ((int)__response.StatusCode == 404) @@ -496,18 +494,17 @@ partial void ProcessUpdateResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -541,17 +538,15 @@ partial void ProcessUpdateResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -588,17 +583,15 @@ partial void ProcessUpdateResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.UploadClient.File.g.cs b/src/libs/Vectara/Generated/Vectara.UploadClient.File.g.cs index abb91f82..ab1294b4 100644 --- a/src/libs/Vectara/Generated/Vectara.UploadClient.File.g.cs +++ b/src/libs/Vectara/Generated/Vectara.UploadClient.File.g.cs @@ -632,18 +632,17 @@ request.Filename is null __exception_400 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Permissions do not allow uploading a file to the corpus. if ((int)__response.StatusCode == 403) @@ -670,18 +669,17 @@ request.Filename is null __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Corpus not found. if ((int)__response.StatusCode == 404) @@ -708,18 +706,17 @@ request.Filename is null __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // A document with the same document ID already exists in the corpus with different content. Delete the existing document first or use a unique document ID. if ((int)__response.StatusCode == 409) @@ -746,18 +743,17 @@ request.Filename is null __exception_409 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_409 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_409, - statusCode: __response.StatusCode) - { - ResponseBody = __content_409, - ResponseObject = __value_409, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_409, + responseObject: __value_409, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // The media type of the uploaded file is not supported. if ((int)__response.StatusCode == 415) @@ -784,18 +780,17 @@ request.Filename is null __exception_415 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_415 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_415, - statusCode: __response.StatusCode) - { - ResponseBody = __content_415, - ResponseObject = __value_415, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_415, + responseObject: __value_415, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -829,17 +824,15 @@ request.Filename is null } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -876,17 +869,15 @@ request.Filename is null { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } @@ -1518,18 +1509,17 @@ request.Filename is null __exception_400 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Permissions do not allow uploading a file to the corpus. if ((int)__response.StatusCode == 403) @@ -1556,18 +1546,17 @@ request.Filename is null __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Corpus not found. if ((int)__response.StatusCode == 404) @@ -1594,18 +1583,17 @@ request.Filename is null __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // A document with the same document ID already exists in the corpus with different content. Delete the existing document first or use a unique document ID. if ((int)__response.StatusCode == 409) @@ -1632,18 +1620,17 @@ request.Filename is null __exception_409 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_409 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_409, - statusCode: __response.StatusCode) - { - ResponseBody = __content_409, - ResponseObject = __value_409, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_409, + responseObject: __value_409, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // The media type of the uploaded file is not supported. if ((int)__response.StatusCode == 415) @@ -1670,18 +1657,17 @@ request.Filename is null __exception_415 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_415 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_415, - statusCode: __response.StatusCode) - { - ResponseBody = __content_415, - ResponseObject = __value_415, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_415, + responseObject: __value_415, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -1711,17 +1697,15 @@ request.Filename is null } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -1754,17 +1738,15 @@ request.Filename is null { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } @@ -2276,18 +2258,17 @@ request.Filename is null __exception_400 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Permissions do not allow uploading a file to the corpus. if ((int)__response.StatusCode == 403) @@ -2314,18 +2295,17 @@ request.Filename is null __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Corpus not found. if ((int)__response.StatusCode == 404) @@ -2352,18 +2332,17 @@ request.Filename is null __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // A document with the same document ID already exists in the corpus with different content. Delete the existing document first or use a unique document ID. if ((int)__response.StatusCode == 409) @@ -2390,18 +2369,17 @@ request.Filename is null __exception_409 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_409 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_409, - statusCode: __response.StatusCode) - { - ResponseBody = __content_409, - ResponseObject = __value_409, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_409, + responseObject: __value_409, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // The media type of the uploaded file is not supported. if ((int)__response.StatusCode == 415) @@ -2428,18 +2406,17 @@ request.Filename is null __exception_415 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_415 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_415, - statusCode: __response.StatusCode) - { - ResponseBody = __content_415, - ResponseObject = __value_415, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_415, + responseObject: __value_415, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -2473,17 +2450,15 @@ request.Filename is null } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -2520,17 +2495,15 @@ request.Filename is null { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.UsersClient.Create.g.cs b/src/libs/Vectara/Generated/Vectara.UsersClient.Create.g.cs index 7a9d1266..c07bc1ad 100644 --- a/src/libs/Vectara/Generated/Vectara.UsersClient.Create.g.cs +++ b/src/libs/Vectara/Generated/Vectara.UsersClient.Create.g.cs @@ -409,18 +409,17 @@ partial void ProcessCreateResponseContent( __exception_400 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Permissions do not allow retrieving a user. if ((int)__response.StatusCode == 403) @@ -447,18 +446,17 @@ partial void ProcessCreateResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -492,17 +490,15 @@ partial void ProcessCreateResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -539,17 +535,15 @@ partial void ProcessCreateResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.UsersClient.Delete.g.cs b/src/libs/Vectara/Generated/Vectara.UsersClient.Delete.g.cs index 88483988..23455c59 100644 --- a/src/libs/Vectara/Generated/Vectara.UsersClient.Delete.g.cs +++ b/src/libs/Vectara/Generated/Vectara.UsersClient.Delete.g.cs @@ -391,18 +391,17 @@ await DeleteAsResponseAsync( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // User not found. if ((int)__response.StatusCode == 404) @@ -429,18 +428,17 @@ await DeleteAsResponseAsync( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -467,17 +465,15 @@ await DeleteAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -505,17 +501,15 @@ await DeleteAsResponseAsync( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.UsersClient.Get.g.cs b/src/libs/Vectara/Generated/Vectara.UsersClient.Get.g.cs index 937672d8..34c671eb 100644 --- a/src/libs/Vectara/Generated/Vectara.UsersClient.Get.g.cs +++ b/src/libs/Vectara/Generated/Vectara.UsersClient.Get.g.cs @@ -398,18 +398,17 @@ partial void ProcessGetResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // User not found. if ((int)__response.StatusCode == 404) @@ -436,18 +435,17 @@ partial void ProcessGetResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -481,17 +479,15 @@ partial void ProcessGetResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -528,17 +524,15 @@ partial void ProcessGetResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.UsersClient.List.g.cs b/src/libs/Vectara/Generated/Vectara.UsersClient.List.g.cs index 637657e7..e16dd565 100644 --- a/src/libs/Vectara/Generated/Vectara.UsersClient.List.g.cs +++ b/src/libs/Vectara/Generated/Vectara.UsersClient.List.g.cs @@ -433,18 +433,17 @@ partial void ProcessListResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + 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 ProcessListResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 ProcessListResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.UsersClient.ResetPassword.g.cs b/src/libs/Vectara/Generated/Vectara.UsersClient.ResetPassword.g.cs index ff836831..5510de9a 100644 --- a/src/libs/Vectara/Generated/Vectara.UsersClient.ResetPassword.g.cs +++ b/src/libs/Vectara/Generated/Vectara.UsersClient.ResetPassword.g.cs @@ -398,18 +398,17 @@ partial void ProcessResetPasswordResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // User not found. if ((int)__response.StatusCode == 404) @@ -436,18 +435,17 @@ partial void ProcessResetPasswordResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -481,17 +479,15 @@ partial void ProcessResetPasswordResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -528,17 +524,15 @@ partial void ProcessResetPasswordResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/Generated/Vectara.UsersClient.Update.g.cs b/src/libs/Vectara/Generated/Vectara.UsersClient.Update.g.cs index f7a95a2e..fc657a4a 100644 --- a/src/libs/Vectara/Generated/Vectara.UsersClient.Update.g.cs +++ b/src/libs/Vectara/Generated/Vectara.UsersClient.Update.g.cs @@ -418,18 +418,17 @@ partial void ProcessUpdateResponseContent( __exception_403 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // User not found. if ((int)__response.StatusCode == 404) @@ -456,18 +455,17 @@ partial void ProcessUpdateResponseContent( __exception_404 = __ex; } - throw new global::Vectara.ApiException( + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -501,17 +499,15 @@ partial void ProcessUpdateResponseContent( } catch (global::System.Exception __ex) { - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -548,17 +544,15 @@ partial void ProcessUpdateResponseContent( { } - throw new global::Vectara.ApiException( + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Vectara/openapi.yaml b/src/libs/Vectara/openapi.yaml index 621e984f..5b28516c 100644 --- a/src/libs/Vectara/openapi.yaml +++ b/src/libs/Vectara/openapi.yaml @@ -9037,6 +9037,37 @@ paths: schema: type: string example: support.* + - in: query + name: metadata_filter + description: 'A filter expression to narrow the list to sessions whose metadata + matches. Field names refer to keys on the session''s `metadata` object. + Syntax is similar to a SQL WHERE clause, the same as the `metadata_filter` + used in query requests. See [metadata filters documentation](https://docs.vectara.com/docs/learn/metadata-search-filtering/filter-overview) + for more information. + + + Examples: + + - `user_role = ''premium''` + + - `tier >= 2 AND region = ''us''` + + - `user LIKE ''%@example.com''` + + - `tier IN (''premium'', ''enterprise'')` + + - `tier IS NULL` + + - `"profile.country" = ''US''` (nested fields use a quoted dotted path) + + - `1 IN user_ids` (value present in an array) + + ' + required: false + schema: + type: string + maxLength: 8000 + example: user_role = 'premium' AND tier >= 2 - in: query name: limit description: The maximum number of sessions to return in the list. @@ -9438,6 +9469,7 @@ paths: skill_load: '#/components/schemas/SkillLoadEvent' thinking: '#/components/schemas/ThinkingEvent' artifact_upload: '#/components/schemas/ArtifactUploadEvent' + tool_activity: '#/components/schemas/ToolActivityEvent' error: '#/components/schemas/StreamError' end: '#/components/schemas/StreamResponseEnd' oneOf: @@ -9451,6 +9483,7 @@ paths: - $ref: '#/components/schemas/StreamingThinkingEnd' - $ref: '#/components/schemas/ToolInputEvent' - $ref: '#/components/schemas/ToolOutputEvent' + - $ref: '#/components/schemas/ToolActivityEvent' - $ref: '#/components/schemas/StructuredOutputEvent' - $ref: '#/components/schemas/ContextLimitExceededEvent' - $ref: '#/components/schemas/StepTransitionLimitExceededEvent' @@ -11028,6 +11061,7 @@ paths: enum: - sharepoint - s3 + - web - in: query name: status description: Filter pipelines by status. @@ -15947,6 +15981,7 @@ components: description: Maximum context window size in tokens. type: integer format: int32 + minimum: 4096 tool_calling: description: Whether the model supports tool/function calling. type: boolean @@ -16339,6 +16374,12 @@ components: example: https://us-central1-aiplatform.googleapis.com/v1/projects/my-project/locations/us-central1 auth: $ref: '#/components/schemas/VertexAiAuth' + headers: + description: Additional HTTP headers to include with requests to the Gemini + API. + type: object + additionalProperties: + type: string idle_timeout_seconds: $ref: '#/components/schemas/IdleTimeoutSeconds' test_model_parameters: @@ -16658,6 +16699,12 @@ components: nullable: false auth: $ref: '#/components/schemas/VertexAiAuth' + headers: + description: Additional HTTP headers to include with requests to the Gemini + API. + type: object + additionalProperties: + type: string idle_timeout_seconds: $ref: '#/components/schemas/IdleTimeoutSeconds' enabled: @@ -22982,6 +23029,98 @@ components: - type x-vectaraParents: - AgentStreamedResponse + ToolActivityEventBase: + description: Base properties shared by all tool activity event types. + type: object + properties: + type: + description: The type of streaming event. + type: string + default: tool_activity + example: tool_activity + tool_call_id: + description: The tool_call_id of the tool invocation this activity belongs + to. Matches tool_input/tool_output. + type: string + example: call_tool_search_001 + tool_configuration_name: + description: The name of the tool configuration emitting the activity. + type: string + tool_name: + description: Name of the tool emitting the activity. + type: string + created_at: + description: Timestamp when the event was created. + type: string + format: date-time + example: '2024-01-15T10:35:00Z' + required: + - type + - tool_call_id + - created_at + GenericToolActivityEvent: + title: GenericToolActivityEvent + description: A free-form progress update from a tool. The only payload is a + human-readable message. + allOf: + - $ref: '#/components/schemas/ToolActivityEventBase' + - type: object + properties: + activity_type: + description: Discriminator for ToolActivityEvent subtypes. + type: string + default: generic + example: generic + message: + description: Human-readable progress update. Safe to render directly to + the user. + type: string + example: Sub-agent finished step 2 of 5 + required: + - activity_type + - message + x-vectaraParents: + - ToolActivityEvent + SubAgentToolActivityEvent: + title: SubAgentToolActivityEvent + description: A relayed event from a sub-agent's inner execution stream, emitted + by the sub_agent tool while it runs. + allOf: + - $ref: '#/components/schemas/ToolActivityEventBase' + - type: object + properties: + activity_type: + description: Discriminator for ToolActivityEvent subtypes. + type: string + default: sub_agent + example: sub_agent + agent_event: + description: The inner agent event being relayed (tool_input, tool_output, + agent_output, etc.). + $ref: '#/components/schemas/AgentEvent' + required: + - activity_type + - agent_event + x-vectaraParents: + - ToolActivityEvent + ToolActivityEvent: + description: "A sideband event emitted by a tool during its execution (streaming\ + \ only, not stored). Always falls between the tool's tool_input and tool_output\ + \ events for the same tool_call_id. Polymorphic on `activity_type` \u2014\ + \ see GenericToolActivityEvent (free-form text) and SubAgentToolActivityEvent\ + \ (relayed inner AgentEvent)." + type: object + x-vectara-base-schema: '#/ToolActivityEventBase' + discriminator: + propertyName: activity_type + mapping: + generic: '#/components/schemas/GenericToolActivityEvent' + sub_agent: '#/components/schemas/SubAgentToolActivityEvent' + oneOf: + - $ref: '#/components/schemas/GenericToolActivityEvent' + - $ref: '#/components/schemas/SubAgentToolActivityEvent' + x-vectaraParents: + - AgentStreamedResponse AgentStreamedResponse: description: An individual event sent with Server-sent Events (SSE) when the agent response is streamed. @@ -23008,6 +23147,7 @@ components: skill_load: '#/components/schemas/SkillLoadEvent' thinking: '#/components/schemas/ThinkingEvent' artifact_upload: '#/components/schemas/ArtifactUploadEvent' + tool_activity: '#/components/schemas/ToolActivityEvent' error: '#/components/schemas/StreamError' end: '#/components/schemas/StreamResponseEnd' oneOf: @@ -23021,6 +23161,7 @@ components: - $ref: '#/components/schemas/StreamingThinkingEnd' - $ref: '#/components/schemas/ToolInputEvent' - $ref: '#/components/schemas/ToolOutputEvent' + - $ref: '#/components/schemas/ToolActivityEvent' - $ref: '#/components/schemas/StructuredOutputEvent' - $ref: '#/components/schemas/ContextLimitExceededEvent' - $ref: '#/components/schemas/StepTransitionLimitExceededEvent'