From 64407072e1f6e187a116dec60b3125e38b28b6ef Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 10 May 2026 19:12:42 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- .../Vectara/Generated/Vectara.AllOf.2.g.cs | 24 ++ .../Generated/Vectara.Models.AgentEvent.g.cs | 168 ++++++++++++ .../Generated/Vectara.Models.AgentInput.g.cs | 24 ++ .../Vectara.Models.AgentOutputEvent.g.cs | 24 ++ .../Vectara.Models.AgentOutputParser.g.cs | 24 ++ .../Vectara.Models.AgentStepInstruction.g.cs | 24 ++ .../Vectara.Models.AgentStepReminder.g.cs | 24 ++ .../Vectara.Models.AgentStreamedResponse.g.cs | 252 ++++++++++++++++++ ...Vectara.Models.AgentToolConfiguration.g.cs | 156 +++++++++++ .../Vectara.Models.AgentTraceSpan.g.cs | 108 ++++++++ .../Vectara.Models.AnthropicAuth.g.cs | 72 +++++ .../Vectara.Models.ArtifactCreateTool.g.cs | 24 ++ .../Vectara.Models.ArtifactGrepTool.g.cs | 24 ++ .../Vectara.Models.ArtifactReadTool.g.cs | 24 ++ .../Vectara.Models.ArtifactUploadEvent.g.cs | 24 ++ ...ra.Models.BulkDeleteDocumentsResponse.g.cs | 24 ++ .../Vectara.Models.ChatStreamedResponse.g.cs | 96 +++++++ .../Vectara.Models.ChatTraceSpan.g.cs | 24 ++ .../Vectara.Models.ChunkingStrategy.g.cs | 24 ++ .../Vectara.Models.CompactionEvent.g.cs | 24 ++ ...Vectara.Models.CompactionStartedEvent.g.cs | 24 ++ .../Vectara.Models.CompactionTraceSpan.g.cs | 24 ++ ...Vectara.Models.ConnectorConfiguration.g.cs | 12 + ...tara.Models.ContextLimitExceededEvent.g.cs | 24 ++ .../Vectara.Models.CorporaSearchTool.g.cs | 24 ++ ...Vectara.Models.CreateAppClientRequest.g.cs | 12 + .../Vectara.Models.CreateCompactRequest.g.cs | 24 ++ .../Vectara.Models.CreateDocumentRequest.g.cs | 24 ++ .../Vectara.Models.CreateEncoderRequest.g.cs | 12 + ....Models.CreateGenerationPresetRequest.g.cs | 12 + ...odels.CreateInitialInstructionRequest.g.cs | 24 ++ ...tara.Models.CreateInputMessageRequest.g.cs | 24 ++ .../Vectara.Models.CreateInputRequest.g.cs | 36 +++ ...ctara.Models.CreateInstructionRequest.g.cs | 12 + ...Vectara.Models.CreateInterruptRequest.g.cs | 24 ++ .../Vectara.Models.CreateLLMRequest.g.cs | 48 ++++ ...Vectara.Models.CreateOpenAILLMRequest.g.cs | 24 ++ ...odels.CreateOpenAIResponsesLLMRequest.g.cs | 24 ++ .../Vectara.Models.CreateToolRequest.g.cs | 12 + ...Vectara.Models.DocumentConversionTool.g.cs | 24 ++ .../Vectara.Models.DynamicVectaraTool.g.cs | 24 ++ .../Vectara.Models.ExecuteToolTraceSpan.g.cs | 24 ++ .../Vectara.Models.GetDocumentTextTool.g.cs | 24 ++ .../Vectara.Models.GuardrailTraceSpan.g.cs | 24 ++ .../Vectara.Models.ImageReadEvent.g.cs | 24 ++ .../Vectara.Models.ImageReadTool.g.cs | 24 ++ .../Vectara.Models.ImageReadTraceSpan.g.cs | 24 ++ ...InlineArtifactCreateToolConfiguration.g.cs | 24 ++ ...s.InlineArtifactGrepToolConfiguration.g.cs | 24 ++ ...s.InlineArtifactReadToolConfiguration.g.cs | 24 ++ ....InlineCorporaSearchToolConfiguration.g.cs | 24 ++ ...neDocumentConversionToolConfiguration.g.cs | 24 ++ ...InlineDynamicVectaraToolConfiguration.g.cs | 24 ++ ...nlineGetDocumentTextToolConfiguration.g.cs | 24 ++ ...dels.InlineImageReadToolConfiguration.g.cs | 24 ++ .../Vectara.Models.InlineInstruction.g.cs | 24 ++ ....Models.InlineLambdaToolConfiguration.g.cs | 24 ++ ...ara.Models.InlineMcpToolConfiguration.g.cs | 24 ++ ...odels.InlineSubAgentToolConfiguration.g.cs | 24 ++ ....Models.InlineWebGetToolConfiguration.g.cs | 24 ++ ...dels.InlineWebSearchToolConfiguration.g.cs | 24 ++ .../Vectara.Models.InputMessageEvent.g.cs | 24 ++ .../Generated/Vectara.Models.Instruction.g.cs | 12 + .../Vectara.Models.InvokeAgentTraceSpan.g.cs | 24 ++ .../Vectara.Models.KeyedSearchCorpus.g.cs | 24 ++ .../Generated/Vectara.Models.LambdaTool.g.cs | 24 ++ .../Generated/Vectara.Models.McpTool.g.cs | 24 ++ .../Vectara.Models.OutputTraceSpan.g.cs | 24 ++ .../Vectara.Models.PipelineSource.g.cs | 12 + .../Vectara.Models.PipelineTrigger.g.cs | 36 +++ .../Vectara.Models.PipelineVerification.g.cs | 24 ++ .../Vectara.Models.QueryHistorySpan.g.cs | 72 +++++ .../Vectara.Models.QueryStreamedResponse.g.cs | 84 ++++++ .../Vectara.Models.ReferenceInstruction.g.cs | 24 ++ .../Generated/Vectara.Models.RemoteAuth.g.cs | 36 +++ .../Vectara.Models.S3SourceConfiguration.g.cs | 19 ++ .../Vectara.Models.ScheduleConfiguration.g.cs | 24 ++ ...ectara.Models.SearchCorporaParameters.g.cs | 24 ++ .../Vectara.Models.SearchReranker.g.cs | 60 +++++ ...ectara.Models.SessionInterruptedEvent.g.cs | 24 ++ .../Vectara.Models.SkillLoadEvent.g.cs | 24 ++ .../Vectara.Models.StepTransitionEvent.g.cs | 24 ++ ...dels.StepTransitionLimitExceededEvent.g.cs | 24 ++ ...ectara.Models.StepTransitionTraceSpan.g.cs | 24 ++ .../Vectara.Models.StructuredOutputEvent.g.cs | 24 ++ .../Vectara.Models.SubAgentTool.g.cs | 24 ++ ...els.SummarizeDocumentStreamedResponse.g.cs | 60 +++++ .../Vectara.Models.TestToolResponse.g.cs | 24 ++ .../Vectara.Models.ThinkingEvent.g.cs | 24 ++ .../Vectara.Models.ThinkingTraceSpan.g.cs | 24 ++ .../Generated/Vectara.Models.Tool.g.cs | 156 +++++++++++ .../Vectara.Models.ToolInputEvent.g.cs | 24 ++ .../Vectara.Models.ToolOutputEvent.g.cs | 24 ++ ...ctara.Models.UpdateInstructionRequest.g.cs | 12 + .../Vectara.Models.UpdateLLMRequest.g.cs | 48 ++++ ...Vectara.Models.UpdateOpenAILLMRequest.g.cs | 24 ++ ...odels.UpdateOpenAIResponsesLLMRequest.g.cs | 24 ++ .../Vectara.Models.UpdatePipelineSource.g.cs | 12 + ...ra.Models.UpdateS3SourceConfiguration.g.cs | 12 + .../Vectara.Models.UpdateToolRequest.g.cs | 24 ++ .../Vectara.Models.VertexAiAuth.g.cs | 24 ++ .../Generated/Vectara.Models.WebGetTool.g.cs | 24 ++ .../Vectara.Models.WebSearchTool.g.cs | 24 ++ .../Vectara/Generated/Vectara.OneOf.2.g.cs | 24 ++ .../Generated/Vectara.OptionsSupport.g.cs | 175 ++++++++++++ 105 files changed, 3638 insertions(+) diff --git a/src/libs/Vectara/Generated/Vectara.AllOf.2.g.cs b/src/libs/Vectara/Generated/Vectara.AllOf.2.g.cs index 880bbbf9..6c78f7f3 100644 --- a/src/libs/Vectara/Generated/Vectara.AllOf.2.g.cs +++ b/src/libs/Vectara/Generated/Vectara.AllOf.2.g.cs @@ -38,6 +38,13 @@ public bool TryPickValue1( return IsValue1; } + /// + /// + /// + public T1 PickValue1() => IsValue1 + ? Value1! + : throw new global::System.InvalidOperationException($"Expected union variant 'Value1' but the value was {ToString()}."); + /// /// /// @@ -67,6 +74,13 @@ public bool TryPickValue2( value = Value2; return IsValue2; } + + /// + /// + /// + public T2 PickValue2() => IsValue2 + ? Value2! + : throw new global::System.InvalidOperationException($"Expected union variant 'Value2' but the value was {ToString()}."); /// /// /// @@ -85,6 +99,11 @@ public AllOf(T1? value) Value1 = value; } + /// + /// + /// + public static AllOf FromValue1(T1? value) => new AllOf(value); + /// /// /// @@ -103,6 +122,11 @@ public AllOf(T2? value) Value2 = value; } + /// + /// + /// + public static AllOf FromValue2(T2? value) => new AllOf(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.AgentEvent.g.cs b/src/libs/Vectara/Generated/Vectara.Models.AgentEvent.g.cs index 46b56fd5..76a77c2e 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.AgentEvent.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.AgentEvent.g.cs @@ -44,6 +44,13 @@ public bool TryPickInputMessage( return IsInputMessage; } + /// + /// + /// + public global::Vectara.InputMessageEvent PickInputMessage() => IsInputMessage + ? InputMessage!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'InputMessage' but the value was {ToString()}."); + /// /// An event representing the loading of a skill's content into the conversation. /// @@ -74,6 +81,13 @@ public bool TryPickSkillLoad( return IsSkillLoad; } + /// + /// + /// + public global::Vectara.SkillLoadEvent PickSkillLoad() => IsSkillLoad + ? SkillLoad!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'SkillLoad' but the value was {ToString()}."); + /// /// Event representing files uploaded to the agent workspace as artifacts.
/// This event is created when users upload one or more files to an agent session using multipart requests. The event becomes part of the session's conversation history and contains references to all artifacts that were uploaded in the request. Each uploaded file is assigned a unique artifact identifier and stored in the session's workspace.
@@ -107,6 +121,13 @@ public bool TryPickArtifactUpload( return IsArtifactUpload; } + /// + /// + /// + public global::Vectara.ArtifactUploadEvent PickArtifactUpload() => IsArtifactUpload + ? ArtifactUpload!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'ArtifactUpload' but the value was {ToString()}."); + /// /// An event representing input to a tool call. /// @@ -137,6 +158,13 @@ public bool TryPickToolInput( return IsToolInput; } + /// + /// + /// + public global::Vectara.ToolInputEvent PickToolInput() => IsToolInput + ? ToolInput!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'ToolInput' but the value was {ToString()}."); + /// /// An event representing output from a tool call. /// @@ -167,6 +195,13 @@ public bool TryPickToolOutput( return IsToolOutput; } + /// + /// + /// + public global::Vectara.ToolOutputEvent PickToolOutput() => IsToolOutput + ? ToolOutput!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'ToolOutput' but the value was {ToString()}."); + /// /// An event representing chain-of-thought thinking by the agent. /// @@ -197,6 +232,13 @@ public bool TryPickThinking( return IsThinking; } + /// + /// + /// + public global::Vectara.ThinkingEvent PickThinking() => IsThinking + ? Thinking!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'Thinking' but the value was {ToString()}."); + /// /// An event representing a complete agent response. /// @@ -227,6 +269,13 @@ public bool TryPickAgentOutput( return IsAgentOutput; } + /// + /// + /// + public global::Vectara.AgentOutputEvent PickAgentOutput() => IsAgentOutput + ? AgentOutput!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'AgentOutput' 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
@@ -263,6 +312,13 @@ public bool TryPickStructuredOutput( return IsStructuredOutput; } + /// + /// + /// + public global::Vectara.StructuredOutputEvent PickStructuredOutput() => IsStructuredOutput + ? StructuredOutput!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'StructuredOutput' but the value was {ToString()}."); + /// /// A transient event indicating the current request exceeded the LLM's context limit.
/// This event is not persisted to the session history. @@ -294,6 +350,13 @@ public bool TryPickContextLimitExceeded( return IsContextLimitExceeded; } + /// + /// + /// + public global::Vectara.ContextLimitExceededEvent PickContextLimitExceeded() => IsContextLimitExceeded + ? ContextLimitExceeded!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'ContextLimitExceeded' but the value was {ToString()}."); + /// /// A transient event indicating the agent exceeded the maximum number of step transitions,
/// which may indicate an infinite loop between steps.
@@ -326,6 +389,13 @@ public bool TryPickStepTransitionLimitExceeded( return IsStepTransitionLimitExceeded; } + /// + /// + /// + public global::Vectara.StepTransitionLimitExceededEvent PickStepTransitionLimitExceeded() => IsStepTransitionLimitExceeded + ? StepTransitionLimitExceeded!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'StepTransitionLimitExceeded' but the value was {ToString()}."); + /// /// A transient event indicating the agent session was interrupted by a user request.
/// This event is not persisted to the session history. @@ -357,6 +427,13 @@ public bool TryPickSessionInterrupted( return IsSessionInterrupted; } + /// + /// + /// + public global::Vectara.SessionInterruptedEvent PickSessionInterrupted() => IsSessionInterrupted + ? SessionInterrupted!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'SessionInterrupted' but the value was {ToString()}."); + /// /// An event representing an image being loaded into the conversation context for viewing and analysis. /// @@ -387,6 +464,13 @@ public bool TryPickImageRead( return IsImageRead; } + /// + /// + /// + public global::Vectara.ImageReadEvent PickImageRead() => IsImageRead + ? ImageRead!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'ImageRead' but the value was {ToString()}."); + /// /// An event representing a transition between agent steps. /// @@ -417,6 +501,13 @@ public bool TryPickStepTransition( return IsStepTransition; } + /// + /// + /// + public global::Vectara.StepTransitionEvent PickStepTransition() => IsStepTransition + ? StepTransition!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'StepTransition' but the value was {ToString()}."); + /// /// An event indicating that context compaction has completed. /// @@ -446,6 +537,13 @@ public bool TryPickCompaction( value = Compaction; return IsCompaction; } + + /// + /// + /// + public global::Vectara.CompactionEvent PickCompaction() => IsCompaction + ? Compaction!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'Compaction' but the value was {ToString()}."); /// /// /// @@ -464,6 +562,11 @@ public AgentEvent(global::Vectara.InputMessageEvent? value) InputMessage = value; } + /// + /// + /// + public static AgentEvent FromInputMessage(global::Vectara.InputMessageEvent? value) => new AgentEvent(value); + /// /// /// @@ -482,6 +585,11 @@ public AgentEvent(global::Vectara.SkillLoadEvent? value) SkillLoad = value; } + /// + /// + /// + public static AgentEvent FromSkillLoad(global::Vectara.SkillLoadEvent? value) => new AgentEvent(value); + /// /// /// @@ -500,6 +608,11 @@ public AgentEvent(global::Vectara.ArtifactUploadEvent? value) ArtifactUpload = value; } + /// + /// + /// + public static AgentEvent FromArtifactUpload(global::Vectara.ArtifactUploadEvent? value) => new AgentEvent(value); + /// /// /// @@ -518,6 +631,11 @@ public AgentEvent(global::Vectara.ToolInputEvent? value) ToolInput = value; } + /// + /// + /// + public static AgentEvent FromToolInput(global::Vectara.ToolInputEvent? value) => new AgentEvent(value); + /// /// /// @@ -536,6 +654,11 @@ public AgentEvent(global::Vectara.ToolOutputEvent? value) ToolOutput = value; } + /// + /// + /// + public static AgentEvent FromToolOutput(global::Vectara.ToolOutputEvent? value) => new AgentEvent(value); + /// /// /// @@ -554,6 +677,11 @@ public AgentEvent(global::Vectara.ThinkingEvent? value) Thinking = value; } + /// + /// + /// + public static AgentEvent FromThinking(global::Vectara.ThinkingEvent? value) => new AgentEvent(value); + /// /// /// @@ -572,6 +700,11 @@ public AgentEvent(global::Vectara.AgentOutputEvent? value) AgentOutput = value; } + /// + /// + /// + public static AgentEvent FromAgentOutput(global::Vectara.AgentOutputEvent? value) => new AgentEvent(value); + /// /// /// @@ -590,6 +723,11 @@ public AgentEvent(global::Vectara.StructuredOutputEvent? value) StructuredOutput = value; } + /// + /// + /// + public static AgentEvent FromStructuredOutput(global::Vectara.StructuredOutputEvent? value) => new AgentEvent(value); + /// /// /// @@ -608,6 +746,11 @@ public AgentEvent(global::Vectara.ContextLimitExceededEvent? value) ContextLimitExceeded = value; } + /// + /// + /// + public static AgentEvent FromContextLimitExceeded(global::Vectara.ContextLimitExceededEvent? value) => new AgentEvent(value); + /// /// /// @@ -626,6 +769,11 @@ public AgentEvent(global::Vectara.StepTransitionLimitExceededEvent? value) StepTransitionLimitExceeded = value; } + /// + /// + /// + public static AgentEvent FromStepTransitionLimitExceeded(global::Vectara.StepTransitionLimitExceededEvent? value) => new AgentEvent(value); + /// /// /// @@ -644,6 +792,11 @@ public AgentEvent(global::Vectara.SessionInterruptedEvent? value) SessionInterrupted = value; } + /// + /// + /// + public static AgentEvent FromSessionInterrupted(global::Vectara.SessionInterruptedEvent? value) => new AgentEvent(value); + /// /// /// @@ -662,6 +815,11 @@ public AgentEvent(global::Vectara.ImageReadEvent? value) ImageRead = value; } + /// + /// + /// + public static AgentEvent FromImageRead(global::Vectara.ImageReadEvent? value) => new AgentEvent(value); + /// /// /// @@ -680,6 +838,11 @@ public AgentEvent(global::Vectara.StepTransitionEvent? value) StepTransition = value; } + /// + /// + /// + public static AgentEvent FromStepTransition(global::Vectara.StepTransitionEvent? value) => new AgentEvent(value); + /// /// /// @@ -698,6 +861,11 @@ public AgentEvent(global::Vectara.CompactionEvent? value) Compaction = value; } + /// + /// + /// + public static AgentEvent FromCompaction(global::Vectara.CompactionEvent? value) => new AgentEvent(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.AgentInput.g.cs b/src/libs/Vectara/Generated/Vectara.Models.AgentInput.g.cs index 9ca5d0da..0d9bc408 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.AgentInput.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.AgentInput.g.cs @@ -44,6 +44,13 @@ public bool TryPickText( return IsText; } + /// + /// + /// + public global::Vectara.AgentTextInput PickText() => IsText + ? Text! + : throw new global::System.InvalidOperationException($"Expected union variant 'Text' but the value was {ToString()}."); + /// /// An input that invokes a skill by name. /// @@ -73,6 +80,13 @@ public bool TryPickSkill( value = Skill; return IsSkill; } + + /// + /// + /// + public global::Vectara.AgentSkillInput PickSkill() => IsSkill + ? Skill! + : throw new global::System.InvalidOperationException($"Expected union variant 'Skill' but the value was {ToString()}."); /// /// /// @@ -91,6 +105,11 @@ public AgentInput(global::Vectara.AgentTextInput? value) Text = value; } + /// + /// + /// + public static AgentInput FromText(global::Vectara.AgentTextInput? value) => new AgentInput(value); + /// /// /// @@ -109,6 +128,11 @@ public AgentInput(global::Vectara.AgentSkillInput? value) Skill = value; } + /// + /// + /// + public static AgentInput FromSkill(global::Vectara.AgentSkillInput? value) => new AgentInput(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.AgentOutputEvent.g.cs b/src/libs/Vectara/Generated/Vectara.Models.AgentOutputEvent.g.cs index 98163772..5596e281 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.AgentOutputEvent.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.AgentOutputEvent.g.cs @@ -39,6 +39,13 @@ public bool TryPickBase( return IsBase; } + /// + /// + /// + public global::Vectara.AgentEventBase PickBase() => IsBase + ? Base! + : throw new global::System.InvalidOperationException($"Expected union variant 'Base' but the value was {ToString()}."); + /// /// /// @@ -68,6 +75,13 @@ public bool TryPickAgentOutputEventVariant2( value = AgentOutputEventVariant2; return IsAgentOutputEventVariant2; } + + /// + /// + /// + public global::Vectara.AgentOutputEventVariant2 PickAgentOutputEventVariant2() => IsAgentOutputEventVariant2 + ? AgentOutputEventVariant2! + : throw new global::System.InvalidOperationException($"Expected union variant 'AgentOutputEventVariant2' but the value was {ToString()}."); /// /// /// @@ -86,6 +100,11 @@ public AgentOutputEvent(global::Vectara.AgentEventBase? value) Base = value; } + /// + /// + /// + public static AgentOutputEvent FromBase(global::Vectara.AgentEventBase? value) => new AgentOutputEvent(value); + /// /// /// @@ -104,6 +123,11 @@ public AgentOutputEvent(global::Vectara.AgentOutputEventVariant2? value) AgentOutputEventVariant2 = value; } + /// + /// + /// + public static AgentOutputEvent FromAgentOutputEventVariant2(global::Vectara.AgentOutputEventVariant2? value) => new AgentOutputEvent(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.AgentOutputParser.g.cs b/src/libs/Vectara/Generated/Vectara.Models.AgentOutputParser.g.cs index ebbf9a70..8ad38e23 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.AgentOutputParser.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.AgentOutputParser.g.cs @@ -45,6 +45,13 @@ public bool TryPickDefault( return IsDefault; } + /// + /// + /// + public global::Vectara.DefaultOutputParser PickDefault() => IsDefault + ? Default! + : throw new global::System.InvalidOperationException($"Expected union variant 'Default' but the value was {ToString()}."); + /// /// Parses agent output as structured JSON conforming to a specified schema.
/// Uses the model's native structured outputs capability to guarantee valid JSON
@@ -84,6 +91,13 @@ public bool TryPickStructured( value = Structured; return IsStructured; } + + /// + /// + /// + public global::Vectara.StructuredOutputParser PickStructured() => IsStructured + ? Structured! + : throw new global::System.InvalidOperationException($"Expected union variant 'Structured' but the value was {ToString()}."); /// /// /// @@ -102,6 +116,11 @@ public AgentOutputParser(global::Vectara.DefaultOutputParser? value) Default = value; } + /// + /// + /// + public static AgentOutputParser FromDefault(global::Vectara.DefaultOutputParser? value) => new AgentOutputParser(value); + /// /// /// @@ -120,6 +139,11 @@ public AgentOutputParser(global::Vectara.StructuredOutputParser? value) Structured = value; } + /// + /// + /// + public static AgentOutputParser FromStructured(global::Vectara.StructuredOutputParser? value) => new AgentOutputParser(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.AgentStepInstruction.g.cs b/src/libs/Vectara/Generated/Vectara.Models.AgentStepInstruction.g.cs index d3c22e18..4813cc98 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.AgentStepInstruction.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.AgentStepInstruction.g.cs @@ -45,6 +45,13 @@ public bool TryPickReference( return IsReference; } + /// + /// + /// + public global::Vectara.ReferenceInstruction PickReference() => IsReference + ? Reference!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'Reference' but the value was {ToString()}."); + /// /// An instruction defined inline in the request. /// @@ -74,6 +81,13 @@ public bool TryPickInline( value = Inline; return IsInline; } + + /// + /// + /// + public global::Vectara.InlineInstruction PickInline() => IsInline + ? Inline!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'Inline' but the value was {ToString()}."); /// /// /// @@ -92,6 +106,11 @@ public AgentStepInstruction(global::Vectara.ReferenceInstruction? value) Reference = value; } + /// + /// + /// + public static AgentStepInstruction FromReference(global::Vectara.ReferenceInstruction? value) => new AgentStepInstruction(value); + /// /// /// @@ -110,6 +129,11 @@ public AgentStepInstruction(global::Vectara.InlineInstruction? value) Inline = value; } + /// + /// + /// + public static AgentStepInstruction FromInline(global::Vectara.InlineInstruction? value) => new AgentStepInstruction(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.AgentStepReminder.g.cs b/src/libs/Vectara/Generated/Vectara.Models.AgentStepReminder.g.cs index 5c4715ef..16c1247f 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.AgentStepReminder.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.AgentStepReminder.g.cs @@ -44,6 +44,13 @@ public bool TryPickTemplated( return IsTemplated; } + /// + /// + /// + public global::Vectara.TemplatedReminder PickTemplated() => IsTemplated + ? Templated! + : throw new global::System.InvalidOperationException($"Expected union variant 'Templated' but the value was {ToString()}."); + /// /// A reminder that expands terms, acronyms, and abbreviations in user messages using a glossary.
/// When attached to a step, user input is run through the glossary's lookup index and matching
@@ -75,6 +82,13 @@ public bool TryPickGlossaryExpansion( value = GlossaryExpansion; return IsGlossaryExpansion; } + + /// + /// + /// + public global::Vectara.GlossaryExpansionReminder PickGlossaryExpansion() => IsGlossaryExpansion + ? GlossaryExpansion! + : throw new global::System.InvalidOperationException($"Expected union variant 'GlossaryExpansion' but the value was {ToString()}."); /// /// /// @@ -93,6 +107,11 @@ public AgentStepReminder(global::Vectara.TemplatedReminder? value) Templated = value; } + /// + /// + /// + public static AgentStepReminder FromTemplated(global::Vectara.TemplatedReminder? value) => new AgentStepReminder(value); + /// /// /// @@ -111,6 +130,11 @@ public AgentStepReminder(global::Vectara.GlossaryExpansionReminder? value) GlossaryExpansion = value; } + /// + /// + /// + public static AgentStepReminder FromGlossaryExpansion(global::Vectara.GlossaryExpansionReminder? value) => new AgentStepReminder(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.AgentStreamedResponse.g.cs b/src/libs/Vectara/Generated/Vectara.Models.AgentStreamedResponse.g.cs index 6c7e4b8b..3b9e0c1f 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.AgentStreamedResponse.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.AgentStreamedResponse.g.cs @@ -44,6 +44,13 @@ public bool TryPickSkillLoad( return IsSkillLoad; } + /// + /// + /// + public global::Vectara.SkillLoadEvent PickSkillLoad() => IsSkillLoad + ? SkillLoad!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'SkillLoad' but the value was {ToString()}."); + /// /// An event representing chain-of-thought thinking by the agent. /// @@ -74,6 +81,13 @@ public bool TryPickThinking( return IsThinking; } + /// + /// + /// + public global::Vectara.ThinkingEvent PickThinking() => IsThinking + ? Thinking!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'Thinking' but the value was {ToString()}."); + /// /// Event representing files uploaded to the agent workspace as artifacts.
/// This event is created when users upload one or more files to an agent session using multipart requests. The event becomes part of the session's conversation history and contains references to all artifacts that were uploaded in the request. Each uploaded file is assigned a unique artifact identifier and stored in the session's workspace.
@@ -107,6 +121,13 @@ public bool TryPickArtifactUpload( return IsArtifactUpload; } + /// + /// + /// + public global::Vectara.ArtifactUploadEvent PickArtifactUpload() => IsArtifactUpload + ? ArtifactUpload!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'ArtifactUpload' but the value was {ToString()}."); + /// /// An input message event from a user. /// @@ -137,6 +158,13 @@ public bool TryPickInputMessage( return IsInputMessage; } + /// + /// + /// + public global::Vectara.InputMessageEvent PickInputMessage() => IsInputMessage + ? InputMessage!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'InputMessage' but the value was {ToString()}."); + /// /// A streaming chunk of agent output (SSE only, not stored). /// @@ -167,6 +195,13 @@ public bool TryPickStreamingAgentOutput( return IsStreamingAgentOutput; } + /// + /// + /// + public global::Vectara.StreamingAgentOutput PickStreamingAgentOutput() => IsStreamingAgentOutput + ? StreamingAgentOutput! + : throw new global::System.InvalidOperationException($"Expected union variant 'StreamingAgentOutput' but the value was {ToString()}."); + /// /// Signals the end of streaming agent output (SSE only, not stored). /// @@ -197,6 +232,13 @@ public bool TryPickStreamingAgentOutputEnd( return IsStreamingAgentOutputEnd; } + /// + /// + /// + public global::Vectara.StreamingAgentOutputEnd PickStreamingAgentOutputEnd() => IsStreamingAgentOutputEnd + ? StreamingAgentOutputEnd! + : throw new global::System.InvalidOperationException($"Expected union variant 'StreamingAgentOutputEnd' but the value was {ToString()}."); + /// /// A streaming chunk of agent thinking (SSE only, not stored). /// @@ -227,6 +269,13 @@ public bool TryPickStreamingThinking( return IsStreamingThinking; } + /// + /// + /// + public global::Vectara.StreamingThinking PickStreamingThinking() => IsStreamingThinking + ? StreamingThinking! + : throw new global::System.InvalidOperationException($"Expected union variant 'StreamingThinking' but the value was {ToString()}."); + /// /// Signals the end of streaming thinking (SSE only, not stored). /// @@ -257,6 +306,13 @@ public bool TryPickStreamingThinkingEnd( return IsStreamingThinkingEnd; } + /// + /// + /// + public global::Vectara.StreamingThinkingEnd PickStreamingThinkingEnd() => IsStreamingThinkingEnd + ? StreamingThinkingEnd! + : throw new global::System.InvalidOperationException($"Expected union variant 'StreamingThinkingEnd' but the value was {ToString()}."); + /// /// An event representing input to a tool call. /// @@ -287,6 +343,13 @@ public bool TryPickToolInput( return IsToolInput; } + /// + /// + /// + public global::Vectara.ToolInputEvent PickToolInput() => IsToolInput + ? ToolInput!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'ToolInput' but the value was {ToString()}."); + /// /// An event representing output from a tool call. /// @@ -317,6 +380,13 @@ public bool TryPickToolOutput( return IsToolOutput; } + /// + /// + /// + public global::Vectara.ToolOutputEvent PickToolOutput() => IsToolOutput + ? ToolOutput!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'ToolOutput' 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
@@ -353,6 +423,13 @@ public bool TryPickStructuredOutput( return IsStructuredOutput; } + /// + /// + /// + public global::Vectara.StructuredOutputEvent PickStructuredOutput() => IsStructuredOutput + ? StructuredOutput!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'StructuredOutput' but the value was {ToString()}."); + /// /// A transient event indicating the current request exceeded the LLM's context limit.
/// This event is not persisted to the session history. @@ -384,6 +461,13 @@ public bool TryPickContextLimitExceeded( return IsContextLimitExceeded; } + /// + /// + /// + public global::Vectara.ContextLimitExceededEvent PickContextLimitExceeded() => IsContextLimitExceeded + ? ContextLimitExceeded!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'ContextLimitExceeded' but the value was {ToString()}."); + /// /// A transient event indicating the agent exceeded the maximum number of step transitions,
/// which may indicate an infinite loop between steps.
@@ -416,6 +500,13 @@ public bool TryPickStepTransitionLimitExceeded( return IsStepTransitionLimitExceeded; } + /// + /// + /// + public global::Vectara.StepTransitionLimitExceededEvent PickStepTransitionLimitExceeded() => IsStepTransitionLimitExceeded + ? StepTransitionLimitExceeded!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'StepTransitionLimitExceeded' but the value was {ToString()}."); + /// /// A transient event indicating the agent session was interrupted by a user request.
/// This event is not persisted to the session history. @@ -447,6 +538,13 @@ public bool TryPickSessionInterrupted( return IsSessionInterrupted; } + /// + /// + /// + public global::Vectara.SessionInterruptedEvent PickSessionInterrupted() => IsSessionInterrupted + ? SessionInterrupted!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'SessionInterrupted' but the value was {ToString()}."); + /// /// An event representing an image being loaded into the conversation context for viewing and analysis. /// @@ -477,6 +575,13 @@ public bool TryPickImageRead( return IsImageRead; } + /// + /// + /// + public global::Vectara.ImageReadEvent PickImageRead() => IsImageRead + ? ImageRead!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'ImageRead' but the value was {ToString()}."); + /// /// An event representing a transition between agent steps. /// @@ -507,6 +612,13 @@ public bool TryPickStepTransition( return IsStepTransition; } + /// + /// + /// + public global::Vectara.StepTransitionEvent PickStepTransition() => IsStepTransition + ? StepTransition!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'StepTransition' but the value was {ToString()}."); + /// /// Token usage event reporting context window consumption. /// @@ -537,6 +649,13 @@ public bool TryPickContextConsumed( return IsContextConsumed; } + /// + /// + /// + public global::Vectara.ContextConsumedEvent PickContextConsumed() => IsContextConsumed + ? ContextConsumed! + : throw new global::System.InvalidOperationException($"Expected union variant 'ContextConsumed' but the value was {ToString()}."); + /// /// An event indicating that context compaction has started. /// @@ -567,6 +686,13 @@ public bool TryPickCompactionStarted( return IsCompactionStarted; } + /// + /// + /// + public global::Vectara.CompactionStartedEvent PickCompactionStarted() => IsCompactionStarted + ? CompactionStarted!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'CompactionStarted' but the value was {ToString()}."); + /// /// An event indicating that context compaction has completed. /// @@ -597,6 +723,13 @@ public bool TryPickCompaction( return IsCompaction; } + /// + /// + /// + public global::Vectara.CompactionEvent PickCompaction() => IsCompaction + ? Compaction!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'Compaction' but the value was {ToString()}."); + /// /// Event signaling there was an error with the request. /// @@ -627,6 +760,13 @@ public bool TryPickError( return IsError; } + /// + /// + /// + public global::Vectara.StreamError PickError() => IsError + ? Error! + : throw new global::System.InvalidOperationException($"Expected union variant 'Error' but the value was {ToString()}."); + /// /// The end of a query response stream. /// @@ -656,6 +796,13 @@ public bool TryPickEnd( value = End; return IsEnd; } + + /// + /// + /// + public global::Vectara.StreamResponseEnd PickEnd() => IsEnd + ? End! + : throw new global::System.InvalidOperationException($"Expected union variant 'End' but the value was {ToString()}."); /// /// /// @@ -674,6 +821,11 @@ public AgentStreamedResponse(global::Vectara.SkillLoadEvent? value) SkillLoad = value; } + /// + /// + /// + public static AgentStreamedResponse FromSkillLoad(global::Vectara.SkillLoadEvent? value) => new AgentStreamedResponse(value); + /// /// /// @@ -692,6 +844,11 @@ public AgentStreamedResponse(global::Vectara.ThinkingEvent? value) Thinking = value; } + /// + /// + /// + public static AgentStreamedResponse FromThinking(global::Vectara.ThinkingEvent? value) => new AgentStreamedResponse(value); + /// /// /// @@ -710,6 +867,11 @@ public AgentStreamedResponse(global::Vectara.ArtifactUploadEvent? value) ArtifactUpload = value; } + /// + /// + /// + public static AgentStreamedResponse FromArtifactUpload(global::Vectara.ArtifactUploadEvent? value) => new AgentStreamedResponse(value); + /// /// /// @@ -728,6 +890,11 @@ public AgentStreamedResponse(global::Vectara.InputMessageEvent? value) InputMessage = value; } + /// + /// + /// + public static AgentStreamedResponse FromInputMessage(global::Vectara.InputMessageEvent? value) => new AgentStreamedResponse(value); + /// /// /// @@ -746,6 +913,11 @@ public AgentStreamedResponse(global::Vectara.StreamingAgentOutput? value) StreamingAgentOutput = value; } + /// + /// + /// + public static AgentStreamedResponse FromStreamingAgentOutput(global::Vectara.StreamingAgentOutput? value) => new AgentStreamedResponse(value); + /// /// /// @@ -764,6 +936,11 @@ public AgentStreamedResponse(global::Vectara.StreamingAgentOutputEnd? value) StreamingAgentOutputEnd = value; } + /// + /// + /// + public static AgentStreamedResponse FromStreamingAgentOutputEnd(global::Vectara.StreamingAgentOutputEnd? value) => new AgentStreamedResponse(value); + /// /// /// @@ -782,6 +959,11 @@ public AgentStreamedResponse(global::Vectara.StreamingThinking? value) StreamingThinking = value; } + /// + /// + /// + public static AgentStreamedResponse FromStreamingThinking(global::Vectara.StreamingThinking? value) => new AgentStreamedResponse(value); + /// /// /// @@ -800,6 +982,11 @@ public AgentStreamedResponse(global::Vectara.StreamingThinkingEnd? value) StreamingThinkingEnd = value; } + /// + /// + /// + public static AgentStreamedResponse FromStreamingThinkingEnd(global::Vectara.StreamingThinkingEnd? value) => new AgentStreamedResponse(value); + /// /// /// @@ -818,6 +1005,11 @@ public AgentStreamedResponse(global::Vectara.ToolInputEvent? value) ToolInput = value; } + /// + /// + /// + public static AgentStreamedResponse FromToolInput(global::Vectara.ToolInputEvent? value) => new AgentStreamedResponse(value); + /// /// /// @@ -836,6 +1028,11 @@ public AgentStreamedResponse(global::Vectara.ToolOutputEvent? value) ToolOutput = value; } + /// + /// + /// + public static AgentStreamedResponse FromToolOutput(global::Vectara.ToolOutputEvent? value) => new AgentStreamedResponse(value); + /// /// /// @@ -854,6 +1051,11 @@ public AgentStreamedResponse(global::Vectara.StructuredOutputEvent? value) StructuredOutput = value; } + /// + /// + /// + public static AgentStreamedResponse FromStructuredOutput(global::Vectara.StructuredOutputEvent? value) => new AgentStreamedResponse(value); + /// /// /// @@ -872,6 +1074,11 @@ public AgentStreamedResponse(global::Vectara.ContextLimitExceededEvent? value) ContextLimitExceeded = value; } + /// + /// + /// + public static AgentStreamedResponse FromContextLimitExceeded(global::Vectara.ContextLimitExceededEvent? value) => new AgentStreamedResponse(value); + /// /// /// @@ -890,6 +1097,11 @@ public AgentStreamedResponse(global::Vectara.StepTransitionLimitExceededEvent? v StepTransitionLimitExceeded = value; } + /// + /// + /// + public static AgentStreamedResponse FromStepTransitionLimitExceeded(global::Vectara.StepTransitionLimitExceededEvent? value) => new AgentStreamedResponse(value); + /// /// /// @@ -908,6 +1120,11 @@ public AgentStreamedResponse(global::Vectara.SessionInterruptedEvent? value) SessionInterrupted = value; } + /// + /// + /// + public static AgentStreamedResponse FromSessionInterrupted(global::Vectara.SessionInterruptedEvent? value) => new AgentStreamedResponse(value); + /// /// /// @@ -926,6 +1143,11 @@ public AgentStreamedResponse(global::Vectara.ImageReadEvent? value) ImageRead = value; } + /// + /// + /// + public static AgentStreamedResponse FromImageRead(global::Vectara.ImageReadEvent? value) => new AgentStreamedResponse(value); + /// /// /// @@ -944,6 +1166,11 @@ public AgentStreamedResponse(global::Vectara.StepTransitionEvent? value) StepTransition = value; } + /// + /// + /// + public static AgentStreamedResponse FromStepTransition(global::Vectara.StepTransitionEvent? value) => new AgentStreamedResponse(value); + /// /// /// @@ -962,6 +1189,11 @@ public AgentStreamedResponse(global::Vectara.ContextConsumedEvent? value) ContextConsumed = value; } + /// + /// + /// + public static AgentStreamedResponse FromContextConsumed(global::Vectara.ContextConsumedEvent? value) => new AgentStreamedResponse(value); + /// /// /// @@ -980,6 +1212,11 @@ public AgentStreamedResponse(global::Vectara.CompactionStartedEvent? value) CompactionStarted = value; } + /// + /// + /// + public static AgentStreamedResponse FromCompactionStarted(global::Vectara.CompactionStartedEvent? value) => new AgentStreamedResponse(value); + /// /// /// @@ -998,6 +1235,11 @@ public AgentStreamedResponse(global::Vectara.CompactionEvent? value) Compaction = value; } + /// + /// + /// + public static AgentStreamedResponse FromCompaction(global::Vectara.CompactionEvent? value) => new AgentStreamedResponse(value); + /// /// /// @@ -1016,6 +1258,11 @@ public AgentStreamedResponse(global::Vectara.StreamError? value) Error = value; } + /// + /// + /// + public static AgentStreamedResponse FromError(global::Vectara.StreamError? value) => new AgentStreamedResponse(value); + /// /// /// @@ -1034,6 +1281,11 @@ public AgentStreamedResponse(global::Vectara.StreamResponseEnd? value) End = value; } + /// + /// + /// + public static AgentStreamedResponse FromEnd(global::Vectara.StreamResponseEnd? value) => new AgentStreamedResponse(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.AgentToolConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.Models.AgentToolConfiguration.g.cs index fe3cfc83..f0c96b12 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.AgentToolConfiguration.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.AgentToolConfiguration.g.cs @@ -45,6 +45,13 @@ public bool TryPickDynamicVectara( return IsDynamicVectara; } + /// + /// + /// + public global::Vectara.InlineDynamicVectaraToolConfiguration PickDynamicVectara() => IsDynamicVectara + ? DynamicVectara!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'DynamicVectara' but the value was {ToString()}."); + /// /// An MCP tool configuration defined inline in the agent. /// @@ -75,6 +82,13 @@ public bool TryPickMcp( return IsMcp; } + /// + /// + /// + public global::Vectara.InlineMcpToolConfiguration PickMcp() => IsMcp + ? Mcp!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'Mcp' but the value was {ToString()}."); + /// /// A corpora search tool configuration defined inline in the agent. /// @@ -105,6 +119,13 @@ public bool TryPickCorporaSearch( return IsCorporaSearch; } + /// + /// + /// + public global::Vectara.InlineCorporaSearchToolConfiguration PickCorporaSearch() => IsCorporaSearch + ? CorporaSearch!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'CorporaSearch' but the value was {ToString()}."); + /// /// A web search tool configuration defined inline in the agent. /// @@ -135,6 +156,13 @@ public bool TryPickWebSearch( return IsWebSearch; } + /// + /// + /// + public global::Vectara.InlineWebSearchToolConfiguration PickWebSearch() => IsWebSearch + ? WebSearch!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'WebSearch' but the value was {ToString()}."); + /// /// A web get tool configuration defined inline in the agent for fetching content from URLs. /// @@ -165,6 +193,13 @@ public bool TryPickWebGet( return IsWebGet; } + /// + /// + /// + public global::Vectara.InlineWebGetToolConfiguration PickWebGet() => IsWebGet + ? WebGet!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'WebGet' but the value was {ToString()}."); + /// /// A lambda tool configuration defined inline in the agent for executing user-defined functions. /// @@ -195,6 +230,13 @@ public bool TryPickLambda( return IsLambda; } + /// + /// + /// + public global::Vectara.InlineLambdaToolConfiguration PickLambda() => IsLambda + ? Lambda!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'Lambda' but the value was {ToString()}."); + /// /// A sub-agent tool configuration defined inline in the agent for invoking specialized sub-agents. /// @@ -225,6 +267,13 @@ public bool TryPickSubAgent( return IsSubAgent; } + /// + /// + /// + public global::Vectara.InlineSubAgentToolConfiguration PickSubAgent() => IsSubAgent + ? SubAgent!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'SubAgent' but the value was {ToString()}."); + /// /// An artifact create tool configuration defined inline in the agent for creating artifacts on-the-fly from text or structured data content. /// @@ -255,6 +304,13 @@ public bool TryPickArtifactCreate( return IsArtifactCreate; } + /// + /// + /// + public global::Vectara.InlineArtifactCreateToolConfiguration PickArtifactCreate() => IsArtifactCreate + ? ArtifactCreate!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'ArtifactCreate' but the value was {ToString()}."); + /// /// An artifact read tool configuration defined inline in the agent for reading artifacts from the session workspace. /// @@ -285,6 +341,13 @@ public bool TryPickArtifactRead( return IsArtifactRead; } + /// + /// + /// + public global::Vectara.InlineArtifactReadToolConfiguration PickArtifactRead() => IsArtifactRead + ? ArtifactRead!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'ArtifactRead' but the value was {ToString()}."); + /// /// An artifact grep tool configuration defined inline in the agent for searching through artifact content. /// @@ -315,6 +378,13 @@ public bool TryPickArtifactGrep( return IsArtifactGrep; } + /// + /// + /// + public global::Vectara.InlineArtifactGrepToolConfiguration PickArtifactGrep() => IsArtifactGrep + ? ArtifactGrep!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'ArtifactGrep' but the value was {ToString()}."); + /// /// An image read tool configuration defined inline in the agent for loading images into the conversation context. /// @@ -345,6 +415,13 @@ public bool TryPickImageRead( return IsImageRead; } + /// + /// + /// + public global::Vectara.InlineImageReadToolConfiguration PickImageRead() => IsImageRead + ? ImageRead!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'ImageRead' but the value was {ToString()}."); + /// /// A document conversion tool configuration defined inline in the agent for converting document artifacts to various formats. /// @@ -375,6 +452,13 @@ public bool TryPickDocumentConversion( return IsDocumentConversion; } + /// + /// + /// + public global::Vectara.InlineDocumentConversionToolConfiguration PickDocumentConversion() => IsDocumentConversion + ? DocumentConversion!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'DocumentConversion' but the value was {ToString()}."); + /// /// A get document text tool configuration defined inline in the agent for fetching document text content from a corpus. /// @@ -404,6 +488,13 @@ public bool TryPickGetDocumentText( value = GetDocumentText; return IsGetDocumentText; } + + /// + /// + /// + public global::Vectara.InlineGetDocumentTextToolConfiguration PickGetDocumentText() => IsGetDocumentText + ? GetDocumentText!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'GetDocumentText' but the value was {ToString()}."); /// /// /// @@ -422,6 +513,11 @@ public AgentToolConfiguration(global::Vectara.InlineDynamicVectaraToolConfigurat DynamicVectara = value; } + /// + /// + /// + public static AgentToolConfiguration FromDynamicVectara(global::Vectara.InlineDynamicVectaraToolConfiguration? value) => new AgentToolConfiguration(value); + /// /// /// @@ -440,6 +536,11 @@ public AgentToolConfiguration(global::Vectara.InlineMcpToolConfiguration? value) Mcp = value; } + /// + /// + /// + public static AgentToolConfiguration FromMcp(global::Vectara.InlineMcpToolConfiguration? value) => new AgentToolConfiguration(value); + /// /// /// @@ -458,6 +559,11 @@ public AgentToolConfiguration(global::Vectara.InlineCorporaSearchToolConfigurati CorporaSearch = value; } + /// + /// + /// + public static AgentToolConfiguration FromCorporaSearch(global::Vectara.InlineCorporaSearchToolConfiguration? value) => new AgentToolConfiguration(value); + /// /// /// @@ -476,6 +582,11 @@ public AgentToolConfiguration(global::Vectara.InlineWebSearchToolConfiguration? WebSearch = value; } + /// + /// + /// + public static AgentToolConfiguration FromWebSearch(global::Vectara.InlineWebSearchToolConfiguration? value) => new AgentToolConfiguration(value); + /// /// /// @@ -494,6 +605,11 @@ public AgentToolConfiguration(global::Vectara.InlineWebGetToolConfiguration? val WebGet = value; } + /// + /// + /// + public static AgentToolConfiguration FromWebGet(global::Vectara.InlineWebGetToolConfiguration? value) => new AgentToolConfiguration(value); + /// /// /// @@ -512,6 +628,11 @@ public AgentToolConfiguration(global::Vectara.InlineLambdaToolConfiguration? val Lambda = value; } + /// + /// + /// + public static AgentToolConfiguration FromLambda(global::Vectara.InlineLambdaToolConfiguration? value) => new AgentToolConfiguration(value); + /// /// /// @@ -530,6 +651,11 @@ public AgentToolConfiguration(global::Vectara.InlineSubAgentToolConfiguration? v SubAgent = value; } + /// + /// + /// + public static AgentToolConfiguration FromSubAgent(global::Vectara.InlineSubAgentToolConfiguration? value) => new AgentToolConfiguration(value); + /// /// /// @@ -548,6 +674,11 @@ public AgentToolConfiguration(global::Vectara.InlineArtifactCreateToolConfigurat ArtifactCreate = value; } + /// + /// + /// + public static AgentToolConfiguration FromArtifactCreate(global::Vectara.InlineArtifactCreateToolConfiguration? value) => new AgentToolConfiguration(value); + /// /// /// @@ -566,6 +697,11 @@ public AgentToolConfiguration(global::Vectara.InlineArtifactReadToolConfiguratio ArtifactRead = value; } + /// + /// + /// + public static AgentToolConfiguration FromArtifactRead(global::Vectara.InlineArtifactReadToolConfiguration? value) => new AgentToolConfiguration(value); + /// /// /// @@ -584,6 +720,11 @@ public AgentToolConfiguration(global::Vectara.InlineArtifactGrepToolConfiguratio ArtifactGrep = value; } + /// + /// + /// + public static AgentToolConfiguration FromArtifactGrep(global::Vectara.InlineArtifactGrepToolConfiguration? value) => new AgentToolConfiguration(value); + /// /// /// @@ -602,6 +743,11 @@ public AgentToolConfiguration(global::Vectara.InlineImageReadToolConfiguration? ImageRead = value; } + /// + /// + /// + public static AgentToolConfiguration FromImageRead(global::Vectara.InlineImageReadToolConfiguration? value) => new AgentToolConfiguration(value); + /// /// /// @@ -620,6 +766,11 @@ public AgentToolConfiguration(global::Vectara.InlineDocumentConversionToolConfig DocumentConversion = value; } + /// + /// + /// + public static AgentToolConfiguration FromDocumentConversion(global::Vectara.InlineDocumentConversionToolConfiguration? value) => new AgentToolConfiguration(value); + /// /// /// @@ -638,6 +789,11 @@ public AgentToolConfiguration(global::Vectara.InlineGetDocumentTextToolConfigura GetDocumentText = value; } + /// + /// + /// + public static AgentToolConfiguration FromGetDocumentText(global::Vectara.InlineGetDocumentTextToolConfiguration? value) => new AgentToolConfiguration(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.AgentTraceSpan.g.cs b/src/libs/Vectara/Generated/Vectara.Models.AgentTraceSpan.g.cs index 578e2e55..1f7259f5 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.AgentTraceSpan.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.AgentTraceSpan.g.cs @@ -44,6 +44,13 @@ public bool TryPickInvokeAgent( return IsInvokeAgent; } + /// + /// + /// + public global::Vectara.InvokeAgentTraceSpan PickInvokeAgent() => IsInvokeAgent + ? InvokeAgent!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'InvokeAgent' but the value was {ToString()}."); + /// /// A span representing a single LLM chat completion call within an agent turn. /// @@ -74,6 +81,13 @@ public bool TryPickChat( return IsChat; } + /// + /// + /// + public global::Vectara.ChatTraceSpan PickChat() => IsChat + ? Chat!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'Chat' but the value was {ToString()}."); + /// /// A span representing a tool execution within an agent turn. /// @@ -104,6 +118,13 @@ public bool TryPickExecuteTool( return IsExecuteTool; } + /// + /// + /// + public global::Vectara.ExecuteToolTraceSpan PickExecuteTool() => IsExecuteTool + ? ExecuteTool!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'ExecuteTool' but the value was {ToString()}."); + /// /// A span representing extended thinking output from the LLM. /// @@ -134,6 +155,13 @@ public bool TryPickThinking( return IsThinking; } + /// + /// + /// + public global::Vectara.ThinkingTraceSpan PickThinking() => IsThinking + ? Thinking!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'Thinking' but the value was {ToString()}."); + /// /// A span representing the final text output of an agent turn. /// @@ -164,6 +192,13 @@ public bool TryPickOutput( return IsOutput; } + /// + /// + /// + public global::Vectara.OutputTraceSpan PickOutput() => IsOutput + ? Output!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'Output' but the value was {ToString()}."); + /// /// A span representing a guardrail safety check on tool call results. /// @@ -194,6 +229,13 @@ public bool TryPickGuardrail( return IsGuardrail; } + /// + /// + /// + public global::Vectara.GuardrailTraceSpan PickGuardrail() => IsGuardrail + ? Guardrail!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'Guardrail' but the value was {ToString()}."); + /// /// A span representing a transition between agent steps. /// @@ -224,6 +266,13 @@ public bool TryPickStepTransition( return IsStepTransition; } + /// + /// + /// + public global::Vectara.StepTransitionTraceSpan PickStepTransition() => IsStepTransition + ? StepTransition!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'StepTransition' but the value was {ToString()}."); + /// /// A span representing an image being loaded into conversation context. /// @@ -254,6 +303,13 @@ public bool TryPickImageRead( return IsImageRead; } + /// + /// + /// + public global::Vectara.ImageReadTraceSpan PickImageRead() => IsImageRead + ? ImageRead!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'ImageRead' but the value was {ToString()}."); + /// /// A span representing context compaction (summarization of older conversation turns). /// @@ -283,6 +339,13 @@ public bool TryPickCompaction( value = Compaction; return IsCompaction; } + + /// + /// + /// + public global::Vectara.CompactionTraceSpan PickCompaction() => IsCompaction + ? Compaction!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'Compaction' but the value was {ToString()}."); /// /// /// @@ -301,6 +364,11 @@ public AgentTraceSpan(global::Vectara.InvokeAgentTraceSpan? value) InvokeAgent = value; } + /// + /// + /// + public static AgentTraceSpan FromInvokeAgent(global::Vectara.InvokeAgentTraceSpan? value) => new AgentTraceSpan(value); + /// /// /// @@ -319,6 +387,11 @@ public AgentTraceSpan(global::Vectara.ChatTraceSpan? value) Chat = value; } + /// + /// + /// + public static AgentTraceSpan FromChat(global::Vectara.ChatTraceSpan? value) => new AgentTraceSpan(value); + /// /// /// @@ -337,6 +410,11 @@ public AgentTraceSpan(global::Vectara.ExecuteToolTraceSpan? value) ExecuteTool = value; } + /// + /// + /// + public static AgentTraceSpan FromExecuteTool(global::Vectara.ExecuteToolTraceSpan? value) => new AgentTraceSpan(value); + /// /// /// @@ -355,6 +433,11 @@ public AgentTraceSpan(global::Vectara.ThinkingTraceSpan? value) Thinking = value; } + /// + /// + /// + public static AgentTraceSpan FromThinking(global::Vectara.ThinkingTraceSpan? value) => new AgentTraceSpan(value); + /// /// /// @@ -373,6 +456,11 @@ public AgentTraceSpan(global::Vectara.OutputTraceSpan? value) Output = value; } + /// + /// + /// + public static AgentTraceSpan FromOutput(global::Vectara.OutputTraceSpan? value) => new AgentTraceSpan(value); + /// /// /// @@ -391,6 +479,11 @@ public AgentTraceSpan(global::Vectara.GuardrailTraceSpan? value) Guardrail = value; } + /// + /// + /// + public static AgentTraceSpan FromGuardrail(global::Vectara.GuardrailTraceSpan? value) => new AgentTraceSpan(value); + /// /// /// @@ -409,6 +502,11 @@ public AgentTraceSpan(global::Vectara.StepTransitionTraceSpan? value) StepTransition = value; } + /// + /// + /// + public static AgentTraceSpan FromStepTransition(global::Vectara.StepTransitionTraceSpan? value) => new AgentTraceSpan(value); + /// /// /// @@ -427,6 +525,11 @@ public AgentTraceSpan(global::Vectara.ImageReadTraceSpan? value) ImageRead = value; } + /// + /// + /// + public static AgentTraceSpan FromImageRead(global::Vectara.ImageReadTraceSpan? value) => new AgentTraceSpan(value); + /// /// /// @@ -445,6 +548,11 @@ public AgentTraceSpan(global::Vectara.CompactionTraceSpan? value) Compaction = value; } + /// + /// + /// + public static AgentTraceSpan FromCompaction(global::Vectara.CompactionTraceSpan? value) => new AgentTraceSpan(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.AnthropicAuth.g.cs b/src/libs/Vectara/Generated/Vectara.Models.AnthropicAuth.g.cs index 1072d9c8..25e37730 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.AnthropicAuth.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.AnthropicAuth.g.cs @@ -44,6 +44,13 @@ public bool TryPickBearer( return IsBearer; } + /// + /// + /// + public global::Vectara.BearerAuth PickBearer() => IsBearer + ? Bearer! + : throw new global::System.InvalidOperationException($"Expected union variant 'Bearer' but the value was {ToString()}."); + /// /// Custom header-based authentication /// @@ -74,6 +81,13 @@ public bool TryPickHeader( return IsHeader; } + /// + /// + /// + public global::Vectara.HeaderAuth PickHeader() => IsHeader + ? Header! + : throw new global::System.InvalidOperationException($"Expected union variant 'Header' but the value was {ToString()}."); + /// /// AWS Bedrock authentication with explicit IAM credentials /// @@ -104,6 +118,13 @@ public bool TryPickBedrockStaticIam( return IsBedrockStaticIam; } + /// + /// + /// + public global::Vectara.BedrockStaticIAMAuth PickBedrockStaticIam() => IsBedrockStaticIam + ? BedrockStaticIam! + : throw new global::System.InvalidOperationException($"Expected union variant 'BedrockStaticIam' but the value was {ToString()}."); + /// /// AWS Bedrock API key authentication /// @@ -134,6 +155,13 @@ public bool TryPickBedrockApiKey( return IsBedrockApiKey; } + /// + /// + /// + public global::Vectara.BedrockApiKeyAuth PickBedrockApiKey() => IsBedrockApiKey + ? BedrockApiKey! + : throw new global::System.InvalidOperationException($"Expected union variant 'BedrockApiKey' but the value was {ToString()}."); + /// /// Google Cloud Vertex AI service account authentication /// @@ -164,6 +192,13 @@ public bool TryPickVertexServiceAccount( return IsVertexServiceAccount; } + /// + /// + /// + public global::Vectara.VertexServiceAccountAuth PickVertexServiceAccount() => IsVertexServiceAccount + ? VertexServiceAccount! + : throw new global::System.InvalidOperationException($"Expected union variant 'VertexServiceAccount' but the value was {ToString()}."); + /// /// Google Cloud Vertex AI access token authentication /// @@ -193,6 +228,13 @@ public bool TryPickVertexAccessToken( value = VertexAccessToken; return IsVertexAccessToken; } + + /// + /// + /// + public global::Vectara.VertexAccessTokenAuth PickVertexAccessToken() => IsVertexAccessToken + ? VertexAccessToken! + : throw new global::System.InvalidOperationException($"Expected union variant 'VertexAccessToken' but the value was {ToString()}."); /// /// /// @@ -211,6 +253,11 @@ public AnthropicAuth(global::Vectara.BearerAuth? value) Bearer = value; } + /// + /// + /// + public static AnthropicAuth FromBearer(global::Vectara.BearerAuth? value) => new AnthropicAuth(value); + /// /// /// @@ -229,6 +276,11 @@ public AnthropicAuth(global::Vectara.HeaderAuth? value) Header = value; } + /// + /// + /// + public static AnthropicAuth FromHeader(global::Vectara.HeaderAuth? value) => new AnthropicAuth(value); + /// /// /// @@ -247,6 +299,11 @@ public AnthropicAuth(global::Vectara.BedrockStaticIAMAuth? value) BedrockStaticIam = value; } + /// + /// + /// + public static AnthropicAuth FromBedrockStaticIam(global::Vectara.BedrockStaticIAMAuth? value) => new AnthropicAuth(value); + /// /// /// @@ -265,6 +322,11 @@ public AnthropicAuth(global::Vectara.BedrockApiKeyAuth? value) BedrockApiKey = value; } + /// + /// + /// + public static AnthropicAuth FromBedrockApiKey(global::Vectara.BedrockApiKeyAuth? value) => new AnthropicAuth(value); + /// /// /// @@ -283,6 +345,11 @@ public AnthropicAuth(global::Vectara.VertexServiceAccountAuth? value) VertexServiceAccount = value; } + /// + /// + /// + public static AnthropicAuth FromVertexServiceAccount(global::Vectara.VertexServiceAccountAuth? value) => new AnthropicAuth(value); + /// /// /// @@ -301,6 +368,11 @@ public AnthropicAuth(global::Vectara.VertexAccessTokenAuth? value) VertexAccessToken = value; } + /// + /// + /// + public static AnthropicAuth FromVertexAccessToken(global::Vectara.VertexAccessTokenAuth? value) => new AnthropicAuth(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.ArtifactCreateTool.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ArtifactCreateTool.g.cs index 3b6d3795..f4930e7b 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.ArtifactCreateTool.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.ArtifactCreateTool.g.cs @@ -39,6 +39,13 @@ public bool TryPickBase( return IsBase; } + /// + /// + /// + public global::Vectara.ToolBase PickBase() => IsBase + ? Base! + : throw new global::System.InvalidOperationException($"Expected union variant 'Base' but the value was {ToString()}."); + /// /// /// @@ -68,6 +75,13 @@ public bool TryPickArtifactCreateToolVariant2( value = ArtifactCreateToolVariant2; return IsArtifactCreateToolVariant2; } + + /// + /// + /// + public global::Vectara.ArtifactCreateToolVariant2 PickArtifactCreateToolVariant2() => IsArtifactCreateToolVariant2 + ? ArtifactCreateToolVariant2! + : throw new global::System.InvalidOperationException($"Expected union variant 'ArtifactCreateToolVariant2' but the value was {ToString()}."); /// /// /// @@ -86,6 +100,11 @@ public ArtifactCreateTool(global::Vectara.ToolBase? value) Base = value; } + /// + /// + /// + public static ArtifactCreateTool FromBase(global::Vectara.ToolBase? value) => new ArtifactCreateTool(value); + /// /// /// @@ -104,6 +123,11 @@ public ArtifactCreateTool(global::Vectara.ArtifactCreateToolVariant2? value) ArtifactCreateToolVariant2 = value; } + /// + /// + /// + public static ArtifactCreateTool FromArtifactCreateToolVariant2(global::Vectara.ArtifactCreateToolVariant2? value) => new ArtifactCreateTool(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.ArtifactGrepTool.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ArtifactGrepTool.g.cs index a644bfc0..faa1e64c 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.ArtifactGrepTool.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.ArtifactGrepTool.g.cs @@ -39,6 +39,13 @@ public bool TryPickBase( return IsBase; } + /// + /// + /// + public global::Vectara.ToolBase PickBase() => IsBase + ? Base! + : throw new global::System.InvalidOperationException($"Expected union variant 'Base' but the value was {ToString()}."); + /// /// /// @@ -68,6 +75,13 @@ public bool TryPickArtifactGrepToolVariant2( value = ArtifactGrepToolVariant2; return IsArtifactGrepToolVariant2; } + + /// + /// + /// + public global::Vectara.ArtifactGrepToolVariant2 PickArtifactGrepToolVariant2() => IsArtifactGrepToolVariant2 + ? ArtifactGrepToolVariant2! + : throw new global::System.InvalidOperationException($"Expected union variant 'ArtifactGrepToolVariant2' but the value was {ToString()}."); /// /// /// @@ -86,6 +100,11 @@ public ArtifactGrepTool(global::Vectara.ToolBase? value) Base = value; } + /// + /// + /// + public static ArtifactGrepTool FromBase(global::Vectara.ToolBase? value) => new ArtifactGrepTool(value); + /// /// /// @@ -104,6 +123,11 @@ public ArtifactGrepTool(global::Vectara.ArtifactGrepToolVariant2? value) ArtifactGrepToolVariant2 = value; } + /// + /// + /// + public static ArtifactGrepTool FromArtifactGrepToolVariant2(global::Vectara.ArtifactGrepToolVariant2? value) => new ArtifactGrepTool(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.ArtifactReadTool.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ArtifactReadTool.g.cs index 3a3b849c..76e4cc7a 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.ArtifactReadTool.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.ArtifactReadTool.g.cs @@ -39,6 +39,13 @@ public bool TryPickBase( return IsBase; } + /// + /// + /// + public global::Vectara.ToolBase PickBase() => IsBase + ? Base! + : throw new global::System.InvalidOperationException($"Expected union variant 'Base' but the value was {ToString()}."); + /// /// /// @@ -68,6 +75,13 @@ public bool TryPickArtifactReadToolVariant2( value = ArtifactReadToolVariant2; return IsArtifactReadToolVariant2; } + + /// + /// + /// + public global::Vectara.ArtifactReadToolVariant2 PickArtifactReadToolVariant2() => IsArtifactReadToolVariant2 + ? ArtifactReadToolVariant2! + : throw new global::System.InvalidOperationException($"Expected union variant 'ArtifactReadToolVariant2' but the value was {ToString()}."); /// /// /// @@ -86,6 +100,11 @@ public ArtifactReadTool(global::Vectara.ToolBase? value) Base = value; } + /// + /// + /// + public static ArtifactReadTool FromBase(global::Vectara.ToolBase? value) => new ArtifactReadTool(value); + /// /// /// @@ -104,6 +123,11 @@ public ArtifactReadTool(global::Vectara.ArtifactReadToolVariant2? value) ArtifactReadToolVariant2 = value; } + /// + /// + /// + public static ArtifactReadTool FromArtifactReadToolVariant2(global::Vectara.ArtifactReadToolVariant2? value) => new ArtifactReadTool(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.ArtifactUploadEvent.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ArtifactUploadEvent.g.cs index 4cf7457d..c84a2f9c 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.ArtifactUploadEvent.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.ArtifactUploadEvent.g.cs @@ -42,6 +42,13 @@ public bool TryPickAgentBase( return IsAgentBase; } + /// + /// + /// + public global::Vectara.AgentEventBase PickAgentBase() => IsAgentBase + ? AgentBase! + : throw new global::System.InvalidOperationException($"Expected union variant 'AgentBase' but the value was {ToString()}."); + /// /// /// @@ -71,6 +78,13 @@ public bool TryPickArtifactUploadEventVariant2( value = ArtifactUploadEventVariant2; return IsArtifactUploadEventVariant2; } + + /// + /// + /// + public global::Vectara.ArtifactUploadEventVariant2 PickArtifactUploadEventVariant2() => IsArtifactUploadEventVariant2 + ? ArtifactUploadEventVariant2! + : throw new global::System.InvalidOperationException($"Expected union variant 'ArtifactUploadEventVariant2' but the value was {ToString()}."); /// /// /// @@ -89,6 +103,11 @@ public ArtifactUploadEvent(global::Vectara.AgentEventBase? value) AgentBase = value; } + /// + /// + /// + public static ArtifactUploadEvent FromAgentBase(global::Vectara.AgentEventBase? value) => new ArtifactUploadEvent(value); + /// /// /// @@ -107,6 +126,11 @@ public ArtifactUploadEvent(global::Vectara.ArtifactUploadEventVariant2? value) ArtifactUploadEventVariant2 = value; } + /// + /// + /// + public static ArtifactUploadEvent FromArtifactUploadEventVariant2(global::Vectara.ArtifactUploadEventVariant2? value) => new ArtifactUploadEvent(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.BulkDeleteDocumentsResponse.g.cs b/src/libs/Vectara/Generated/Vectara.Models.BulkDeleteDocumentsResponse.g.cs index 4a4872d6..6c0934a5 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.BulkDeleteDocumentsResponse.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.BulkDeleteDocumentsResponse.g.cs @@ -59,6 +59,13 @@ public bool TryPickAsync( return IsAsync; } + /// + /// + /// + public global::Vectara.BulkDeleteAsyncResponse PickAsync() => IsAsync + ? Async! + : throw new global::System.InvalidOperationException($"Expected union variant 'Async' but the value was {ToString()}."); + /// /// Response when async=false and operation completes successfully (HTTP 200). /// @@ -88,6 +95,13 @@ public bool TryPickSuccess( value = Success; return IsSuccess; } + + /// + /// + /// + public global::Vectara.BulkDeleteSyncSuccessResponse PickSuccess() => IsSuccess + ? Success! + : throw new global::System.InvalidOperationException($"Expected union variant 'Success' but the value was {ToString()}."); /// /// /// @@ -106,6 +120,11 @@ public BulkDeleteDocumentsResponse(global::Vectara.BulkDeleteAsyncResponse? valu Async = value; } + /// + /// + /// + public static BulkDeleteDocumentsResponse FromAsync(global::Vectara.BulkDeleteAsyncResponse? value) => new BulkDeleteDocumentsResponse(value); + /// /// /// @@ -124,6 +143,11 @@ public BulkDeleteDocumentsResponse(global::Vectara.BulkDeleteSyncSuccessResponse Success = value; } + /// + /// + /// + public static BulkDeleteDocumentsResponse FromSuccess(global::Vectara.BulkDeleteSyncSuccessResponse? value) => new BulkDeleteDocumentsResponse(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.ChatStreamedResponse.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ChatStreamedResponse.g.cs index 1872dec0..074451ad 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.ChatStreamedResponse.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.ChatStreamedResponse.g.cs @@ -44,6 +44,13 @@ public bool TryPickSearchResults( return IsSearchResults; } + /// + /// + /// + public global::Vectara.StreamSearchResponse PickSearchResults() => IsSearchResults + ? SearchResults! + : throw new global::System.InvalidOperationException($"Expected union variant 'SearchResults' but the value was {ToString()}."); + /// /// Information about the chat. /// @@ -74,6 +81,13 @@ public bool TryPickChatInfo( return IsChatInfo; } + /// + /// + /// + public global::Vectara.ChatInfoResponse PickChatInfo() => IsChatInfo + ? ChatInfo! + : throw new global::System.InvalidOperationException($"Expected union variant 'ChatInfo' but the value was {ToString()}."); + /// /// The chunk response from the generation, which may be a partial generation. /// @@ -104,6 +118,13 @@ public bool TryPickGenerationChunk( return IsGenerationChunk; } + /// + /// + /// + public global::Vectara.StreamGenerationChunk PickGenerationChunk() => IsGenerationChunk + ? GenerationChunk! + : throw new global::System.InvalidOperationException($"Expected union variant 'GenerationChunk' but the value was {ToString()}."); + /// /// The end of generation. There may still be more information such as the factual consistency score, but generation has stopped. /// @@ -134,6 +155,13 @@ public bool TryPickGenerationEnd( return IsGenerationEnd; } + /// + /// + /// + public global::Vectara.StreamGenerationEnd PickGenerationEnd() => IsGenerationEnd + ? GenerationEnd! + : throw new global::System.InvalidOperationException($"Expected union variant 'GenerationEnd' but the value was {ToString()}."); + /// /// Event containing information on how the generation was accomplished. /// @@ -164,6 +192,13 @@ public bool TryPickGenerationInfo( return IsGenerationInfo; } + /// + /// + /// + public global::Vectara.GenerationInfo PickGenerationInfo() => IsGenerationInfo + ? GenerationInfo! + : throw new global::System.InvalidOperationException($"Expected union variant 'GenerationInfo' but the value was {ToString()}."); + /// /// Event containing the factual consistency score. /// @@ -194,6 +229,13 @@ public bool TryPickFactualConsistencyScore( return IsFactualConsistencyScore; } + /// + /// + /// + public global::Vectara.FactualConsistencyScore PickFactualConsistencyScore() => IsFactualConsistencyScore + ? FactualConsistencyScore! + : throw new global::System.InvalidOperationException($"Expected union variant 'FactualConsistencyScore' but the value was {ToString()}."); + /// /// The end of a query response stream. /// @@ -224,6 +266,13 @@ public bool TryPickEnd( return IsEnd; } + /// + /// + /// + public global::Vectara.StreamResponseEnd PickEnd() => IsEnd + ? End! + : throw new global::System.InvalidOperationException($"Expected union variant 'End' but the value was {ToString()}."); + /// /// Event signaling there was an error with the request. /// @@ -253,6 +302,13 @@ public bool TryPickError( value = Error; return IsError; } + + /// + /// + /// + public global::Vectara.StreamError PickError() => IsError + ? Error! + : throw new global::System.InvalidOperationException($"Expected union variant 'Error' but the value was {ToString()}."); /// /// /// @@ -271,6 +327,11 @@ public ChatStreamedResponse(global::Vectara.StreamSearchResponse? value) SearchResults = value; } + /// + /// + /// + public static ChatStreamedResponse FromSearchResults(global::Vectara.StreamSearchResponse? value) => new ChatStreamedResponse(value); + /// /// /// @@ -289,6 +350,11 @@ public ChatStreamedResponse(global::Vectara.ChatInfoResponse? value) ChatInfo = value; } + /// + /// + /// + public static ChatStreamedResponse FromChatInfo(global::Vectara.ChatInfoResponse? value) => new ChatStreamedResponse(value); + /// /// /// @@ -307,6 +373,11 @@ public ChatStreamedResponse(global::Vectara.StreamGenerationChunk? value) GenerationChunk = value; } + /// + /// + /// + public static ChatStreamedResponse FromGenerationChunk(global::Vectara.StreamGenerationChunk? value) => new ChatStreamedResponse(value); + /// /// /// @@ -325,6 +396,11 @@ public ChatStreamedResponse(global::Vectara.StreamGenerationEnd? value) GenerationEnd = value; } + /// + /// + /// + public static ChatStreamedResponse FromGenerationEnd(global::Vectara.StreamGenerationEnd? value) => new ChatStreamedResponse(value); + /// /// /// @@ -343,6 +419,11 @@ public ChatStreamedResponse(global::Vectara.GenerationInfo? value) GenerationInfo = value; } + /// + /// + /// + public static ChatStreamedResponse FromGenerationInfo(global::Vectara.GenerationInfo? value) => new ChatStreamedResponse(value); + /// /// /// @@ -361,6 +442,11 @@ public ChatStreamedResponse(global::Vectara.FactualConsistencyScore? value) FactualConsistencyScore = value; } + /// + /// + /// + public static ChatStreamedResponse FromFactualConsistencyScore(global::Vectara.FactualConsistencyScore? value) => new ChatStreamedResponse(value); + /// /// /// @@ -379,6 +465,11 @@ public ChatStreamedResponse(global::Vectara.StreamResponseEnd? value) End = value; } + /// + /// + /// + public static ChatStreamedResponse FromEnd(global::Vectara.StreamResponseEnd? value) => new ChatStreamedResponse(value); + /// /// /// @@ -397,6 +488,11 @@ public ChatStreamedResponse(global::Vectara.StreamError? value) Error = value; } + /// + /// + /// + public static ChatStreamedResponse FromError(global::Vectara.StreamError? value) => new ChatStreamedResponse(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.ChatTraceSpan.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ChatTraceSpan.g.cs index 1b493b55..2d3af45e 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.ChatTraceSpan.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.ChatTraceSpan.g.cs @@ -39,6 +39,13 @@ public bool TryPickAgentBase( return IsAgentBase; } + /// + /// + /// + public global::Vectara.AgentTraceSpanBase PickAgentBase() => IsAgentBase + ? AgentBase! + : throw new global::System.InvalidOperationException($"Expected union variant 'AgentBase' but the value was {ToString()}."); + /// /// /// @@ -68,6 +75,13 @@ public bool TryPickChatTraceSpanVariant2( value = ChatTraceSpanVariant2; return IsChatTraceSpanVariant2; } + + /// + /// + /// + public global::Vectara.ChatTraceSpanVariant2 PickChatTraceSpanVariant2() => IsChatTraceSpanVariant2 + ? ChatTraceSpanVariant2! + : throw new global::System.InvalidOperationException($"Expected union variant 'ChatTraceSpanVariant2' but the value was {ToString()}."); /// /// /// @@ -86,6 +100,11 @@ public ChatTraceSpan(global::Vectara.AgentTraceSpanBase? value) AgentBase = value; } + /// + /// + /// + public static ChatTraceSpan FromAgentBase(global::Vectara.AgentTraceSpanBase? value) => new ChatTraceSpan(value); + /// /// /// @@ -104,6 +123,11 @@ public ChatTraceSpan(global::Vectara.ChatTraceSpanVariant2? value) ChatTraceSpanVariant2 = value; } + /// + /// + /// + public static ChatTraceSpan FromChatTraceSpanVariant2(global::Vectara.ChatTraceSpanVariant2? value) => new ChatTraceSpan(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.ChunkingStrategy.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ChunkingStrategy.g.cs index a9f38284..4936e6fd 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.ChunkingStrategy.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.ChunkingStrategy.g.cs @@ -44,6 +44,13 @@ public bool TryPickMaxCharsChunkingStrategy( return IsMaxCharsChunkingStrategy; } + /// + /// + /// + public global::Vectara.MaxCharsChunkingStrategy PickMaxCharsChunkingStrategy() => IsMaxCharsChunkingStrategy + ? MaxCharsChunkingStrategy! + : throw new global::System.InvalidOperationException($"Expected union variant 'MaxCharsChunkingStrategy' but the value was {ToString()}."); + /// /// Sets a chunking strategy that creates one chunk per sentence. This is the default strategy used when no chunking strategy is specified. /// @@ -73,6 +80,13 @@ public bool TryPickSentenceChunkingStrategy( value = SentenceChunkingStrategy; return IsSentenceChunkingStrategy; } + + /// + /// + /// + public global::Vectara.SentenceChunkingStrategy PickSentenceChunkingStrategy() => IsSentenceChunkingStrategy + ? SentenceChunkingStrategy! + : throw new global::System.InvalidOperationException($"Expected union variant 'SentenceChunkingStrategy' but the value was {ToString()}."); /// /// /// @@ -91,6 +105,11 @@ public ChunkingStrategy(global::Vectara.MaxCharsChunkingStrategy? value) MaxCharsChunkingStrategy = value; } + /// + /// + /// + public static ChunkingStrategy FromMaxCharsChunkingStrategy(global::Vectara.MaxCharsChunkingStrategy? value) => new ChunkingStrategy(value); + /// /// /// @@ -109,6 +128,11 @@ public ChunkingStrategy(global::Vectara.SentenceChunkingStrategy? value) SentenceChunkingStrategy = value; } + /// + /// + /// + public static ChunkingStrategy FromSentenceChunkingStrategy(global::Vectara.SentenceChunkingStrategy? value) => new ChunkingStrategy(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.CompactionEvent.g.cs b/src/libs/Vectara/Generated/Vectara.Models.CompactionEvent.g.cs index 958e8a40..e8197c19 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.CompactionEvent.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.CompactionEvent.g.cs @@ -39,6 +39,13 @@ public bool TryPickAgentBase( return IsAgentBase; } + /// + /// + /// + public global::Vectara.AgentEventBase PickAgentBase() => IsAgentBase + ? AgentBase! + : throw new global::System.InvalidOperationException($"Expected union variant 'AgentBase' but the value was {ToString()}."); + /// /// /// @@ -68,6 +75,13 @@ public bool TryPickCompactionEventVariant2( value = CompactionEventVariant2; return IsCompactionEventVariant2; } + + /// + /// + /// + public global::Vectara.CompactionEventVariant2 PickCompactionEventVariant2() => IsCompactionEventVariant2 + ? CompactionEventVariant2! + : throw new global::System.InvalidOperationException($"Expected union variant 'CompactionEventVariant2' but the value was {ToString()}."); /// /// /// @@ -86,6 +100,11 @@ public CompactionEvent(global::Vectara.AgentEventBase? value) AgentBase = value; } + /// + /// + /// + public static CompactionEvent FromAgentBase(global::Vectara.AgentEventBase? value) => new CompactionEvent(value); + /// /// /// @@ -104,6 +123,11 @@ public CompactionEvent(global::Vectara.CompactionEventVariant2? value) CompactionEventVariant2 = value; } + /// + /// + /// + public static CompactionEvent FromCompactionEventVariant2(global::Vectara.CompactionEventVariant2? value) => new CompactionEvent(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.CompactionStartedEvent.g.cs b/src/libs/Vectara/Generated/Vectara.Models.CompactionStartedEvent.g.cs index 105aab88..81b425f8 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.CompactionStartedEvent.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.CompactionStartedEvent.g.cs @@ -39,6 +39,13 @@ public bool TryPickAgentBase( return IsAgentBase; } + /// + /// + /// + public global::Vectara.AgentEventBase PickAgentBase() => IsAgentBase + ? AgentBase! + : throw new global::System.InvalidOperationException($"Expected union variant 'AgentBase' but the value was {ToString()}."); + /// /// /// @@ -68,6 +75,13 @@ public bool TryPickCompactionStartedEventVariant2( value = CompactionStartedEventVariant2; return IsCompactionStartedEventVariant2; } + + /// + /// + /// + public global::Vectara.CompactionStartedEventVariant2 PickCompactionStartedEventVariant2() => IsCompactionStartedEventVariant2 + ? CompactionStartedEventVariant2! + : throw new global::System.InvalidOperationException($"Expected union variant 'CompactionStartedEventVariant2' but the value was {ToString()}."); /// /// /// @@ -86,6 +100,11 @@ public CompactionStartedEvent(global::Vectara.AgentEventBase? value) AgentBase = value; } + /// + /// + /// + public static CompactionStartedEvent FromAgentBase(global::Vectara.AgentEventBase? value) => new CompactionStartedEvent(value); + /// /// /// @@ -104,6 +123,11 @@ public CompactionStartedEvent(global::Vectara.CompactionStartedEventVariant2? va CompactionStartedEventVariant2 = value; } + /// + /// + /// + public static CompactionStartedEvent FromCompactionStartedEventVariant2(global::Vectara.CompactionStartedEventVariant2? value) => new CompactionStartedEvent(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.CompactionTraceSpan.g.cs b/src/libs/Vectara/Generated/Vectara.Models.CompactionTraceSpan.g.cs index cc2cb6c3..2d44fb10 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.CompactionTraceSpan.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.CompactionTraceSpan.g.cs @@ -39,6 +39,13 @@ public bool TryPickAgentBase( return IsAgentBase; } + /// + /// + /// + public global::Vectara.AgentTraceSpanBase PickAgentBase() => IsAgentBase + ? AgentBase! + : throw new global::System.InvalidOperationException($"Expected union variant 'AgentBase' but the value was {ToString()}."); + /// /// /// @@ -68,6 +75,13 @@ public bool TryPickCompactionTraceSpanVariant2( value = CompactionTraceSpanVariant2; return IsCompactionTraceSpanVariant2; } + + /// + /// + /// + public global::Vectara.CompactionTraceSpanVariant2 PickCompactionTraceSpanVariant2() => IsCompactionTraceSpanVariant2 + ? CompactionTraceSpanVariant2! + : throw new global::System.InvalidOperationException($"Expected union variant 'CompactionTraceSpanVariant2' but the value was {ToString()}."); /// /// /// @@ -86,6 +100,11 @@ public CompactionTraceSpan(global::Vectara.AgentTraceSpanBase? value) AgentBase = value; } + /// + /// + /// + public static CompactionTraceSpan FromAgentBase(global::Vectara.AgentTraceSpanBase? value) => new CompactionTraceSpan(value); + /// /// /// @@ -104,6 +123,11 @@ public CompactionTraceSpan(global::Vectara.CompactionTraceSpanVariant2? value) CompactionTraceSpanVariant2 = value; } + /// + /// + /// + public static CompactionTraceSpan FromCompactionTraceSpanVariant2(global::Vectara.CompactionTraceSpanVariant2? value) => new CompactionTraceSpan(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.ConnectorConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ConnectorConfiguration.g.cs index bddc84f0..956c1bab 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.ConnectorConfiguration.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.ConnectorConfiguration.g.cs @@ -43,6 +43,13 @@ public bool TryPickSlack( value = Slack; return IsSlack; } + + /// + /// + /// + public global::Vectara.SlackConnectorConfiguration PickSlack() => IsSlack + ? Slack! + : throw new global::System.InvalidOperationException($"Expected union variant 'Slack' but the value was {ToString()}."); /// /// /// @@ -61,6 +68,11 @@ public ConnectorConfiguration(global::Vectara.SlackConnectorConfiguration? value Slack = value; } + /// + /// + /// + public static ConnectorConfiguration FromSlack(global::Vectara.SlackConnectorConfiguration? value) => new ConnectorConfiguration(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.ContextLimitExceededEvent.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ContextLimitExceededEvent.g.cs index a1d1aa15..98ff3fde 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.ContextLimitExceededEvent.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.ContextLimitExceededEvent.g.cs @@ -40,6 +40,13 @@ public bool TryPickAgentBase( return IsAgentBase; } + /// + /// + /// + public global::Vectara.AgentEventBase PickAgentBase() => IsAgentBase + ? AgentBase! + : throw new global::System.InvalidOperationException($"Expected union variant 'AgentBase' but the value was {ToString()}."); + /// /// /// @@ -69,6 +76,13 @@ public bool TryPickContextLimitExceededEventVariant2( value = ContextLimitExceededEventVariant2; return IsContextLimitExceededEventVariant2; } + + /// + /// + /// + public global::Vectara.ContextLimitExceededEventVariant2 PickContextLimitExceededEventVariant2() => IsContextLimitExceededEventVariant2 + ? ContextLimitExceededEventVariant2! + : throw new global::System.InvalidOperationException($"Expected union variant 'ContextLimitExceededEventVariant2' but the value was {ToString()}."); /// /// /// @@ -87,6 +101,11 @@ public ContextLimitExceededEvent(global::Vectara.AgentEventBase? value) AgentBase = value; } + /// + /// + /// + public static ContextLimitExceededEvent FromAgentBase(global::Vectara.AgentEventBase? value) => new ContextLimitExceededEvent(value); + /// /// /// @@ -105,6 +124,11 @@ public ContextLimitExceededEvent(global::Vectara.ContextLimitExceededEventVarian ContextLimitExceededEventVariant2 = value; } + /// + /// + /// + public static ContextLimitExceededEvent FromContextLimitExceededEventVariant2(global::Vectara.ContextLimitExceededEventVariant2? value) => new ContextLimitExceededEvent(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.CorporaSearchTool.g.cs b/src/libs/Vectara/Generated/Vectara.Models.CorporaSearchTool.g.cs index 6b53cb3c..4c6f3954 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.CorporaSearchTool.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.CorporaSearchTool.g.cs @@ -39,6 +39,13 @@ public bool TryPickBase( return IsBase; } + /// + /// + /// + public global::Vectara.ToolBase PickBase() => IsBase + ? Base! + : throw new global::System.InvalidOperationException($"Expected union variant 'Base' but the value was {ToString()}."); + /// /// /// @@ -68,6 +75,13 @@ public bool TryPickCorporaSearchToolVariant2( value = CorporaSearchToolVariant2; return IsCorporaSearchToolVariant2; } + + /// + /// + /// + public global::Vectara.CorporaSearchToolVariant2 PickCorporaSearchToolVariant2() => IsCorporaSearchToolVariant2 + ? CorporaSearchToolVariant2! + : throw new global::System.InvalidOperationException($"Expected union variant 'CorporaSearchToolVariant2' but the value was {ToString()}."); /// /// /// @@ -86,6 +100,11 @@ public CorporaSearchTool(global::Vectara.ToolBase? value) Base = value; } + /// + /// + /// + public static CorporaSearchTool FromBase(global::Vectara.ToolBase? value) => new CorporaSearchTool(value); + /// /// /// @@ -104,6 +123,11 @@ public CorporaSearchTool(global::Vectara.CorporaSearchToolVariant2? value) CorporaSearchToolVariant2 = value; } + /// + /// + /// + public static CorporaSearchTool FromCorporaSearchToolVariant2(global::Vectara.CorporaSearchToolVariant2? value) => new CorporaSearchTool(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.CreateAppClientRequest.g.cs b/src/libs/Vectara/Generated/Vectara.Models.CreateAppClientRequest.g.cs index 7d19f15e..94f6e241 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.CreateAppClientRequest.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.CreateAppClientRequest.g.cs @@ -43,6 +43,13 @@ public bool TryPickClientCredentials( value = ClientCredentials; return IsClientCredentials; } + + /// + /// + /// + public global::Vectara.CreateClientCredentialsRequest PickClientCredentials() => IsClientCredentials + ? ClientCredentials! + : throw new global::System.InvalidOperationException($"Expected union variant 'ClientCredentials' but the value was {ToString()}."); /// /// /// @@ -61,6 +68,11 @@ public CreateAppClientRequest(global::Vectara.CreateClientCredentialsRequest? va ClientCredentials = value; } + /// + /// + /// + public static CreateAppClientRequest FromClientCredentials(global::Vectara.CreateClientCredentialsRequest? value) => new CreateAppClientRequest(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.CreateCompactRequest.g.cs b/src/libs/Vectara/Generated/Vectara.Models.CreateCompactRequest.g.cs index 55264511..a42adb79 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.CreateCompactRequest.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.CreateCompactRequest.g.cs @@ -40,6 +40,13 @@ public bool TryPickInputBase( return IsInputBase; } + /// + /// + /// + public global::Vectara.CreateInputRequestBase PickInputBase() => IsInputBase + ? InputBase! + : throw new global::System.InvalidOperationException($"Expected union variant 'InputBase' but the value was {ToString()}."); + /// /// /// @@ -69,6 +76,13 @@ public bool TryPickCreateCompactRequestVariant2( value = CreateCompactRequestVariant2; return IsCreateCompactRequestVariant2; } + + /// + /// + /// + public global::Vectara.CreateCompactRequestVariant2 PickCreateCompactRequestVariant2() => IsCreateCompactRequestVariant2 + ? CreateCompactRequestVariant2! + : throw new global::System.InvalidOperationException($"Expected union variant 'CreateCompactRequestVariant2' but the value was {ToString()}."); /// /// /// @@ -87,6 +101,11 @@ public CreateCompactRequest(global::Vectara.CreateInputRequestBase? value) InputBase = value; } + /// + /// + /// + public static CreateCompactRequest FromInputBase(global::Vectara.CreateInputRequestBase? value) => new CreateCompactRequest(value); + /// /// /// @@ -105,6 +124,11 @@ public CreateCompactRequest(global::Vectara.CreateCompactRequestVariant2? value) CreateCompactRequestVariant2 = value; } + /// + /// + /// + public static CreateCompactRequest FromCreateCompactRequestVariant2(global::Vectara.CreateCompactRequestVariant2? value) => new CreateCompactRequest(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.CreateDocumentRequest.g.cs b/src/libs/Vectara/Generated/Vectara.Models.CreateDocumentRequest.g.cs index e8214f4c..12d3cc57 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.CreateDocumentRequest.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.CreateDocumentRequest.g.cs @@ -46,6 +46,13 @@ public bool TryPickCore( return IsCore; } + /// + /// + /// + public global::Vectara.CoreDocument PickCore() => IsCore + ? Core! + : throw new global::System.InvalidOperationException($"Expected union variant 'Core' but the value was {ToString()}."); + /// /// A document with layout features. /// @@ -75,6 +82,13 @@ public bool TryPickStructured( value = Structured; return IsStructured; } + + /// + /// + /// + public global::Vectara.StructuredDocument PickStructured() => IsStructured + ? Structured! + : throw new global::System.InvalidOperationException($"Expected union variant 'Structured' but the value was {ToString()}."); /// /// /// @@ -93,6 +107,11 @@ public CreateDocumentRequest(global::Vectara.CoreDocument? value) Core = value; } + /// + /// + /// + public static CreateDocumentRequest FromCore(global::Vectara.CoreDocument? value) => new CreateDocumentRequest(value); + /// /// /// @@ -111,6 +130,11 @@ public CreateDocumentRequest(global::Vectara.StructuredDocument? value) Structured = value; } + /// + /// + /// + public static CreateDocumentRequest FromStructured(global::Vectara.StructuredDocument? value) => new CreateDocumentRequest(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.CreateEncoderRequest.g.cs b/src/libs/Vectara/Generated/Vectara.Models.CreateEncoderRequest.g.cs index 4a9ba666..fdbe54b8 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.CreateEncoderRequest.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.CreateEncoderRequest.g.cs @@ -43,6 +43,13 @@ public bool TryPickOpenaiCompatible( value = OpenaiCompatible; return IsOpenaiCompatible; } + + /// + /// + /// + public global::Vectara.CreateOpenAIEncoderRequest PickOpenaiCompatible() => IsOpenaiCompatible + ? OpenaiCompatible! + : throw new global::System.InvalidOperationException($"Expected union variant 'OpenaiCompatible' but the value was {ToString()}."); /// /// /// @@ -61,6 +68,11 @@ public CreateEncoderRequest(global::Vectara.CreateOpenAIEncoderRequest? value) OpenaiCompatible = value; } + /// + /// + /// + public static CreateEncoderRequest FromOpenaiCompatible(global::Vectara.CreateOpenAIEncoderRequest? value) => new CreateEncoderRequest(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.CreateGenerationPresetRequest.g.cs b/src/libs/Vectara/Generated/Vectara.Models.CreateGenerationPresetRequest.g.cs index 80863132..ec152a06 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.CreateGenerationPresetRequest.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.CreateGenerationPresetRequest.g.cs @@ -38,6 +38,13 @@ public bool TryPickGenerationPreset( value = GenerationPreset; return IsGenerationPreset; } + + /// + /// + /// + public global::Vectara.GenerationPreset PickGenerationPreset() => IsGenerationPreset + ? GenerationPreset! + : throw new global::System.InvalidOperationException($"Expected union variant 'GenerationPreset' but the value was {ToString()}."); /// /// /// @@ -56,6 +63,11 @@ public CreateGenerationPresetRequest(global::Vectara.GenerationPreset? value) GenerationPreset = value; } + /// + /// + /// + public static CreateGenerationPresetRequest FromGenerationPreset(global::Vectara.GenerationPreset? value) => new CreateGenerationPresetRequest(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.CreateInitialInstructionRequest.g.cs b/src/libs/Vectara/Generated/Vectara.Models.CreateInitialInstructionRequest.g.cs index 2720a088..80786e45 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.CreateInitialInstructionRequest.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.CreateInitialInstructionRequest.g.cs @@ -39,6 +39,13 @@ public bool TryPickBase( return IsBase; } + /// + /// + /// + public global::Vectara.InstructionRequestBase PickBase() => IsBase + ? Base! + : throw new global::System.InvalidOperationException($"Expected union variant 'Base' but the value was {ToString()}."); + /// /// /// @@ -68,6 +75,13 @@ public bool TryPickCreateInitialInstructionRequestVariant2( value = CreateInitialInstructionRequestVariant2; return IsCreateInitialInstructionRequestVariant2; } + + /// + /// + /// + public global::Vectara.CreateInitialInstructionRequestVariant2 PickCreateInitialInstructionRequestVariant2() => IsCreateInitialInstructionRequestVariant2 + ? CreateInitialInstructionRequestVariant2! + : throw new global::System.InvalidOperationException($"Expected union variant 'CreateInitialInstructionRequestVariant2' but the value was {ToString()}."); /// /// /// @@ -86,6 +100,11 @@ public CreateInitialInstructionRequest(global::Vectara.InstructionRequestBase? v Base = value; } + /// + /// + /// + public static CreateInitialInstructionRequest FromBase(global::Vectara.InstructionRequestBase? value) => new CreateInitialInstructionRequest(value); + /// /// /// @@ -104,6 +123,11 @@ public CreateInitialInstructionRequest(global::Vectara.CreateInitialInstructionR CreateInitialInstructionRequestVariant2 = value; } + /// + /// + /// + public static CreateInitialInstructionRequest FromCreateInitialInstructionRequestVariant2(global::Vectara.CreateInitialInstructionRequestVariant2? value) => new CreateInitialInstructionRequest(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.CreateInputMessageRequest.g.cs b/src/libs/Vectara/Generated/Vectara.Models.CreateInputMessageRequest.g.cs index 7bb32c8e..28ebb5ca 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.CreateInputMessageRequest.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.CreateInputMessageRequest.g.cs @@ -39,6 +39,13 @@ public bool TryPickBase( return IsBase; } + /// + /// + /// + public global::Vectara.CreateInputRequestBase PickBase() => IsBase + ? Base! + : throw new global::System.InvalidOperationException($"Expected union variant 'Base' but the value was {ToString()}."); + /// /// /// @@ -68,6 +75,13 @@ public bool TryPickCreateInputMessageRequestVariant2( value = CreateInputMessageRequestVariant2; return IsCreateInputMessageRequestVariant2; } + + /// + /// + /// + public global::Vectara.CreateInputMessageRequestVariant2 PickCreateInputMessageRequestVariant2() => IsCreateInputMessageRequestVariant2 + ? CreateInputMessageRequestVariant2! + : throw new global::System.InvalidOperationException($"Expected union variant 'CreateInputMessageRequestVariant2' but the value was {ToString()}."); /// /// /// @@ -86,6 +100,11 @@ public CreateInputMessageRequest(global::Vectara.CreateInputRequestBase? value) Base = value; } + /// + /// + /// + public static CreateInputMessageRequest FromBase(global::Vectara.CreateInputRequestBase? value) => new CreateInputMessageRequest(value); + /// /// /// @@ -104,6 +123,11 @@ public CreateInputMessageRequest(global::Vectara.CreateInputMessageRequestVarian CreateInputMessageRequestVariant2 = value; } + /// + /// + /// + public static CreateInputMessageRequest FromCreateInputMessageRequestVariant2(global::Vectara.CreateInputMessageRequestVariant2? value) => new CreateInputMessageRequest(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.CreateInputRequest.g.cs b/src/libs/Vectara/Generated/Vectara.Models.CreateInputRequest.g.cs index 7bc08330..89de1f5d 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.CreateInputRequest.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.CreateInputRequest.g.cs @@ -44,6 +44,13 @@ public bool TryPickInputMessage( return IsInputMessage; } + /// + /// + /// + public global::Vectara.CreateInputMessageRequest PickInputMessage() => IsInputMessage + ? InputMessage!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'InputMessage' but the value was {ToString()}."); + /// /// Cancels the current agent operation. /// @@ -74,6 +81,13 @@ public bool TryPickInterrupt( return IsInterrupt; } + /// + /// + /// + public global::Vectara.CreateInterruptRequest PickInterrupt() => IsInterrupt + ? Interrupt!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'Interrupt' but the value was {ToString()}."); + /// /// Requests compaction of the session history. Can be sent while the session is processing
/// (queued as a follow-up) or when idle. @@ -104,6 +118,13 @@ public bool TryPickCompact( value = Compact; return IsCompact; } + + /// + /// + /// + public global::Vectara.CreateCompactRequest PickCompact() => IsCompact + ? Compact!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'Compact' but the value was {ToString()}."); /// /// /// @@ -122,6 +143,11 @@ public CreateInputRequest(global::Vectara.CreateInputMessageRequest? value) InputMessage = value; } + /// + /// + /// + public static CreateInputRequest FromInputMessage(global::Vectara.CreateInputMessageRequest? value) => new CreateInputRequest(value); + /// /// /// @@ -140,6 +166,11 @@ public CreateInputRequest(global::Vectara.CreateInterruptRequest? value) Interrupt = value; } + /// + /// + /// + public static CreateInputRequest FromInterrupt(global::Vectara.CreateInterruptRequest? value) => new CreateInputRequest(value); + /// /// /// @@ -158,6 +189,11 @@ public CreateInputRequest(global::Vectara.CreateCompactRequest? value) Compact = value; } + /// + /// + /// + public static CreateInputRequest FromCompact(global::Vectara.CreateCompactRequest? value) => new CreateInputRequest(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.CreateInstructionRequest.g.cs b/src/libs/Vectara/Generated/Vectara.Models.CreateInstructionRequest.g.cs index 6b0a043e..e0296f92 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.CreateInstructionRequest.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.CreateInstructionRequest.g.cs @@ -43,6 +43,13 @@ public bool TryPickInitial( value = Initial; return IsInitial; } + + /// + /// + /// + public global::Vectara.CreateInitialInstructionRequest PickInitial() => IsInitial + ? Initial!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'Initial' but the value was {ToString()}."); /// /// /// @@ -61,6 +68,11 @@ public CreateInstructionRequest(global::Vectara.CreateInitialInstructionRequest? Initial = value; } + /// + /// + /// + public static CreateInstructionRequest FromInitial(global::Vectara.CreateInitialInstructionRequest? value) => new CreateInstructionRequest(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.CreateInterruptRequest.g.cs b/src/libs/Vectara/Generated/Vectara.Models.CreateInterruptRequest.g.cs index c3e258ca..ddfdfd4b 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.CreateInterruptRequest.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.CreateInterruptRequest.g.cs @@ -39,6 +39,13 @@ public bool TryPickInputBase( return IsInputBase; } + /// + /// + /// + public global::Vectara.CreateInputRequestBase PickInputBase() => IsInputBase + ? InputBase! + : throw new global::System.InvalidOperationException($"Expected union variant 'InputBase' but the value was {ToString()}."); + /// /// /// @@ -68,6 +75,13 @@ public bool TryPickCreateInterruptRequestVariant2( value = CreateInterruptRequestVariant2; return IsCreateInterruptRequestVariant2; } + + /// + /// + /// + public global::Vectara.CreateInterruptRequestVariant2 PickCreateInterruptRequestVariant2() => IsCreateInterruptRequestVariant2 + ? CreateInterruptRequestVariant2! + : throw new global::System.InvalidOperationException($"Expected union variant 'CreateInterruptRequestVariant2' but the value was {ToString()}."); /// /// /// @@ -86,6 +100,11 @@ public CreateInterruptRequest(global::Vectara.CreateInputRequestBase? value) InputBase = value; } + /// + /// + /// + public static CreateInterruptRequest FromInputBase(global::Vectara.CreateInputRequestBase? value) => new CreateInterruptRequest(value); + /// /// /// @@ -104,6 +123,11 @@ public CreateInterruptRequest(global::Vectara.CreateInterruptRequestVariant2? va CreateInterruptRequestVariant2 = value; } + /// + /// + /// + public static CreateInterruptRequest FromCreateInterruptRequestVariant2(global::Vectara.CreateInterruptRequestVariant2? value) => new CreateInterruptRequest(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.CreateLLMRequest.g.cs b/src/libs/Vectara/Generated/Vectara.Models.CreateLLMRequest.g.cs index ca274e32..8c1fb8ee 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.CreateLLMRequest.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.CreateLLMRequest.g.cs @@ -44,6 +44,13 @@ public bool TryPickOpenaiCompatible( return IsOpenaiCompatible; } + /// + /// + /// + public global::Vectara.CreateOpenAILLMRequest PickOpenaiCompatible() => IsOpenaiCompatible + ? OpenaiCompatible!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'OpenaiCompatible' but the value was {ToString()}."); + /// /// Request to create an OpenAI Responses API Large Language Model connection for reasoning models like o1, o3. /// @@ -74,6 +81,13 @@ public bool TryPickOpenaiResponses( return IsOpenaiResponses; } + /// + /// + /// + public global::Vectara.CreateOpenAIResponsesLLMRequest PickOpenaiResponses() => IsOpenaiResponses + ? OpenaiResponses!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'OpenaiResponses' but the value was {ToString()}."); + /// /// Request to create a Vertex AI Large Language Model connection for Gemini models. /// @@ -104,6 +118,13 @@ public bool TryPickVertexAi( return IsVertexAi; } + /// + /// + /// + public global::Vectara.CreateVertexAILLMRequest PickVertexAi() => IsVertexAi + ? VertexAi! + : throw new global::System.InvalidOperationException($"Expected union variant 'VertexAi' but the value was {ToString()}."); + /// /// Request to create an Anthropic Large Language Model connection for Claude models (direct API, Bedrock, or Vertex). /// @@ -133,6 +154,13 @@ public bool TryPickAnthropic( value = Anthropic; return IsAnthropic; } + + /// + /// + /// + public global::Vectara.CreateAnthropicLLMRequest PickAnthropic() => IsAnthropic + ? Anthropic! + : throw new global::System.InvalidOperationException($"Expected union variant 'Anthropic' but the value was {ToString()}."); /// /// /// @@ -151,6 +179,11 @@ public CreateLLMRequest(global::Vectara.CreateOpenAILLMRequest? value) OpenaiCompatible = value; } + /// + /// + /// + public static CreateLLMRequest FromOpenaiCompatible(global::Vectara.CreateOpenAILLMRequest? value) => new CreateLLMRequest(value); + /// /// /// @@ -169,6 +202,11 @@ public CreateLLMRequest(global::Vectara.CreateOpenAIResponsesLLMRequest? value) OpenaiResponses = value; } + /// + /// + /// + public static CreateLLMRequest FromOpenaiResponses(global::Vectara.CreateOpenAIResponsesLLMRequest? value) => new CreateLLMRequest(value); + /// /// /// @@ -187,6 +225,11 @@ public CreateLLMRequest(global::Vectara.CreateVertexAILLMRequest? value) VertexAi = value; } + /// + /// + /// + public static CreateLLMRequest FromVertexAi(global::Vectara.CreateVertexAILLMRequest? value) => new CreateLLMRequest(value); + /// /// /// @@ -205,6 +248,11 @@ public CreateLLMRequest(global::Vectara.CreateAnthropicLLMRequest? value) Anthropic = value; } + /// + /// + /// + public static CreateLLMRequest FromAnthropic(global::Vectara.CreateAnthropicLLMRequest? value) => new CreateLLMRequest(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.CreateOpenAILLMRequest.g.cs b/src/libs/Vectara/Generated/Vectara.Models.CreateOpenAILLMRequest.g.cs index b6a23752..278edc5d 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.CreateOpenAILLMRequest.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.CreateOpenAILLMRequest.g.cs @@ -39,6 +39,13 @@ public bool TryPickBase( return IsBase; } + /// + /// + /// + public global::Vectara.OpenAILLMRequestBase PickBase() => IsBase + ? Base! + : throw new global::System.InvalidOperationException($"Expected union variant 'Base' but the value was {ToString()}."); + /// /// /// @@ -68,6 +75,13 @@ public bool TryPickCreateOpenAILLMRequestVariant2( value = CreateOpenAILLMRequestVariant2; return IsCreateOpenAILLMRequestVariant2; } + + /// + /// + /// + public global::Vectara.CreateOpenAILLMRequestVariant2 PickCreateOpenAILLMRequestVariant2() => IsCreateOpenAILLMRequestVariant2 + ? CreateOpenAILLMRequestVariant2! + : throw new global::System.InvalidOperationException($"Expected union variant 'CreateOpenAILLMRequestVariant2' but the value was {ToString()}."); /// /// /// @@ -86,6 +100,11 @@ public CreateOpenAILLMRequest(global::Vectara.OpenAILLMRequestBase? value) Base = value; } + /// + /// + /// + public static CreateOpenAILLMRequest FromBase(global::Vectara.OpenAILLMRequestBase? value) => new CreateOpenAILLMRequest(value); + /// /// /// @@ -104,6 +123,11 @@ public CreateOpenAILLMRequest(global::Vectara.CreateOpenAILLMRequestVariant2? va CreateOpenAILLMRequestVariant2 = value; } + /// + /// + /// + public static CreateOpenAILLMRequest FromCreateOpenAILLMRequestVariant2(global::Vectara.CreateOpenAILLMRequestVariant2? value) => new CreateOpenAILLMRequest(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.CreateOpenAIResponsesLLMRequest.g.cs b/src/libs/Vectara/Generated/Vectara.Models.CreateOpenAIResponsesLLMRequest.g.cs index 5b43d770..1ee1806a 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.CreateOpenAIResponsesLLMRequest.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.CreateOpenAIResponsesLLMRequest.g.cs @@ -39,6 +39,13 @@ public bool TryPickBase( return IsBase; } + /// + /// + /// + public global::Vectara.OpenAILLMRequestBase PickBase() => IsBase + ? Base! + : throw new global::System.InvalidOperationException($"Expected union variant 'Base' but the value was {ToString()}."); + /// /// /// @@ -68,6 +75,13 @@ public bool TryPickCreateOpenAIResponsesLLMRequestVariant2( value = CreateOpenAIResponsesLLMRequestVariant2; return IsCreateOpenAIResponsesLLMRequestVariant2; } + + /// + /// + /// + public global::Vectara.CreateOpenAIResponsesLLMRequestVariant2 PickCreateOpenAIResponsesLLMRequestVariant2() => IsCreateOpenAIResponsesLLMRequestVariant2 + ? CreateOpenAIResponsesLLMRequestVariant2! + : throw new global::System.InvalidOperationException($"Expected union variant 'CreateOpenAIResponsesLLMRequestVariant2' but the value was {ToString()}."); /// /// /// @@ -86,6 +100,11 @@ public CreateOpenAIResponsesLLMRequest(global::Vectara.OpenAILLMRequestBase? val Base = value; } + /// + /// + /// + public static CreateOpenAIResponsesLLMRequest FromBase(global::Vectara.OpenAILLMRequestBase? value) => new CreateOpenAIResponsesLLMRequest(value); + /// /// /// @@ -104,6 +123,11 @@ public CreateOpenAIResponsesLLMRequest(global::Vectara.CreateOpenAIResponsesLLMR CreateOpenAIResponsesLLMRequestVariant2 = value; } + /// + /// + /// + public static CreateOpenAIResponsesLLMRequest FromCreateOpenAIResponsesLLMRequestVariant2(global::Vectara.CreateOpenAIResponsesLLMRequestVariant2? value) => new CreateOpenAIResponsesLLMRequest(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.CreateToolRequest.g.cs b/src/libs/Vectara/Generated/Vectara.Models.CreateToolRequest.g.cs index f471fcc1..c37763e6 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.CreateToolRequest.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.CreateToolRequest.g.cs @@ -44,6 +44,13 @@ public bool TryPickLambda( value = Lambda; return IsLambda; } + + /// + /// + /// + public global::Vectara.CreateLambdaToolRequest PickLambda() => IsLambda + ? Lambda! + : throw new global::System.InvalidOperationException($"Expected union variant 'Lambda' but the value was {ToString()}."); /// /// /// @@ -62,6 +69,11 @@ public CreateToolRequest(global::Vectara.CreateLambdaToolRequest? value) Lambda = value; } + /// + /// + /// + public static CreateToolRequest FromLambda(global::Vectara.CreateLambdaToolRequest? value) => new CreateToolRequest(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.DocumentConversionTool.g.cs b/src/libs/Vectara/Generated/Vectara.Models.DocumentConversionTool.g.cs index 076c558e..abc68399 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.DocumentConversionTool.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.DocumentConversionTool.g.cs @@ -39,6 +39,13 @@ public bool TryPickBase( return IsBase; } + /// + /// + /// + public global::Vectara.ToolBase PickBase() => IsBase + ? Base! + : throw new global::System.InvalidOperationException($"Expected union variant 'Base' but the value was {ToString()}."); + /// /// /// @@ -68,6 +75,13 @@ public bool TryPickDocumentConversionToolVariant2( value = DocumentConversionToolVariant2; return IsDocumentConversionToolVariant2; } + + /// + /// + /// + public global::Vectara.DocumentConversionToolVariant2 PickDocumentConversionToolVariant2() => IsDocumentConversionToolVariant2 + ? DocumentConversionToolVariant2! + : throw new global::System.InvalidOperationException($"Expected union variant 'DocumentConversionToolVariant2' but the value was {ToString()}."); /// /// /// @@ -86,6 +100,11 @@ public DocumentConversionTool(global::Vectara.ToolBase? value) Base = value; } + /// + /// + /// + public static DocumentConversionTool FromBase(global::Vectara.ToolBase? value) => new DocumentConversionTool(value); + /// /// /// @@ -104,6 +123,11 @@ public DocumentConversionTool(global::Vectara.DocumentConversionToolVariant2? va DocumentConversionToolVariant2 = value; } + /// + /// + /// + public static DocumentConversionTool FromDocumentConversionToolVariant2(global::Vectara.DocumentConversionToolVariant2? value) => new DocumentConversionTool(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.DynamicVectaraTool.g.cs b/src/libs/Vectara/Generated/Vectara.Models.DynamicVectaraTool.g.cs index b2d990a4..5ffd8dce 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.DynamicVectaraTool.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.DynamicVectaraTool.g.cs @@ -39,6 +39,13 @@ public bool TryPickBase( return IsBase; } + /// + /// + /// + public global::Vectara.ToolBase PickBase() => IsBase + ? Base! + : throw new global::System.InvalidOperationException($"Expected union variant 'Base' but the value was {ToString()}."); + /// /// /// @@ -68,6 +75,13 @@ public bool TryPickDynamicVectaraToolVariant2( value = DynamicVectaraToolVariant2; return IsDynamicVectaraToolVariant2; } + + /// + /// + /// + public global::Vectara.DynamicVectaraToolVariant2 PickDynamicVectaraToolVariant2() => IsDynamicVectaraToolVariant2 + ? DynamicVectaraToolVariant2! + : throw new global::System.InvalidOperationException($"Expected union variant 'DynamicVectaraToolVariant2' but the value was {ToString()}."); /// /// /// @@ -86,6 +100,11 @@ public DynamicVectaraTool(global::Vectara.ToolBase? value) Base = value; } + /// + /// + /// + public static DynamicVectaraTool FromBase(global::Vectara.ToolBase? value) => new DynamicVectaraTool(value); + /// /// /// @@ -104,6 +123,11 @@ public DynamicVectaraTool(global::Vectara.DynamicVectaraToolVariant2? value) DynamicVectaraToolVariant2 = value; } + /// + /// + /// + public static DynamicVectaraTool FromDynamicVectaraToolVariant2(global::Vectara.DynamicVectaraToolVariant2? value) => new DynamicVectaraTool(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.ExecuteToolTraceSpan.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ExecuteToolTraceSpan.g.cs index ddeba799..30c3c37b 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.ExecuteToolTraceSpan.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.ExecuteToolTraceSpan.g.cs @@ -39,6 +39,13 @@ public bool TryPickAgentBase( return IsAgentBase; } + /// + /// + /// + public global::Vectara.AgentTraceSpanBase PickAgentBase() => IsAgentBase + ? AgentBase! + : throw new global::System.InvalidOperationException($"Expected union variant 'AgentBase' but the value was {ToString()}."); + /// /// /// @@ -68,6 +75,13 @@ public bool TryPickExecuteToolTraceSpanVariant2( value = ExecuteToolTraceSpanVariant2; return IsExecuteToolTraceSpanVariant2; } + + /// + /// + /// + public global::Vectara.ExecuteToolTraceSpanVariant2 PickExecuteToolTraceSpanVariant2() => IsExecuteToolTraceSpanVariant2 + ? ExecuteToolTraceSpanVariant2! + : throw new global::System.InvalidOperationException($"Expected union variant 'ExecuteToolTraceSpanVariant2' but the value was {ToString()}."); /// /// /// @@ -86,6 +100,11 @@ public ExecuteToolTraceSpan(global::Vectara.AgentTraceSpanBase? value) AgentBase = value; } + /// + /// + /// + public static ExecuteToolTraceSpan FromAgentBase(global::Vectara.AgentTraceSpanBase? value) => new ExecuteToolTraceSpan(value); + /// /// /// @@ -104,6 +123,11 @@ public ExecuteToolTraceSpan(global::Vectara.ExecuteToolTraceSpanVariant2? value) ExecuteToolTraceSpanVariant2 = value; } + /// + /// + /// + public static ExecuteToolTraceSpan FromExecuteToolTraceSpanVariant2(global::Vectara.ExecuteToolTraceSpanVariant2? value) => new ExecuteToolTraceSpan(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.GetDocumentTextTool.g.cs b/src/libs/Vectara/Generated/Vectara.Models.GetDocumentTextTool.g.cs index c322411e..9182b171 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.GetDocumentTextTool.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.GetDocumentTextTool.g.cs @@ -39,6 +39,13 @@ public bool TryPickBase( return IsBase; } + /// + /// + /// + public global::Vectara.ToolBase PickBase() => IsBase + ? Base! + : throw new global::System.InvalidOperationException($"Expected union variant 'Base' but the value was {ToString()}."); + /// /// /// @@ -68,6 +75,13 @@ public bool TryPickGetDocumentTextToolVariant2( value = GetDocumentTextToolVariant2; return IsGetDocumentTextToolVariant2; } + + /// + /// + /// + public global::Vectara.GetDocumentTextToolVariant2 PickGetDocumentTextToolVariant2() => IsGetDocumentTextToolVariant2 + ? GetDocumentTextToolVariant2! + : throw new global::System.InvalidOperationException($"Expected union variant 'GetDocumentTextToolVariant2' but the value was {ToString()}."); /// /// /// @@ -86,6 +100,11 @@ public GetDocumentTextTool(global::Vectara.ToolBase? value) Base = value; } + /// + /// + /// + public static GetDocumentTextTool FromBase(global::Vectara.ToolBase? value) => new GetDocumentTextTool(value); + /// /// /// @@ -104,6 +123,11 @@ public GetDocumentTextTool(global::Vectara.GetDocumentTextToolVariant2? value) GetDocumentTextToolVariant2 = value; } + /// + /// + /// + public static GetDocumentTextTool FromGetDocumentTextToolVariant2(global::Vectara.GetDocumentTextToolVariant2? value) => new GetDocumentTextTool(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.GuardrailTraceSpan.g.cs b/src/libs/Vectara/Generated/Vectara.Models.GuardrailTraceSpan.g.cs index 9b6b37b8..d2f270bd 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.GuardrailTraceSpan.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.GuardrailTraceSpan.g.cs @@ -39,6 +39,13 @@ public bool TryPickAgentBase( return IsAgentBase; } + /// + /// + /// + public global::Vectara.AgentTraceSpanBase PickAgentBase() => IsAgentBase + ? AgentBase! + : throw new global::System.InvalidOperationException($"Expected union variant 'AgentBase' but the value was {ToString()}."); + /// /// /// @@ -68,6 +75,13 @@ public bool TryPickGuardrailTraceSpanVariant2( value = GuardrailTraceSpanVariant2; return IsGuardrailTraceSpanVariant2; } + + /// + /// + /// + public global::Vectara.GuardrailTraceSpanVariant2 PickGuardrailTraceSpanVariant2() => IsGuardrailTraceSpanVariant2 + ? GuardrailTraceSpanVariant2! + : throw new global::System.InvalidOperationException($"Expected union variant 'GuardrailTraceSpanVariant2' but the value was {ToString()}."); /// /// /// @@ -86,6 +100,11 @@ public GuardrailTraceSpan(global::Vectara.AgentTraceSpanBase? value) AgentBase = value; } + /// + /// + /// + public static GuardrailTraceSpan FromAgentBase(global::Vectara.AgentTraceSpanBase? value) => new GuardrailTraceSpan(value); + /// /// /// @@ -104,6 +123,11 @@ public GuardrailTraceSpan(global::Vectara.GuardrailTraceSpanVariant2? value) GuardrailTraceSpanVariant2 = value; } + /// + /// + /// + public static GuardrailTraceSpan FromGuardrailTraceSpanVariant2(global::Vectara.GuardrailTraceSpanVariant2? value) => new GuardrailTraceSpan(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.ImageReadEvent.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ImageReadEvent.g.cs index dd6f79c6..65e12e88 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.ImageReadEvent.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.ImageReadEvent.g.cs @@ -39,6 +39,13 @@ public bool TryPickAgentBase( return IsAgentBase; } + /// + /// + /// + public global::Vectara.AgentEventBase PickAgentBase() => IsAgentBase + ? AgentBase! + : throw new global::System.InvalidOperationException($"Expected union variant 'AgentBase' but the value was {ToString()}."); + /// /// /// @@ -68,6 +75,13 @@ public bool TryPickImageReadEventVariant2( value = ImageReadEventVariant2; return IsImageReadEventVariant2; } + + /// + /// + /// + public global::Vectara.ImageReadEventVariant2 PickImageReadEventVariant2() => IsImageReadEventVariant2 + ? ImageReadEventVariant2! + : throw new global::System.InvalidOperationException($"Expected union variant 'ImageReadEventVariant2' but the value was {ToString()}."); /// /// /// @@ -86,6 +100,11 @@ public ImageReadEvent(global::Vectara.AgentEventBase? value) AgentBase = value; } + /// + /// + /// + public static ImageReadEvent FromAgentBase(global::Vectara.AgentEventBase? value) => new ImageReadEvent(value); + /// /// /// @@ -104,6 +123,11 @@ public ImageReadEvent(global::Vectara.ImageReadEventVariant2? value) ImageReadEventVariant2 = value; } + /// + /// + /// + public static ImageReadEvent FromImageReadEventVariant2(global::Vectara.ImageReadEventVariant2? value) => new ImageReadEvent(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.ImageReadTool.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ImageReadTool.g.cs index faf0af88..3d50af73 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.ImageReadTool.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.ImageReadTool.g.cs @@ -39,6 +39,13 @@ public bool TryPickBase( return IsBase; } + /// + /// + /// + public global::Vectara.ToolBase PickBase() => IsBase + ? Base! + : throw new global::System.InvalidOperationException($"Expected union variant 'Base' but the value was {ToString()}."); + /// /// /// @@ -68,6 +75,13 @@ public bool TryPickImageReadToolVariant2( value = ImageReadToolVariant2; return IsImageReadToolVariant2; } + + /// + /// + /// + public global::Vectara.ImageReadToolVariant2 PickImageReadToolVariant2() => IsImageReadToolVariant2 + ? ImageReadToolVariant2! + : throw new global::System.InvalidOperationException($"Expected union variant 'ImageReadToolVariant2' but the value was {ToString()}."); /// /// /// @@ -86,6 +100,11 @@ public ImageReadTool(global::Vectara.ToolBase? value) Base = value; } + /// + /// + /// + public static ImageReadTool FromBase(global::Vectara.ToolBase? value) => new ImageReadTool(value); + /// /// /// @@ -104,6 +123,11 @@ public ImageReadTool(global::Vectara.ImageReadToolVariant2? value) ImageReadToolVariant2 = value; } + /// + /// + /// + public static ImageReadTool FromImageReadToolVariant2(global::Vectara.ImageReadToolVariant2? value) => new ImageReadTool(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.ImageReadTraceSpan.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ImageReadTraceSpan.g.cs index ff9d2108..e0ab95ae 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.ImageReadTraceSpan.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.ImageReadTraceSpan.g.cs @@ -39,6 +39,13 @@ public bool TryPickAgentBase( return IsAgentBase; } + /// + /// + /// + public global::Vectara.AgentTraceSpanBase PickAgentBase() => IsAgentBase + ? AgentBase! + : throw new global::System.InvalidOperationException($"Expected union variant 'AgentBase' but the value was {ToString()}."); + /// /// /// @@ -68,6 +75,13 @@ public bool TryPickImageReadTraceSpanVariant2( value = ImageReadTraceSpanVariant2; return IsImageReadTraceSpanVariant2; } + + /// + /// + /// + public global::Vectara.ImageReadTraceSpanVariant2 PickImageReadTraceSpanVariant2() => IsImageReadTraceSpanVariant2 + ? ImageReadTraceSpanVariant2! + : throw new global::System.InvalidOperationException($"Expected union variant 'ImageReadTraceSpanVariant2' but the value was {ToString()}."); /// /// /// @@ -86,6 +100,11 @@ public ImageReadTraceSpan(global::Vectara.AgentTraceSpanBase? value) AgentBase = value; } + /// + /// + /// + public static ImageReadTraceSpan FromAgentBase(global::Vectara.AgentTraceSpanBase? value) => new ImageReadTraceSpan(value); + /// /// /// @@ -104,6 +123,11 @@ public ImageReadTraceSpan(global::Vectara.ImageReadTraceSpanVariant2? value) ImageReadTraceSpanVariant2 = value; } + /// + /// + /// + public static ImageReadTraceSpan FromImageReadTraceSpanVariant2(global::Vectara.ImageReadTraceSpanVariant2? value) => new ImageReadTraceSpan(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineArtifactCreateToolConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineArtifactCreateToolConfiguration.g.cs index 4a2811ca..bb5b558e 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InlineArtifactCreateToolConfiguration.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineArtifactCreateToolConfiguration.g.cs @@ -39,6 +39,13 @@ public bool TryPickAgentBase( return IsAgentBase; } + /// + /// + /// + public global::Vectara.AgentToolConfigurationBase PickAgentBase() => IsAgentBase + ? AgentBase! + : throw new global::System.InvalidOperationException($"Expected union variant 'AgentBase' but the value was {ToString()}."); + /// /// /// @@ -68,6 +75,13 @@ public bool TryPickInlineArtifactCreateToolConfigurationVariant2( value = InlineArtifactCreateToolConfigurationVariant2; return IsInlineArtifactCreateToolConfigurationVariant2; } + + /// + /// + /// + public global::Vectara.InlineArtifactCreateToolConfigurationVariant2 PickInlineArtifactCreateToolConfigurationVariant2() => IsInlineArtifactCreateToolConfigurationVariant2 + ? InlineArtifactCreateToolConfigurationVariant2! + : throw new global::System.InvalidOperationException($"Expected union variant 'InlineArtifactCreateToolConfigurationVariant2' but the value was {ToString()}."); /// /// /// @@ -86,6 +100,11 @@ public InlineArtifactCreateToolConfiguration(global::Vectara.AgentToolConfigurat AgentBase = value; } + /// + /// + /// + public static InlineArtifactCreateToolConfiguration FromAgentBase(global::Vectara.AgentToolConfigurationBase? value) => new InlineArtifactCreateToolConfiguration(value); + /// /// /// @@ -104,6 +123,11 @@ public InlineArtifactCreateToolConfiguration(global::Vectara.InlineArtifactCreat InlineArtifactCreateToolConfigurationVariant2 = value; } + /// + /// + /// + public static InlineArtifactCreateToolConfiguration FromInlineArtifactCreateToolConfigurationVariant2(global::Vectara.InlineArtifactCreateToolConfigurationVariant2? value) => new InlineArtifactCreateToolConfiguration(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineArtifactGrepToolConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineArtifactGrepToolConfiguration.g.cs index 15b18d35..c919615b 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InlineArtifactGrepToolConfiguration.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineArtifactGrepToolConfiguration.g.cs @@ -39,6 +39,13 @@ public bool TryPickAgentBase( return IsAgentBase; } + /// + /// + /// + public global::Vectara.AgentToolConfigurationBase PickAgentBase() => IsAgentBase + ? AgentBase! + : throw new global::System.InvalidOperationException($"Expected union variant 'AgentBase' but the value was {ToString()}."); + /// /// /// @@ -68,6 +75,13 @@ public bool TryPickInlineArtifactGrepToolConfigurationVariant2( value = InlineArtifactGrepToolConfigurationVariant2; return IsInlineArtifactGrepToolConfigurationVariant2; } + + /// + /// + /// + public global::Vectara.InlineArtifactGrepToolConfigurationVariant2 PickInlineArtifactGrepToolConfigurationVariant2() => IsInlineArtifactGrepToolConfigurationVariant2 + ? InlineArtifactGrepToolConfigurationVariant2! + : throw new global::System.InvalidOperationException($"Expected union variant 'InlineArtifactGrepToolConfigurationVariant2' but the value was {ToString()}."); /// /// /// @@ -86,6 +100,11 @@ public InlineArtifactGrepToolConfiguration(global::Vectara.AgentToolConfiguratio AgentBase = value; } + /// + /// + /// + public static InlineArtifactGrepToolConfiguration FromAgentBase(global::Vectara.AgentToolConfigurationBase? value) => new InlineArtifactGrepToolConfiguration(value); + /// /// /// @@ -104,6 +123,11 @@ public InlineArtifactGrepToolConfiguration(global::Vectara.InlineArtifactGrepToo InlineArtifactGrepToolConfigurationVariant2 = value; } + /// + /// + /// + public static InlineArtifactGrepToolConfiguration FromInlineArtifactGrepToolConfigurationVariant2(global::Vectara.InlineArtifactGrepToolConfigurationVariant2? value) => new InlineArtifactGrepToolConfiguration(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineArtifactReadToolConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineArtifactReadToolConfiguration.g.cs index ada647d2..64806a3b 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InlineArtifactReadToolConfiguration.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineArtifactReadToolConfiguration.g.cs @@ -39,6 +39,13 @@ public bool TryPickAgentBase( return IsAgentBase; } + /// + /// + /// + public global::Vectara.AgentToolConfigurationBase PickAgentBase() => IsAgentBase + ? AgentBase! + : throw new global::System.InvalidOperationException($"Expected union variant 'AgentBase' but the value was {ToString()}."); + /// /// /// @@ -68,6 +75,13 @@ public bool TryPickInlineArtifactReadToolConfigurationVariant2( value = InlineArtifactReadToolConfigurationVariant2; return IsInlineArtifactReadToolConfigurationVariant2; } + + /// + /// + /// + public global::Vectara.InlineArtifactReadToolConfigurationVariant2 PickInlineArtifactReadToolConfigurationVariant2() => IsInlineArtifactReadToolConfigurationVariant2 + ? InlineArtifactReadToolConfigurationVariant2! + : throw new global::System.InvalidOperationException($"Expected union variant 'InlineArtifactReadToolConfigurationVariant2' but the value was {ToString()}."); /// /// /// @@ -86,6 +100,11 @@ public InlineArtifactReadToolConfiguration(global::Vectara.AgentToolConfiguratio AgentBase = value; } + /// + /// + /// + public static InlineArtifactReadToolConfiguration FromAgentBase(global::Vectara.AgentToolConfigurationBase? value) => new InlineArtifactReadToolConfiguration(value); + /// /// /// @@ -104,6 +123,11 @@ public InlineArtifactReadToolConfiguration(global::Vectara.InlineArtifactReadToo InlineArtifactReadToolConfigurationVariant2 = value; } + /// + /// + /// + public static InlineArtifactReadToolConfiguration FromInlineArtifactReadToolConfigurationVariant2(global::Vectara.InlineArtifactReadToolConfigurationVariant2? value) => new InlineArtifactReadToolConfiguration(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineCorporaSearchToolConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineCorporaSearchToolConfiguration.g.cs index 1b76ef33..08a492ee 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InlineCorporaSearchToolConfiguration.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineCorporaSearchToolConfiguration.g.cs @@ -39,6 +39,13 @@ public bool TryPickAgentBase( return IsAgentBase; } + /// + /// + /// + public global::Vectara.AgentToolConfigurationBase PickAgentBase() => IsAgentBase + ? AgentBase! + : throw new global::System.InvalidOperationException($"Expected union variant 'AgentBase' but the value was {ToString()}."); + /// /// /// @@ -68,6 +75,13 @@ public bool TryPickInlineCorporaSearchToolConfigurationVariant2( value = InlineCorporaSearchToolConfigurationVariant2; return IsInlineCorporaSearchToolConfigurationVariant2; } + + /// + /// + /// + public global::Vectara.InlineCorporaSearchToolConfigurationVariant2 PickInlineCorporaSearchToolConfigurationVariant2() => IsInlineCorporaSearchToolConfigurationVariant2 + ? InlineCorporaSearchToolConfigurationVariant2! + : throw new global::System.InvalidOperationException($"Expected union variant 'InlineCorporaSearchToolConfigurationVariant2' but the value was {ToString()}."); /// /// /// @@ -86,6 +100,11 @@ public InlineCorporaSearchToolConfiguration(global::Vectara.AgentToolConfigurati AgentBase = value; } + /// + /// + /// + public static InlineCorporaSearchToolConfiguration FromAgentBase(global::Vectara.AgentToolConfigurationBase? value) => new InlineCorporaSearchToolConfiguration(value); + /// /// /// @@ -104,6 +123,11 @@ public InlineCorporaSearchToolConfiguration(global::Vectara.InlineCorporaSearchT InlineCorporaSearchToolConfigurationVariant2 = value; } + /// + /// + /// + public static InlineCorporaSearchToolConfiguration FromInlineCorporaSearchToolConfigurationVariant2(global::Vectara.InlineCorporaSearchToolConfigurationVariant2? value) => new InlineCorporaSearchToolConfiguration(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineDocumentConversionToolConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineDocumentConversionToolConfiguration.g.cs index a778566e..b5f1452f 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InlineDocumentConversionToolConfiguration.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineDocumentConversionToolConfiguration.g.cs @@ -39,6 +39,13 @@ public bool TryPickAgentBase( return IsAgentBase; } + /// + /// + /// + public global::Vectara.AgentToolConfigurationBase PickAgentBase() => IsAgentBase + ? AgentBase! + : throw new global::System.InvalidOperationException($"Expected union variant 'AgentBase' but the value was {ToString()}."); + /// /// /// @@ -68,6 +75,13 @@ public bool TryPickInlineDocumentConversionToolConfigurationVariant2( value = InlineDocumentConversionToolConfigurationVariant2; return IsInlineDocumentConversionToolConfigurationVariant2; } + + /// + /// + /// + public global::Vectara.InlineDocumentConversionToolConfigurationVariant2 PickInlineDocumentConversionToolConfigurationVariant2() => IsInlineDocumentConversionToolConfigurationVariant2 + ? InlineDocumentConversionToolConfigurationVariant2! + : throw new global::System.InvalidOperationException($"Expected union variant 'InlineDocumentConversionToolConfigurationVariant2' but the value was {ToString()}."); /// /// /// @@ -86,6 +100,11 @@ public InlineDocumentConversionToolConfiguration(global::Vectara.AgentToolConfig AgentBase = value; } + /// + /// + /// + public static InlineDocumentConversionToolConfiguration FromAgentBase(global::Vectara.AgentToolConfigurationBase? value) => new InlineDocumentConversionToolConfiguration(value); + /// /// /// @@ -104,6 +123,11 @@ public InlineDocumentConversionToolConfiguration(global::Vectara.InlineDocumentC InlineDocumentConversionToolConfigurationVariant2 = value; } + /// + /// + /// + public static InlineDocumentConversionToolConfiguration FromInlineDocumentConversionToolConfigurationVariant2(global::Vectara.InlineDocumentConversionToolConfigurationVariant2? value) => new InlineDocumentConversionToolConfiguration(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineDynamicVectaraToolConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineDynamicVectaraToolConfiguration.g.cs index cac2c507..5bbf1e88 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InlineDynamicVectaraToolConfiguration.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineDynamicVectaraToolConfiguration.g.cs @@ -39,6 +39,13 @@ public bool TryPickAgentBase( return IsAgentBase; } + /// + /// + /// + public global::Vectara.AgentToolConfigurationBase PickAgentBase() => IsAgentBase + ? AgentBase! + : throw new global::System.InvalidOperationException($"Expected union variant 'AgentBase' but the value was {ToString()}."); + /// /// /// @@ -68,6 +75,13 @@ public bool TryPickInlineDynamicVectaraToolConfigurationVariant2( value = InlineDynamicVectaraToolConfigurationVariant2; return IsInlineDynamicVectaraToolConfigurationVariant2; } + + /// + /// + /// + public global::Vectara.InlineDynamicVectaraToolConfigurationVariant2 PickInlineDynamicVectaraToolConfigurationVariant2() => IsInlineDynamicVectaraToolConfigurationVariant2 + ? InlineDynamicVectaraToolConfigurationVariant2! + : throw new global::System.InvalidOperationException($"Expected union variant 'InlineDynamicVectaraToolConfigurationVariant2' but the value was {ToString()}."); /// /// /// @@ -86,6 +100,11 @@ public InlineDynamicVectaraToolConfiguration(global::Vectara.AgentToolConfigurat AgentBase = value; } + /// + /// + /// + public static InlineDynamicVectaraToolConfiguration FromAgentBase(global::Vectara.AgentToolConfigurationBase? value) => new InlineDynamicVectaraToolConfiguration(value); + /// /// /// @@ -104,6 +123,11 @@ public InlineDynamicVectaraToolConfiguration(global::Vectara.InlineDynamicVectar InlineDynamicVectaraToolConfigurationVariant2 = value; } + /// + /// + /// + public static InlineDynamicVectaraToolConfiguration FromInlineDynamicVectaraToolConfigurationVariant2(global::Vectara.InlineDynamicVectaraToolConfigurationVariant2? value) => new InlineDynamicVectaraToolConfiguration(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineGetDocumentTextToolConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineGetDocumentTextToolConfiguration.g.cs index a743313b..6ee3f91d 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InlineGetDocumentTextToolConfiguration.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineGetDocumentTextToolConfiguration.g.cs @@ -39,6 +39,13 @@ public bool TryPickAgentBase( return IsAgentBase; } + /// + /// + /// + public global::Vectara.AgentToolConfigurationBase PickAgentBase() => IsAgentBase + ? AgentBase! + : throw new global::System.InvalidOperationException($"Expected union variant 'AgentBase' but the value was {ToString()}."); + /// /// /// @@ -68,6 +75,13 @@ public bool TryPickInlineGetDocumentTextToolConfigurationVariant2( value = InlineGetDocumentTextToolConfigurationVariant2; return IsInlineGetDocumentTextToolConfigurationVariant2; } + + /// + /// + /// + public global::Vectara.InlineGetDocumentTextToolConfigurationVariant2 PickInlineGetDocumentTextToolConfigurationVariant2() => IsInlineGetDocumentTextToolConfigurationVariant2 + ? InlineGetDocumentTextToolConfigurationVariant2! + : throw new global::System.InvalidOperationException($"Expected union variant 'InlineGetDocumentTextToolConfigurationVariant2' but the value was {ToString()}."); /// /// /// @@ -86,6 +100,11 @@ public InlineGetDocumentTextToolConfiguration(global::Vectara.AgentToolConfigura AgentBase = value; } + /// + /// + /// + public static InlineGetDocumentTextToolConfiguration FromAgentBase(global::Vectara.AgentToolConfigurationBase? value) => new InlineGetDocumentTextToolConfiguration(value); + /// /// /// @@ -104,6 +123,11 @@ public InlineGetDocumentTextToolConfiguration(global::Vectara.InlineGetDocumentT InlineGetDocumentTextToolConfigurationVariant2 = value; } + /// + /// + /// + public static InlineGetDocumentTextToolConfiguration FromInlineGetDocumentTextToolConfigurationVariant2(global::Vectara.InlineGetDocumentTextToolConfigurationVariant2? value) => new InlineGetDocumentTextToolConfiguration(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineImageReadToolConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineImageReadToolConfiguration.g.cs index 257889c0..31e61311 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InlineImageReadToolConfiguration.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineImageReadToolConfiguration.g.cs @@ -39,6 +39,13 @@ public bool TryPickAgentBase( return IsAgentBase; } + /// + /// + /// + public global::Vectara.AgentToolConfigurationBase PickAgentBase() => IsAgentBase + ? AgentBase! + : throw new global::System.InvalidOperationException($"Expected union variant 'AgentBase' but the value was {ToString()}."); + /// /// /// @@ -68,6 +75,13 @@ public bool TryPickInlineImageReadToolConfigurationVariant2( value = InlineImageReadToolConfigurationVariant2; return IsInlineImageReadToolConfigurationVariant2; } + + /// + /// + /// + public global::Vectara.InlineImageReadToolConfigurationVariant2 PickInlineImageReadToolConfigurationVariant2() => IsInlineImageReadToolConfigurationVariant2 + ? InlineImageReadToolConfigurationVariant2! + : throw new global::System.InvalidOperationException($"Expected union variant 'InlineImageReadToolConfigurationVariant2' but the value was {ToString()}."); /// /// /// @@ -86,6 +100,11 @@ public InlineImageReadToolConfiguration(global::Vectara.AgentToolConfigurationBa AgentBase = value; } + /// + /// + /// + public static InlineImageReadToolConfiguration FromAgentBase(global::Vectara.AgentToolConfigurationBase? value) => new InlineImageReadToolConfiguration(value); + /// /// /// @@ -104,6 +123,11 @@ public InlineImageReadToolConfiguration(global::Vectara.InlineImageReadToolConfi InlineImageReadToolConfigurationVariant2 = value; } + /// + /// + /// + public static InlineImageReadToolConfiguration FromInlineImageReadToolConfigurationVariant2(global::Vectara.InlineImageReadToolConfigurationVariant2? value) => new InlineImageReadToolConfiguration(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineInstruction.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineInstruction.g.cs index 2f552932..925e04c4 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InlineInstruction.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineInstruction.g.cs @@ -39,6 +39,13 @@ public bool TryPickRequestBase( return IsRequestBase; } + /// + /// + /// + public global::Vectara.InstructionRequestBase PickRequestBase() => IsRequestBase + ? RequestBase! + : throw new global::System.InvalidOperationException($"Expected union variant 'RequestBase' but the value was {ToString()}."); + /// /// /// @@ -68,6 +75,13 @@ public bool TryPickInlineInstructionVariant2( value = InlineInstructionVariant2; return IsInlineInstructionVariant2; } + + /// + /// + /// + public global::Vectara.InlineInstructionVariant2 PickInlineInstructionVariant2() => IsInlineInstructionVariant2 + ? InlineInstructionVariant2! + : throw new global::System.InvalidOperationException($"Expected union variant 'InlineInstructionVariant2' but the value was {ToString()}."); /// /// /// @@ -86,6 +100,11 @@ public InlineInstruction(global::Vectara.InstructionRequestBase? value) RequestBase = value; } + /// + /// + /// + public static InlineInstruction FromRequestBase(global::Vectara.InstructionRequestBase? value) => new InlineInstruction(value); + /// /// /// @@ -104,6 +123,11 @@ public InlineInstruction(global::Vectara.InlineInstructionVariant2? value) InlineInstructionVariant2 = value; } + /// + /// + /// + public static InlineInstruction FromInlineInstructionVariant2(global::Vectara.InlineInstructionVariant2? value) => new InlineInstruction(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineLambdaToolConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineLambdaToolConfiguration.g.cs index d174c6fd..8caf28ba 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InlineLambdaToolConfiguration.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineLambdaToolConfiguration.g.cs @@ -39,6 +39,13 @@ public bool TryPickAgentBase( return IsAgentBase; } + /// + /// + /// + public global::Vectara.AgentToolConfigurationBase PickAgentBase() => IsAgentBase + ? AgentBase! + : throw new global::System.InvalidOperationException($"Expected union variant 'AgentBase' but the value was {ToString()}."); + /// /// /// @@ -68,6 +75,13 @@ public bool TryPickInlineLambdaToolConfigurationVariant2( value = InlineLambdaToolConfigurationVariant2; return IsInlineLambdaToolConfigurationVariant2; } + + /// + /// + /// + public global::Vectara.InlineLambdaToolConfigurationVariant2 PickInlineLambdaToolConfigurationVariant2() => IsInlineLambdaToolConfigurationVariant2 + ? InlineLambdaToolConfigurationVariant2! + : throw new global::System.InvalidOperationException($"Expected union variant 'InlineLambdaToolConfigurationVariant2' but the value was {ToString()}."); /// /// /// @@ -86,6 +100,11 @@ public InlineLambdaToolConfiguration(global::Vectara.AgentToolConfigurationBase? AgentBase = value; } + /// + /// + /// + public static InlineLambdaToolConfiguration FromAgentBase(global::Vectara.AgentToolConfigurationBase? value) => new InlineLambdaToolConfiguration(value); + /// /// /// @@ -104,6 +123,11 @@ public InlineLambdaToolConfiguration(global::Vectara.InlineLambdaToolConfigurati InlineLambdaToolConfigurationVariant2 = value; } + /// + /// + /// + public static InlineLambdaToolConfiguration FromInlineLambdaToolConfigurationVariant2(global::Vectara.InlineLambdaToolConfigurationVariant2? value) => new InlineLambdaToolConfiguration(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineMcpToolConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineMcpToolConfiguration.g.cs index 32adb0ff..b0848b9c 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InlineMcpToolConfiguration.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineMcpToolConfiguration.g.cs @@ -39,6 +39,13 @@ public bool TryPickAgentBase( return IsAgentBase; } + /// + /// + /// + public global::Vectara.AgentToolConfigurationBase PickAgentBase() => IsAgentBase + ? AgentBase! + : throw new global::System.InvalidOperationException($"Expected union variant 'AgentBase' but the value was {ToString()}."); + /// /// /// @@ -68,6 +75,13 @@ public bool TryPickInlineMcpToolConfigurationVariant2( value = InlineMcpToolConfigurationVariant2; return IsInlineMcpToolConfigurationVariant2; } + + /// + /// + /// + public global::Vectara.InlineMcpToolConfigurationVariant2 PickInlineMcpToolConfigurationVariant2() => IsInlineMcpToolConfigurationVariant2 + ? InlineMcpToolConfigurationVariant2! + : throw new global::System.InvalidOperationException($"Expected union variant 'InlineMcpToolConfigurationVariant2' but the value was {ToString()}."); /// /// /// @@ -86,6 +100,11 @@ public InlineMcpToolConfiguration(global::Vectara.AgentToolConfigurationBase? va AgentBase = value; } + /// + /// + /// + public static InlineMcpToolConfiguration FromAgentBase(global::Vectara.AgentToolConfigurationBase? value) => new InlineMcpToolConfiguration(value); + /// /// /// @@ -104,6 +123,11 @@ public InlineMcpToolConfiguration(global::Vectara.InlineMcpToolConfigurationVari InlineMcpToolConfigurationVariant2 = value; } + /// + /// + /// + public static InlineMcpToolConfiguration FromInlineMcpToolConfigurationVariant2(global::Vectara.InlineMcpToolConfigurationVariant2? value) => new InlineMcpToolConfiguration(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineSubAgentToolConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineSubAgentToolConfiguration.g.cs index f5bec625..aebee190 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InlineSubAgentToolConfiguration.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineSubAgentToolConfiguration.g.cs @@ -39,6 +39,13 @@ public bool TryPickBase( return IsBase; } + /// + /// + /// + public global::Vectara.AgentToolConfigurationBase PickBase() => IsBase + ? Base! + : throw new global::System.InvalidOperationException($"Expected union variant 'Base' but the value was {ToString()}."); + /// /// /// @@ -68,6 +75,13 @@ public bool TryPickInlineSubAgentToolConfigurationVariant2( value = InlineSubAgentToolConfigurationVariant2; return IsInlineSubAgentToolConfigurationVariant2; } + + /// + /// + /// + public global::Vectara.InlineSubAgentToolConfigurationVariant2 PickInlineSubAgentToolConfigurationVariant2() => IsInlineSubAgentToolConfigurationVariant2 + ? InlineSubAgentToolConfigurationVariant2! + : throw new global::System.InvalidOperationException($"Expected union variant 'InlineSubAgentToolConfigurationVariant2' but the value was {ToString()}."); /// /// /// @@ -86,6 +100,11 @@ public InlineSubAgentToolConfiguration(global::Vectara.AgentToolConfigurationBas Base = value; } + /// + /// + /// + public static InlineSubAgentToolConfiguration FromBase(global::Vectara.AgentToolConfigurationBase? value) => new InlineSubAgentToolConfiguration(value); + /// /// /// @@ -104,6 +123,11 @@ public InlineSubAgentToolConfiguration(global::Vectara.InlineSubAgentToolConfigu InlineSubAgentToolConfigurationVariant2 = value; } + /// + /// + /// + public static InlineSubAgentToolConfiguration FromInlineSubAgentToolConfigurationVariant2(global::Vectara.InlineSubAgentToolConfigurationVariant2? value) => new InlineSubAgentToolConfiguration(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineWebGetToolConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineWebGetToolConfiguration.g.cs index 255faf71..4b31e275 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InlineWebGetToolConfiguration.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineWebGetToolConfiguration.g.cs @@ -39,6 +39,13 @@ public bool TryPickAgentBase( return IsAgentBase; } + /// + /// + /// + public global::Vectara.AgentToolConfigurationBase PickAgentBase() => IsAgentBase + ? AgentBase! + : throw new global::System.InvalidOperationException($"Expected union variant 'AgentBase' but the value was {ToString()}."); + /// /// /// @@ -68,6 +75,13 @@ public bool TryPickInlineWebGetToolConfigurationVariant2( value = InlineWebGetToolConfigurationVariant2; return IsInlineWebGetToolConfigurationVariant2; } + + /// + /// + /// + public global::Vectara.InlineWebGetToolConfigurationVariant2 PickInlineWebGetToolConfigurationVariant2() => IsInlineWebGetToolConfigurationVariant2 + ? InlineWebGetToolConfigurationVariant2! + : throw new global::System.InvalidOperationException($"Expected union variant 'InlineWebGetToolConfigurationVariant2' but the value was {ToString()}."); /// /// /// @@ -86,6 +100,11 @@ public InlineWebGetToolConfiguration(global::Vectara.AgentToolConfigurationBase? AgentBase = value; } + /// + /// + /// + public static InlineWebGetToolConfiguration FromAgentBase(global::Vectara.AgentToolConfigurationBase? value) => new InlineWebGetToolConfiguration(value); + /// /// /// @@ -104,6 +123,11 @@ public InlineWebGetToolConfiguration(global::Vectara.InlineWebGetToolConfigurati InlineWebGetToolConfigurationVariant2 = value; } + /// + /// + /// + public static InlineWebGetToolConfiguration FromInlineWebGetToolConfigurationVariant2(global::Vectara.InlineWebGetToolConfigurationVariant2? value) => new InlineWebGetToolConfiguration(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineWebSearchToolConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineWebSearchToolConfiguration.g.cs index 09719c30..cbcaf4df 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InlineWebSearchToolConfiguration.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineWebSearchToolConfiguration.g.cs @@ -39,6 +39,13 @@ public bool TryPickAgentBase( return IsAgentBase; } + /// + /// + /// + public global::Vectara.AgentToolConfigurationBase PickAgentBase() => IsAgentBase + ? AgentBase! + : throw new global::System.InvalidOperationException($"Expected union variant 'AgentBase' but the value was {ToString()}."); + /// /// /// @@ -68,6 +75,13 @@ public bool TryPickInlineWebSearchToolConfigurationVariant2( value = InlineWebSearchToolConfigurationVariant2; return IsInlineWebSearchToolConfigurationVariant2; } + + /// + /// + /// + public global::Vectara.InlineWebSearchToolConfigurationVariant2 PickInlineWebSearchToolConfigurationVariant2() => IsInlineWebSearchToolConfigurationVariant2 + ? InlineWebSearchToolConfigurationVariant2! + : throw new global::System.InvalidOperationException($"Expected union variant 'InlineWebSearchToolConfigurationVariant2' but the value was {ToString()}."); /// /// /// @@ -86,6 +100,11 @@ public InlineWebSearchToolConfiguration(global::Vectara.AgentToolConfigurationBa AgentBase = value; } + /// + /// + /// + public static InlineWebSearchToolConfiguration FromAgentBase(global::Vectara.AgentToolConfigurationBase? value) => new InlineWebSearchToolConfiguration(value); + /// /// /// @@ -104,6 +123,11 @@ public InlineWebSearchToolConfiguration(global::Vectara.InlineWebSearchToolConfi InlineWebSearchToolConfigurationVariant2 = value; } + /// + /// + /// + public static InlineWebSearchToolConfiguration FromInlineWebSearchToolConfigurationVariant2(global::Vectara.InlineWebSearchToolConfigurationVariant2? value) => new InlineWebSearchToolConfiguration(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.InputMessageEvent.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InputMessageEvent.g.cs index 2547d232..f696b2b3 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InputMessageEvent.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InputMessageEvent.g.cs @@ -39,6 +39,13 @@ public bool TryPickAgentBase( return IsAgentBase; } + /// + /// + /// + public global::Vectara.AgentEventBase PickAgentBase() => IsAgentBase + ? AgentBase! + : throw new global::System.InvalidOperationException($"Expected union variant 'AgentBase' but the value was {ToString()}."); + /// /// /// @@ -68,6 +75,13 @@ public bool TryPickInputMessageEventVariant2( value = InputMessageEventVariant2; return IsInputMessageEventVariant2; } + + /// + /// + /// + public global::Vectara.InputMessageEventVariant2 PickInputMessageEventVariant2() => IsInputMessageEventVariant2 + ? InputMessageEventVariant2! + : throw new global::System.InvalidOperationException($"Expected union variant 'InputMessageEventVariant2' but the value was {ToString()}."); /// /// /// @@ -86,6 +100,11 @@ public InputMessageEvent(global::Vectara.AgentEventBase? value) AgentBase = value; } + /// + /// + /// + public static InputMessageEvent FromAgentBase(global::Vectara.AgentEventBase? value) => new InputMessageEvent(value); + /// /// /// @@ -104,6 +123,11 @@ public InputMessageEvent(global::Vectara.InputMessageEventVariant2? value) InputMessageEventVariant2 = value; } + /// + /// + /// + public static InputMessageEvent FromInputMessageEventVariant2(global::Vectara.InputMessageEventVariant2? value) => new InputMessageEvent(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.Instruction.g.cs b/src/libs/Vectara/Generated/Vectara.Models.Instruction.g.cs index af52a80a..8067e94b 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.Instruction.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.Instruction.g.cs @@ -43,6 +43,13 @@ public bool TryPickInitial( value = Initial; return IsInitial; } + + /// + /// + /// + public global::Vectara.InitialInstruction PickInitial() => IsInitial + ? Initial! + : throw new global::System.InvalidOperationException($"Expected union variant 'Initial' but the value was {ToString()}."); /// /// /// @@ -61,6 +68,11 @@ public Instruction(global::Vectara.InitialInstruction? value) Initial = value; } + /// + /// + /// + public static Instruction FromInitial(global::Vectara.InitialInstruction? value) => new Instruction(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.InvokeAgentTraceSpan.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InvokeAgentTraceSpan.g.cs index 70c8661e..da007f7e 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InvokeAgentTraceSpan.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InvokeAgentTraceSpan.g.cs @@ -39,6 +39,13 @@ public bool TryPickBase( return IsBase; } + /// + /// + /// + public global::Vectara.AgentTraceSpanBase PickBase() => IsBase + ? Base! + : throw new global::System.InvalidOperationException($"Expected union variant 'Base' but the value was {ToString()}."); + /// /// /// @@ -68,6 +75,13 @@ public bool TryPickInvokeAgentTraceSpanVariant2( value = InvokeAgentTraceSpanVariant2; return IsInvokeAgentTraceSpanVariant2; } + + /// + /// + /// + public global::Vectara.InvokeAgentTraceSpanVariant2 PickInvokeAgentTraceSpanVariant2() => IsInvokeAgentTraceSpanVariant2 + ? InvokeAgentTraceSpanVariant2! + : throw new global::System.InvalidOperationException($"Expected union variant 'InvokeAgentTraceSpanVariant2' but the value was {ToString()}."); /// /// /// @@ -86,6 +100,11 @@ public InvokeAgentTraceSpan(global::Vectara.AgentTraceSpanBase? value) Base = value; } + /// + /// + /// + public static InvokeAgentTraceSpan FromBase(global::Vectara.AgentTraceSpanBase? value) => new InvokeAgentTraceSpan(value); + /// /// /// @@ -104,6 +123,11 @@ public InvokeAgentTraceSpan(global::Vectara.InvokeAgentTraceSpanVariant2? value) InvokeAgentTraceSpanVariant2 = value; } + /// + /// + /// + public static InvokeAgentTraceSpan FromInvokeAgentTraceSpanVariant2(global::Vectara.InvokeAgentTraceSpanVariant2? value) => new InvokeAgentTraceSpan(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.KeyedSearchCorpus.g.cs b/src/libs/Vectara/Generated/Vectara.Models.KeyedSearchCorpus.g.cs index c45e92f2..e884d00c 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.KeyedSearchCorpus.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.KeyedSearchCorpus.g.cs @@ -39,6 +39,13 @@ public bool TryPickSearchCorpus( return IsSearchCorpus; } + /// + /// + /// + public global::Vectara.SearchCorpus PickSearchCorpus() => IsSearchCorpus + ? SearchCorpus! + : throw new global::System.InvalidOperationException($"Expected union variant 'SearchCorpus' but the value was {ToString()}."); + /// /// /// @@ -68,6 +75,13 @@ public bool TryPickKeyedSearchCorpusVariant2( value = KeyedSearchCorpusVariant2; return IsKeyedSearchCorpusVariant2; } + + /// + /// + /// + public global::Vectara.KeyedSearchCorpusVariant2 PickKeyedSearchCorpusVariant2() => IsKeyedSearchCorpusVariant2 + ? KeyedSearchCorpusVariant2! + : throw new global::System.InvalidOperationException($"Expected union variant 'KeyedSearchCorpusVariant2' but the value was {ToString()}."); /// /// /// @@ -86,6 +100,11 @@ public KeyedSearchCorpus(global::Vectara.SearchCorpus? value) SearchCorpus = value; } + /// + /// + /// + public static KeyedSearchCorpus FromSearchCorpus(global::Vectara.SearchCorpus? value) => new KeyedSearchCorpus(value); + /// /// /// @@ -104,6 +123,11 @@ public KeyedSearchCorpus(global::Vectara.KeyedSearchCorpusVariant2? value) KeyedSearchCorpusVariant2 = value; } + /// + /// + /// + public static KeyedSearchCorpus FromKeyedSearchCorpusVariant2(global::Vectara.KeyedSearchCorpusVariant2? value) => new KeyedSearchCorpus(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.LambdaTool.g.cs b/src/libs/Vectara/Generated/Vectara.Models.LambdaTool.g.cs index de472f22..bd1e1940 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.LambdaTool.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.LambdaTool.g.cs @@ -41,6 +41,13 @@ public bool TryPickBase( return IsBase; } + /// + /// + /// + public global::Vectara.ToolBase PickBase() => IsBase + ? Base! + : throw new global::System.InvalidOperationException($"Expected union variant 'Base' but the value was {ToString()}."); + /// /// /// @@ -70,6 +77,13 @@ public bool TryPickLambdaToolVariant2( value = LambdaToolVariant2; return IsLambdaToolVariant2; } + + /// + /// + /// + public global::Vectara.LambdaToolVariant2 PickLambdaToolVariant2() => IsLambdaToolVariant2 + ? LambdaToolVariant2! + : throw new global::System.InvalidOperationException($"Expected union variant 'LambdaToolVariant2' but the value was {ToString()}."); /// /// /// @@ -88,6 +102,11 @@ public LambdaTool(global::Vectara.ToolBase? value) Base = value; } + /// + /// + /// + public static LambdaTool FromBase(global::Vectara.ToolBase? value) => new LambdaTool(value); + /// /// /// @@ -106,6 +125,11 @@ public LambdaTool(global::Vectara.LambdaToolVariant2? value) LambdaToolVariant2 = value; } + /// + /// + /// + public static LambdaTool FromLambdaToolVariant2(global::Vectara.LambdaToolVariant2? value) => new LambdaTool(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.McpTool.g.cs b/src/libs/Vectara/Generated/Vectara.Models.McpTool.g.cs index 1e257b4c..320edd2c 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.McpTool.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.McpTool.g.cs @@ -39,6 +39,13 @@ public bool TryPickBase( return IsBase; } + /// + /// + /// + public global::Vectara.ToolBase PickBase() => IsBase + ? Base! + : throw new global::System.InvalidOperationException($"Expected union variant 'Base' but the value was {ToString()}."); + /// /// /// @@ -68,6 +75,13 @@ public bool TryPickMcpToolVariant2( value = McpToolVariant2; return IsMcpToolVariant2; } + + /// + /// + /// + public global::Vectara.McpToolVariant2 PickMcpToolVariant2() => IsMcpToolVariant2 + ? McpToolVariant2! + : throw new global::System.InvalidOperationException($"Expected union variant 'McpToolVariant2' but the value was {ToString()}."); /// /// /// @@ -86,6 +100,11 @@ public McpTool(global::Vectara.ToolBase? value) Base = value; } + /// + /// + /// + public static McpTool FromBase(global::Vectara.ToolBase? value) => new McpTool(value); + /// /// /// @@ -104,6 +123,11 @@ public McpTool(global::Vectara.McpToolVariant2? value) McpToolVariant2 = value; } + /// + /// + /// + public static McpTool FromMcpToolVariant2(global::Vectara.McpToolVariant2? value) => new McpTool(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.OutputTraceSpan.g.cs b/src/libs/Vectara/Generated/Vectara.Models.OutputTraceSpan.g.cs index 53ad40a4..f7b9a08e 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.OutputTraceSpan.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.OutputTraceSpan.g.cs @@ -39,6 +39,13 @@ public bool TryPickAgentBase( return IsAgentBase; } + /// + /// + /// + public global::Vectara.AgentTraceSpanBase PickAgentBase() => IsAgentBase + ? AgentBase! + : throw new global::System.InvalidOperationException($"Expected union variant 'AgentBase' but the value was {ToString()}."); + /// /// /// @@ -68,6 +75,13 @@ public bool TryPickOutputTraceSpanVariant2( value = OutputTraceSpanVariant2; return IsOutputTraceSpanVariant2; } + + /// + /// + /// + public global::Vectara.OutputTraceSpanVariant2 PickOutputTraceSpanVariant2() => IsOutputTraceSpanVariant2 + ? OutputTraceSpanVariant2! + : throw new global::System.InvalidOperationException($"Expected union variant 'OutputTraceSpanVariant2' but the value was {ToString()}."); /// /// /// @@ -86,6 +100,11 @@ public OutputTraceSpan(global::Vectara.AgentTraceSpanBase? value) AgentBase = value; } + /// + /// + /// + public static OutputTraceSpan FromAgentBase(global::Vectara.AgentTraceSpanBase? value) => new OutputTraceSpan(value); + /// /// /// @@ -104,6 +123,11 @@ public OutputTraceSpan(global::Vectara.OutputTraceSpanVariant2? value) OutputTraceSpanVariant2 = value; } + /// + /// + /// + public static OutputTraceSpan FromOutputTraceSpanVariant2(global::Vectara.OutputTraceSpanVariant2? value) => new OutputTraceSpan(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.PipelineSource.g.cs b/src/libs/Vectara/Generated/Vectara.Models.PipelineSource.g.cs index 3f1e3fbb..7070290b 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.PipelineSource.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.PipelineSource.g.cs @@ -43,6 +43,13 @@ public bool TryPickS3( value = S3; return IsS3; } + + /// + /// + /// + public global::Vectara.S3SourceConfiguration PickS3() => IsS3 + ? S3!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'S3' but the value was {ToString()}."); /// /// /// @@ -61,6 +68,11 @@ public PipelineSource(global::Vectara.S3SourceConfiguration? value) S3 = value; } + /// + /// + /// + public static PipelineSource FromS3(global::Vectara.S3SourceConfiguration? value) => new PipelineSource(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.PipelineTrigger.g.cs b/src/libs/Vectara/Generated/Vectara.Models.PipelineTrigger.g.cs index bd1e798c..4b4cf55f 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.PipelineTrigger.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.PipelineTrigger.g.cs @@ -44,6 +44,13 @@ public bool TryPickCron( return IsCron; } + /// + /// + /// + public global::Vectara.CronTriggerConfiguration PickCron() => IsCron + ? Cron! + : throw new global::System.InvalidOperationException($"Expected union variant 'Cron' but the value was {ToString()}."); + /// /// Run the pipeline at a fixed interval. /// @@ -74,6 +81,13 @@ public bool TryPickInterval( return IsInterval; } + /// + /// + /// + public global::Vectara.IntervalTriggerConfiguration PickInterval() => IsInterval + ? Interval! + : throw new global::System.InvalidOperationException($"Expected union variant 'Interval' but the value was {ToString()}."); + /// /// Pipeline is only triggered manually via the trigger endpoint. No automatic scheduling. /// @@ -103,6 +117,13 @@ public bool TryPickManual( value = Manual; return IsManual; } + + /// + /// + /// + public global::Vectara.ManualTriggerConfiguration PickManual() => IsManual + ? Manual! + : throw new global::System.InvalidOperationException($"Expected union variant 'Manual' but the value was {ToString()}."); /// /// /// @@ -121,6 +142,11 @@ public PipelineTrigger(global::Vectara.CronTriggerConfiguration? value) Cron = value; } + /// + /// + /// + public static PipelineTrigger FromCron(global::Vectara.CronTriggerConfiguration? value) => new PipelineTrigger(value); + /// /// /// @@ -139,6 +165,11 @@ public PipelineTrigger(global::Vectara.IntervalTriggerConfiguration? value) Interval = value; } + /// + /// + /// + public static PipelineTrigger FromInterval(global::Vectara.IntervalTriggerConfiguration? value) => new PipelineTrigger(value); + /// /// /// @@ -157,6 +188,11 @@ public PipelineTrigger(global::Vectara.ManualTriggerConfiguration? value) Manual = value; } + /// + /// + /// + public static PipelineTrigger FromManual(global::Vectara.ManualTriggerConfiguration? value) => new PipelineTrigger(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.PipelineVerification.g.cs b/src/libs/Vectara/Generated/Vectara.Models.PipelineVerification.g.cs index 1874e211..5cd85d6a 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.PipelineVerification.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.PipelineVerification.g.cs @@ -48,6 +48,13 @@ public bool TryPickCondition( return IsCondition; } + /// + /// + /// + public global::Vectara.ConditionVerification PickCondition() => IsCondition + ? Condition! + : throw new global::System.InvalidOperationException($"Expected union variant 'Condition' but the value was {ToString()}."); + /// /// Verify the worker agent's output using a separate judge agent. The judge agent receives
/// a summary of the worker agent's session and must produce a structured output with
@@ -80,6 +87,13 @@ public bool TryPickAgent( value = Agent; return IsAgent; } + + /// + /// + /// + public global::Vectara.AgentVerification PickAgent() => IsAgent + ? Agent! + : throw new global::System.InvalidOperationException($"Expected union variant 'Agent' but the value was {ToString()}."); /// /// /// @@ -98,6 +112,11 @@ public PipelineVerification(global::Vectara.ConditionVerification? value) Condition = value; } + /// + /// + /// + public static PipelineVerification FromCondition(global::Vectara.ConditionVerification? value) => new PipelineVerification(value); + /// /// /// @@ -116,6 +135,11 @@ public PipelineVerification(global::Vectara.AgentVerification? value) Agent = value; } + /// + /// + /// + public static PipelineVerification FromAgent(global::Vectara.AgentVerification? value) => new PipelineVerification(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.QueryHistorySpan.g.cs b/src/libs/Vectara/Generated/Vectara.Models.QueryHistorySpan.g.cs index 2cdf40f0..321c415e 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.QueryHistorySpan.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.QueryHistorySpan.g.cs @@ -44,6 +44,13 @@ public bool TryPickRephrase( return IsRephrase; } + /// + /// + /// + public global::Vectara.RephraseSpan PickRephrase() => IsRephrase + ? Rephrase! + : throw new global::System.InvalidOperationException($"Expected union variant 'Rephrase' but the value was {ToString()}."); + /// /// The search portion of the query pipeline. This occurs before any reranking span. /// @@ -74,6 +81,13 @@ public bool TryPickSearch( return IsSearch; } + /// + /// + /// + public global::Vectara.SearchSpan PickSearch() => IsSearch + ? Search! + : throw new global::System.InvalidOperationException($"Expected union variant 'Search' but the value was {ToString()}."); + /// /// The reranking of the search result. /// @@ -104,6 +118,13 @@ public bool TryPickRerank( return IsRerank; } + /// + /// + /// + public global::Vectara.RerankSpan PickRerank() => IsRerank + ? Rerank! + : throw new global::System.InvalidOperationException($"Expected union variant 'Rerank' but the value was {ToString()}."); + /// /// The generation by an LLM. /// @@ -134,6 +155,13 @@ public bool TryPickGeneration( return IsGeneration; } + /// + /// + /// + public global::Vectara.GenerationSpan PickGeneration() => IsGeneration + ? Generation! + : throw new global::System.InvalidOperationException($"Expected union variant 'Generation' but the value was {ToString()}."); + /// /// The factual consistency of the generation. /// @@ -164,6 +192,13 @@ public bool TryPickFcs( return IsFcs; } + /// + /// + /// + public global::Vectara.FactualConsistencyScoreSpan PickFcs() => IsFcs + ? Fcs! + : throw new global::System.InvalidOperationException($"Expected union variant 'Fcs' but the value was {ToString()}."); + /// /// Provides detailed information about a rewritten query generated for a specific corpus when intelligent query rewriting is enabled. /// @@ -193,6 +228,13 @@ public bool TryPickRewrittenQuery( value = RewrittenQuery; return IsRewrittenQuery; } + + /// + /// + /// + public global::Vectara.RewrittenQuerySpan PickRewrittenQuery() => IsRewrittenQuery + ? RewrittenQuery! + : throw new global::System.InvalidOperationException($"Expected union variant 'RewrittenQuery' but the value was {ToString()}."); /// /// /// @@ -211,6 +253,11 @@ public QueryHistorySpan(global::Vectara.RephraseSpan? value) Rephrase = value; } + /// + /// + /// + public static QueryHistorySpan FromRephrase(global::Vectara.RephraseSpan? value) => new QueryHistorySpan(value); + /// /// /// @@ -229,6 +276,11 @@ public QueryHistorySpan(global::Vectara.SearchSpan? value) Search = value; } + /// + /// + /// + public static QueryHistorySpan FromSearch(global::Vectara.SearchSpan? value) => new QueryHistorySpan(value); + /// /// /// @@ -247,6 +299,11 @@ public QueryHistorySpan(global::Vectara.RerankSpan? value) Rerank = value; } + /// + /// + /// + public static QueryHistorySpan FromRerank(global::Vectara.RerankSpan? value) => new QueryHistorySpan(value); + /// /// /// @@ -265,6 +322,11 @@ public QueryHistorySpan(global::Vectara.GenerationSpan? value) Generation = value; } + /// + /// + /// + public static QueryHistorySpan FromGeneration(global::Vectara.GenerationSpan? value) => new QueryHistorySpan(value); + /// /// /// @@ -283,6 +345,11 @@ public QueryHistorySpan(global::Vectara.FactualConsistencyScoreSpan? value) Fcs = value; } + /// + /// + /// + public static QueryHistorySpan FromFcs(global::Vectara.FactualConsistencyScoreSpan? value) => new QueryHistorySpan(value); + /// /// /// @@ -301,6 +368,11 @@ public QueryHistorySpan(global::Vectara.RewrittenQuerySpan? value) RewrittenQuery = value; } + /// + /// + /// + public static QueryHistorySpan FromRewrittenQuery(global::Vectara.RewrittenQuerySpan? value) => new QueryHistorySpan(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.QueryStreamedResponse.g.cs b/src/libs/Vectara/Generated/Vectara.Models.QueryStreamedResponse.g.cs index f19b005e..4b16764c 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.QueryStreamedResponse.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.QueryStreamedResponse.g.cs @@ -44,6 +44,13 @@ public bool TryPickSearchResults( return IsSearchResults; } + /// + /// + /// + public global::Vectara.StreamSearchResponse PickSearchResults() => IsSearchResults + ? SearchResults! + : throw new global::System.InvalidOperationException($"Expected union variant 'SearchResults' but the value was {ToString()}."); + /// /// The chunk response from the generation, which may be a partial generation. /// @@ -74,6 +81,13 @@ public bool TryPickGenerationChunk( return IsGenerationChunk; } + /// + /// + /// + public global::Vectara.StreamGenerationChunk PickGenerationChunk() => IsGenerationChunk + ? GenerationChunk! + : throw new global::System.InvalidOperationException($"Expected union variant 'GenerationChunk' but the value was {ToString()}."); + /// /// The end of generation. There may still be more information such as the factual consistency score, but generation has stopped. /// @@ -104,6 +118,13 @@ public bool TryPickGenerationEnd( return IsGenerationEnd; } + /// + /// + /// + public global::Vectara.StreamGenerationEnd PickGenerationEnd() => IsGenerationEnd + ? GenerationEnd! + : throw new global::System.InvalidOperationException($"Expected union variant 'GenerationEnd' but the value was {ToString()}."); + /// /// The end of a query response stream. /// @@ -134,6 +155,13 @@ public bool TryPickEnd( return IsEnd; } + /// + /// + /// + public global::Vectara.StreamResponseEnd PickEnd() => IsEnd + ? End! + : throw new global::System.InvalidOperationException($"Expected union variant 'End' but the value was {ToString()}."); + /// /// Event containing the factual consistency score. /// @@ -164,6 +192,13 @@ public bool TryPickFactualConsistencyScore( return IsFactualConsistencyScore; } + /// + /// + /// + public global::Vectara.FactualConsistencyScore PickFactualConsistencyScore() => IsFactualConsistencyScore + ? FactualConsistencyScore! + : throw new global::System.InvalidOperationException($"Expected union variant 'FactualConsistencyScore' but the value was {ToString()}."); + /// /// Event containing information on how the generation was accomplished. /// @@ -194,6 +229,13 @@ public bool TryPickGenerationInfo( return IsGenerationInfo; } + /// + /// + /// + public global::Vectara.GenerationInfo PickGenerationInfo() => IsGenerationInfo + ? GenerationInfo! + : throw new global::System.InvalidOperationException($"Expected union variant 'GenerationInfo' but the value was {ToString()}."); + /// /// Event signaling there was an error with the request. /// @@ -223,6 +265,13 @@ public bool TryPickError( value = Error; return IsError; } + + /// + /// + /// + public global::Vectara.StreamError PickError() => IsError + ? Error! + : throw new global::System.InvalidOperationException($"Expected union variant 'Error' but the value was {ToString()}."); /// /// /// @@ -241,6 +290,11 @@ public QueryStreamedResponse(global::Vectara.StreamSearchResponse? value) SearchResults = value; } + /// + /// + /// + public static QueryStreamedResponse FromSearchResults(global::Vectara.StreamSearchResponse? value) => new QueryStreamedResponse(value); + /// /// /// @@ -259,6 +313,11 @@ public QueryStreamedResponse(global::Vectara.StreamGenerationChunk? value) GenerationChunk = value; } + /// + /// + /// + public static QueryStreamedResponse FromGenerationChunk(global::Vectara.StreamGenerationChunk? value) => new QueryStreamedResponse(value); + /// /// /// @@ -277,6 +336,11 @@ public QueryStreamedResponse(global::Vectara.StreamGenerationEnd? value) GenerationEnd = value; } + /// + /// + /// + public static QueryStreamedResponse FromGenerationEnd(global::Vectara.StreamGenerationEnd? value) => new QueryStreamedResponse(value); + /// /// /// @@ -295,6 +359,11 @@ public QueryStreamedResponse(global::Vectara.StreamResponseEnd? value) End = value; } + /// + /// + /// + public static QueryStreamedResponse FromEnd(global::Vectara.StreamResponseEnd? value) => new QueryStreamedResponse(value); + /// /// /// @@ -313,6 +382,11 @@ public QueryStreamedResponse(global::Vectara.FactualConsistencyScore? value) FactualConsistencyScore = value; } + /// + /// + /// + public static QueryStreamedResponse FromFactualConsistencyScore(global::Vectara.FactualConsistencyScore? value) => new QueryStreamedResponse(value); + /// /// /// @@ -331,6 +405,11 @@ public QueryStreamedResponse(global::Vectara.GenerationInfo? value) GenerationInfo = value; } + /// + /// + /// + public static QueryStreamedResponse FromGenerationInfo(global::Vectara.GenerationInfo? value) => new QueryStreamedResponse(value); + /// /// /// @@ -349,6 +428,11 @@ public QueryStreamedResponse(global::Vectara.StreamError? value) Error = value; } + /// + /// + /// + public static QueryStreamedResponse FromError(global::Vectara.StreamError? value) => new QueryStreamedResponse(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.ReferenceInstruction.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ReferenceInstruction.g.cs index c112b99a..7d55d89d 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.ReferenceInstruction.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.ReferenceInstruction.g.cs @@ -39,6 +39,13 @@ public bool TryPickInstructionReference( return IsInstructionReference; } + /// + /// + /// + public global::Vectara.InstructionReference PickInstructionReference() => IsInstructionReference + ? InstructionReference! + : throw new global::System.InvalidOperationException($"Expected union variant 'InstructionReference' but the value was {ToString()}."); + /// /// /// @@ -68,6 +75,13 @@ public bool TryPickReferenceInstructionVariant2( value = ReferenceInstructionVariant2; return IsReferenceInstructionVariant2; } + + /// + /// + /// + public global::Vectara.ReferenceInstructionVariant2 PickReferenceInstructionVariant2() => IsReferenceInstructionVariant2 + ? ReferenceInstructionVariant2! + : throw new global::System.InvalidOperationException($"Expected union variant 'ReferenceInstructionVariant2' but the value was {ToString()}."); /// /// /// @@ -86,6 +100,11 @@ public ReferenceInstruction(global::Vectara.InstructionReference? value) InstructionReference = value; } + /// + /// + /// + public static ReferenceInstruction FromInstructionReference(global::Vectara.InstructionReference? value) => new ReferenceInstruction(value); + /// /// /// @@ -104,6 +123,11 @@ public ReferenceInstruction(global::Vectara.ReferenceInstructionVariant2? value) ReferenceInstructionVariant2 = value; } + /// + /// + /// + public static ReferenceInstruction FromReferenceInstructionVariant2(global::Vectara.ReferenceInstructionVariant2? value) => new ReferenceInstruction(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.RemoteAuth.g.cs b/src/libs/Vectara/Generated/Vectara.Models.RemoteAuth.g.cs index 2d81d8da..7012ad8d 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.RemoteAuth.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.RemoteAuth.g.cs @@ -44,6 +44,13 @@ public bool TryPickBearer( return IsBearer; } + /// + /// + /// + public global::Vectara.BearerAuth PickBearer() => IsBearer + ? Bearer! + : throw new global::System.InvalidOperationException($"Expected union variant 'Bearer' but the value was {ToString()}."); + /// /// Custom header-based authentication /// @@ -74,6 +81,13 @@ public bool TryPickHeader( return IsHeader; } + /// + /// + /// + public global::Vectara.HeaderAuth PickHeader() => IsHeader + ? Header! + : throw new global::System.InvalidOperationException($"Expected union variant 'Header' but the value was {ToString()}."); + /// /// OAuth 2.0 client credentials authentication. The platform acquires an access token from the token endpoint before connecting to the remote service. /// @@ -103,6 +117,13 @@ public bool TryPickOauthClientCredentials( value = OauthClientCredentials; return IsOauthClientCredentials; } + + /// + /// + /// + public global::Vectara.OAuthClientCredentialsAuth PickOauthClientCredentials() => IsOauthClientCredentials + ? OauthClientCredentials! + : throw new global::System.InvalidOperationException($"Expected union variant 'OauthClientCredentials' but the value was {ToString()}."); /// /// /// @@ -121,6 +142,11 @@ public RemoteAuth(global::Vectara.BearerAuth? value) Bearer = value; } + /// + /// + /// + public static RemoteAuth FromBearer(global::Vectara.BearerAuth? value) => new RemoteAuth(value); + /// /// /// @@ -139,6 +165,11 @@ public RemoteAuth(global::Vectara.HeaderAuth? value) Header = value; } + /// + /// + /// + public static RemoteAuth FromHeader(global::Vectara.HeaderAuth? value) => new RemoteAuth(value); + /// /// /// @@ -157,6 +188,11 @@ public RemoteAuth(global::Vectara.OAuthClientCredentialsAuth? value) OauthClientCredentials = value; } + /// + /// + /// + public static RemoteAuth FromOauthClientCredentials(global::Vectara.OAuthClientCredentialsAuth? value) => new RemoteAuth(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.S3SourceConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.Models.S3SourceConfiguration.g.cs index 05343d0c..486f9078 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.S3SourceConfiguration.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.S3SourceConfiguration.g.cs @@ -39,6 +39,13 @@ public bool TryPickBase( return IsBase; } + /// + /// + /// + public global::Vectara.BaseS3SourceConfiguration PickBase() => IsBase + ? Base! + : throw new global::System.InvalidOperationException($"Expected union variant 'Base' but the value was {ToString()}."); + /// /// /// @@ -68,6 +75,13 @@ public bool TryPickS3SourceConfigurationVariant2( value = S3SourceConfigurationVariant2; return IsS3SourceConfigurationVariant2; } + + /// + /// + /// + public object PickS3SourceConfigurationVariant2() => IsS3SourceConfigurationVariant2 + ? S3SourceConfigurationVariant2! + : throw new global::System.InvalidOperationException($"Expected union variant 'S3SourceConfigurationVariant2' but the value was {ToString()}."); /// /// /// @@ -86,6 +100,11 @@ public S3SourceConfiguration(global::Vectara.BaseS3SourceConfiguration? value) Base = value; } + /// + /// + /// + public static S3SourceConfiguration FromBase(global::Vectara.BaseS3SourceConfiguration? value) => new S3SourceConfiguration(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.ScheduleConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ScheduleConfiguration.g.cs index 116bf984..49defe5d 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.ScheduleConfiguration.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.ScheduleConfiguration.g.cs @@ -39,6 +39,13 @@ public bool TryPickInterval( return IsInterval; } + /// + /// + /// + public global::Vectara.IntervalScheduleConfiguration PickInterval() => IsInterval + ? Interval! + : throw new global::System.InvalidOperationException($"Expected union variant 'Interval' but the value was {ToString()}."); + /// /// Configuration for cron-based schedule execution. /// @@ -68,6 +75,13 @@ public bool TryPickCron( value = Cron; return IsCron; } + + /// + /// + /// + public global::Vectara.CronScheduleConfiguration PickCron() => IsCron + ? Cron! + : throw new global::System.InvalidOperationException($"Expected union variant 'Cron' but the value was {ToString()}."); /// /// /// @@ -86,6 +100,11 @@ public ScheduleConfiguration(global::Vectara.IntervalScheduleConfiguration? valu Interval = value; } + /// + /// + /// + public static ScheduleConfiguration FromInterval(global::Vectara.IntervalScheduleConfiguration? value) => new ScheduleConfiguration(value); + /// /// /// @@ -104,6 +123,11 @@ public ScheduleConfiguration(global::Vectara.CronScheduleConfiguration? value) Cron = value; } + /// + /// + /// + public static ScheduleConfiguration FromCron(global::Vectara.CronScheduleConfiguration? value) => new ScheduleConfiguration(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.SearchCorporaParameters.g.cs b/src/libs/Vectara/Generated/Vectara.Models.SearchCorporaParameters.g.cs index bdce5ae6..ae5aa94f 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.SearchCorporaParameters.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.SearchCorporaParameters.g.cs @@ -39,6 +39,13 @@ public bool TryPickSearchCorporaParametersVariant1( return IsSearchCorporaParametersVariant1; } + /// + /// + /// + public global::Vectara.SearchCorporaParametersVariant1 PickSearchCorporaParametersVariant1() => IsSearchCorporaParametersVariant1 + ? SearchCorporaParametersVariant1! + : throw new global::System.InvalidOperationException($"Expected union variant 'SearchCorporaParametersVariant1' but the value was {ToString()}."); + /// /// Search parameters to retrieve knowledge for the query.
/// Example: {"limit":50} @@ -69,6 +76,13 @@ public bool TryPickSearchParameters( value = SearchParameters; return IsSearchParameters; } + + /// + /// + /// + public global::Vectara.SearchParameters PickSearchParameters() => IsSearchParameters + ? SearchParameters! + : throw new global::System.InvalidOperationException($"Expected union variant 'SearchParameters' but the value was {ToString()}."); /// /// /// @@ -87,6 +101,11 @@ public SearchCorporaParameters(global::Vectara.SearchCorporaParametersVariant1? SearchCorporaParametersVariant1 = value; } + /// + /// + /// + public static SearchCorporaParameters FromSearchCorporaParametersVariant1(global::Vectara.SearchCorporaParametersVariant1? value) => new SearchCorporaParameters(value); + /// /// /// @@ -105,6 +124,11 @@ public SearchCorporaParameters(global::Vectara.SearchParameters? value) SearchParameters = value; } + /// + /// + /// + public static SearchCorporaParameters FromSearchParameters(global::Vectara.SearchParameters? value) => new SearchCorporaParameters(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.SearchReranker.g.cs b/src/libs/Vectara/Generated/Vectara.Models.SearchReranker.g.cs index 679bc650..e304ae20 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.SearchReranker.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.SearchReranker.g.cs @@ -44,6 +44,13 @@ public bool TryPickCustomerReranker( return IsCustomerReranker; } + /// + /// + /// + public global::Vectara.CustomerSpecificReranker PickCustomerReranker() => IsCustomerReranker + ? CustomerReranker! + : throw new global::System.InvalidOperationException($"Expected union variant 'CustomerReranker' but the value was {ToString()}."); + /// /// A reranker that uses user-defined functions to reorder search results. /// @@ -74,6 +81,13 @@ public bool TryPickUserfn( return IsUserfn; } + /// + /// + /// + public global::Vectara.UserFunctionReranker PickUserfn() => IsUserfn + ? Userfn! + : throw new global::System.InvalidOperationException($"Expected union variant 'Userfn' but the value was {ToString()}."); + /// /// A reranker that uses Maximal Marginal Relevance to balance relevance and diversity in search results. /// @@ -104,6 +118,13 @@ public bool TryPickMmr( return IsMmr; } + /// + /// + /// + public global::Vectara.MMRReranker PickMmr() => IsMmr + ? Mmr! + : throw new global::System.InvalidOperationException($"Expected union variant 'Mmr' but the value was {ToString()}."); + /// /// A reranker that applies multiple rerankers in sequence to produce the final search results. /// @@ -134,6 +155,13 @@ public bool TryPickChain( return IsChain; } + /// + /// + /// + public global::Vectara.ChainReranker PickChain() => IsChain + ? Chain! + : throw new global::System.InvalidOperationException($"Expected union variant 'Chain' but the value was {ToString()}."); + /// /// A placeholder reranker that does not modify the original search results ordering. /// @@ -163,6 +191,13 @@ public bool TryPickNone( value = None; return IsNone; } + + /// + /// + /// + public global::Vectara.NoneReranker PickNone() => IsNone + ? None! + : throw new global::System.InvalidOperationException($"Expected union variant 'None' but the value was {ToString()}."); /// /// /// @@ -181,6 +216,11 @@ public SearchReranker(global::Vectara.CustomerSpecificReranker? value) CustomerReranker = value; } + /// + /// + /// + public static SearchReranker FromCustomerReranker(global::Vectara.CustomerSpecificReranker? value) => new SearchReranker(value); + /// /// /// @@ -199,6 +239,11 @@ public SearchReranker(global::Vectara.UserFunctionReranker? value) Userfn = value; } + /// + /// + /// + public static SearchReranker FromUserfn(global::Vectara.UserFunctionReranker? value) => new SearchReranker(value); + /// /// /// @@ -217,6 +262,11 @@ public SearchReranker(global::Vectara.MMRReranker? value) Mmr = value; } + /// + /// + /// + public static SearchReranker FromMmr(global::Vectara.MMRReranker? value) => new SearchReranker(value); + /// /// /// @@ -235,6 +285,11 @@ public SearchReranker(global::Vectara.ChainReranker? value) Chain = value; } + /// + /// + /// + public static SearchReranker FromChain(global::Vectara.ChainReranker? value) => new SearchReranker(value); + /// /// /// @@ -253,6 +308,11 @@ public SearchReranker(global::Vectara.NoneReranker? value) None = value; } + /// + /// + /// + public static SearchReranker FromNone(global::Vectara.NoneReranker? value) => new SearchReranker(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.SessionInterruptedEvent.g.cs b/src/libs/Vectara/Generated/Vectara.Models.SessionInterruptedEvent.g.cs index 89a87bb1..2f2873f8 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.SessionInterruptedEvent.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.SessionInterruptedEvent.g.cs @@ -40,6 +40,13 @@ public bool TryPickAgentBase( return IsAgentBase; } + /// + /// + /// + public global::Vectara.AgentEventBase PickAgentBase() => IsAgentBase + ? AgentBase! + : throw new global::System.InvalidOperationException($"Expected union variant 'AgentBase' but the value was {ToString()}."); + /// /// /// @@ -69,6 +76,13 @@ public bool TryPickSessionInterruptedEventVariant2( value = SessionInterruptedEventVariant2; return IsSessionInterruptedEventVariant2; } + + /// + /// + /// + public global::Vectara.SessionInterruptedEventVariant2 PickSessionInterruptedEventVariant2() => IsSessionInterruptedEventVariant2 + ? SessionInterruptedEventVariant2! + : throw new global::System.InvalidOperationException($"Expected union variant 'SessionInterruptedEventVariant2' but the value was {ToString()}."); /// /// /// @@ -87,6 +101,11 @@ public SessionInterruptedEvent(global::Vectara.AgentEventBase? value) AgentBase = value; } + /// + /// + /// + public static SessionInterruptedEvent FromAgentBase(global::Vectara.AgentEventBase? value) => new SessionInterruptedEvent(value); + /// /// /// @@ -105,6 +124,11 @@ public SessionInterruptedEvent(global::Vectara.SessionInterruptedEventVariant2? SessionInterruptedEventVariant2 = value; } + /// + /// + /// + public static SessionInterruptedEvent FromSessionInterruptedEventVariant2(global::Vectara.SessionInterruptedEventVariant2? value) => new SessionInterruptedEvent(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.SkillLoadEvent.g.cs b/src/libs/Vectara/Generated/Vectara.Models.SkillLoadEvent.g.cs index 364f38dd..805ceb9d 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.SkillLoadEvent.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.SkillLoadEvent.g.cs @@ -39,6 +39,13 @@ public bool TryPickAgentBase( return IsAgentBase; } + /// + /// + /// + public global::Vectara.AgentEventBase PickAgentBase() => IsAgentBase + ? AgentBase! + : throw new global::System.InvalidOperationException($"Expected union variant 'AgentBase' but the value was {ToString()}."); + /// /// /// @@ -68,6 +75,13 @@ public bool TryPickSkillLoadEventVariant2( value = SkillLoadEventVariant2; return IsSkillLoadEventVariant2; } + + /// + /// + /// + public global::Vectara.SkillLoadEventVariant2 PickSkillLoadEventVariant2() => IsSkillLoadEventVariant2 + ? SkillLoadEventVariant2! + : throw new global::System.InvalidOperationException($"Expected union variant 'SkillLoadEventVariant2' but the value was {ToString()}."); /// /// /// @@ -86,6 +100,11 @@ public SkillLoadEvent(global::Vectara.AgentEventBase? value) AgentBase = value; } + /// + /// + /// + public static SkillLoadEvent FromAgentBase(global::Vectara.AgentEventBase? value) => new SkillLoadEvent(value); + /// /// /// @@ -104,6 +123,11 @@ public SkillLoadEvent(global::Vectara.SkillLoadEventVariant2? value) SkillLoadEventVariant2 = value; } + /// + /// + /// + public static SkillLoadEvent FromSkillLoadEventVariant2(global::Vectara.SkillLoadEventVariant2? value) => new SkillLoadEvent(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.StepTransitionEvent.g.cs b/src/libs/Vectara/Generated/Vectara.Models.StepTransitionEvent.g.cs index ce957218..cebd1e39 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.StepTransitionEvent.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.StepTransitionEvent.g.cs @@ -39,6 +39,13 @@ public bool TryPickAgentBase( return IsAgentBase; } + /// + /// + /// + public global::Vectara.AgentEventBase PickAgentBase() => IsAgentBase + ? AgentBase! + : throw new global::System.InvalidOperationException($"Expected union variant 'AgentBase' but the value was {ToString()}."); + /// /// /// @@ -68,6 +75,13 @@ public bool TryPickStepTransitionEventVariant2( value = StepTransitionEventVariant2; return IsStepTransitionEventVariant2; } + + /// + /// + /// + public global::Vectara.StepTransitionEventVariant2 PickStepTransitionEventVariant2() => IsStepTransitionEventVariant2 + ? StepTransitionEventVariant2! + : throw new global::System.InvalidOperationException($"Expected union variant 'StepTransitionEventVariant2' but the value was {ToString()}."); /// /// /// @@ -86,6 +100,11 @@ public StepTransitionEvent(global::Vectara.AgentEventBase? value) AgentBase = value; } + /// + /// + /// + public static StepTransitionEvent FromAgentBase(global::Vectara.AgentEventBase? value) => new StepTransitionEvent(value); + /// /// /// @@ -104,6 +123,11 @@ public StepTransitionEvent(global::Vectara.StepTransitionEventVariant2? value) StepTransitionEventVariant2 = value; } + /// + /// + /// + public static StepTransitionEvent FromStepTransitionEventVariant2(global::Vectara.StepTransitionEventVariant2? value) => new StepTransitionEvent(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.StepTransitionLimitExceededEvent.g.cs b/src/libs/Vectara/Generated/Vectara.Models.StepTransitionLimitExceededEvent.g.cs index b4d45166..456012b8 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.StepTransitionLimitExceededEvent.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.StepTransitionLimitExceededEvent.g.cs @@ -41,6 +41,13 @@ public bool TryPickAgentBase( return IsAgentBase; } + /// + /// + /// + public global::Vectara.AgentEventBase PickAgentBase() => IsAgentBase + ? AgentBase! + : throw new global::System.InvalidOperationException($"Expected union variant 'AgentBase' but the value was {ToString()}."); + /// /// /// @@ -70,6 +77,13 @@ public bool TryPickStepTransitionLimitExceededEventVariant2( value = StepTransitionLimitExceededEventVariant2; return IsStepTransitionLimitExceededEventVariant2; } + + /// + /// + /// + public global::Vectara.StepTransitionLimitExceededEventVariant2 PickStepTransitionLimitExceededEventVariant2() => IsStepTransitionLimitExceededEventVariant2 + ? StepTransitionLimitExceededEventVariant2! + : throw new global::System.InvalidOperationException($"Expected union variant 'StepTransitionLimitExceededEventVariant2' but the value was {ToString()}."); /// /// /// @@ -88,6 +102,11 @@ public StepTransitionLimitExceededEvent(global::Vectara.AgentEventBase? value) AgentBase = value; } + /// + /// + /// + public static StepTransitionLimitExceededEvent FromAgentBase(global::Vectara.AgentEventBase? value) => new StepTransitionLimitExceededEvent(value); + /// /// /// @@ -106,6 +125,11 @@ public StepTransitionLimitExceededEvent(global::Vectara.StepTransitionLimitExcee StepTransitionLimitExceededEventVariant2 = value; } + /// + /// + /// + public static StepTransitionLimitExceededEvent FromStepTransitionLimitExceededEventVariant2(global::Vectara.StepTransitionLimitExceededEventVariant2? value) => new StepTransitionLimitExceededEvent(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.StepTransitionTraceSpan.g.cs b/src/libs/Vectara/Generated/Vectara.Models.StepTransitionTraceSpan.g.cs index 261aab8b..6ebfe55f 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.StepTransitionTraceSpan.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.StepTransitionTraceSpan.g.cs @@ -39,6 +39,13 @@ public bool TryPickAgentBase( return IsAgentBase; } + /// + /// + /// + public global::Vectara.AgentTraceSpanBase PickAgentBase() => IsAgentBase + ? AgentBase! + : throw new global::System.InvalidOperationException($"Expected union variant 'AgentBase' but the value was {ToString()}."); + /// /// /// @@ -68,6 +75,13 @@ public bool TryPickStepTransitionTraceSpanVariant2( value = StepTransitionTraceSpanVariant2; return IsStepTransitionTraceSpanVariant2; } + + /// + /// + /// + public global::Vectara.StepTransitionTraceSpanVariant2 PickStepTransitionTraceSpanVariant2() => IsStepTransitionTraceSpanVariant2 + ? StepTransitionTraceSpanVariant2! + : throw new global::System.InvalidOperationException($"Expected union variant 'StepTransitionTraceSpanVariant2' but the value was {ToString()}."); /// /// /// @@ -86,6 +100,11 @@ public StepTransitionTraceSpan(global::Vectara.AgentTraceSpanBase? value) AgentBase = value; } + /// + /// + /// + public static StepTransitionTraceSpan FromAgentBase(global::Vectara.AgentTraceSpanBase? value) => new StepTransitionTraceSpan(value); + /// /// /// @@ -104,6 +123,11 @@ public StepTransitionTraceSpan(global::Vectara.StepTransitionTraceSpanVariant2? StepTransitionTraceSpanVariant2 = value; } + /// + /// + /// + public static StepTransitionTraceSpan FromStepTransitionTraceSpanVariant2(global::Vectara.StepTransitionTraceSpanVariant2? value) => new StepTransitionTraceSpan(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.StructuredOutputEvent.g.cs b/src/libs/Vectara/Generated/Vectara.Models.StructuredOutputEvent.g.cs index a3e6a199..0b327b22 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.StructuredOutputEvent.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.StructuredOutputEvent.g.cs @@ -45,6 +45,13 @@ public bool TryPickAgentBase( return IsAgentBase; } + /// + /// + /// + public global::Vectara.AgentEventBase PickAgentBase() => IsAgentBase + ? AgentBase! + : throw new global::System.InvalidOperationException($"Expected union variant 'AgentBase' but the value was {ToString()}."); + /// /// /// @@ -74,6 +81,13 @@ public bool TryPickStructuredOutputEventVariant2( value = StructuredOutputEventVariant2; return IsStructuredOutputEventVariant2; } + + /// + /// + /// + public global::Vectara.StructuredOutputEventVariant2 PickStructuredOutputEventVariant2() => IsStructuredOutputEventVariant2 + ? StructuredOutputEventVariant2! + : throw new global::System.InvalidOperationException($"Expected union variant 'StructuredOutputEventVariant2' but the value was {ToString()}."); /// /// /// @@ -92,6 +106,11 @@ public StructuredOutputEvent(global::Vectara.AgentEventBase? value) AgentBase = value; } + /// + /// + /// + public static StructuredOutputEvent FromAgentBase(global::Vectara.AgentEventBase? value) => new StructuredOutputEvent(value); + /// /// /// @@ -110,6 +129,11 @@ public StructuredOutputEvent(global::Vectara.StructuredOutputEventVariant2? valu StructuredOutputEventVariant2 = value; } + /// + /// + /// + public static StructuredOutputEvent FromStructuredOutputEventVariant2(global::Vectara.StructuredOutputEventVariant2? value) => new StructuredOutputEvent(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.SubAgentTool.g.cs b/src/libs/Vectara/Generated/Vectara.Models.SubAgentTool.g.cs index 7c308a6a..9ce40241 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.SubAgentTool.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.SubAgentTool.g.cs @@ -40,6 +40,13 @@ public bool TryPickBase( return IsBase; } + /// + /// + /// + public global::Vectara.ToolBase PickBase() => IsBase + ? Base! + : throw new global::System.InvalidOperationException($"Expected union variant 'Base' but the value was {ToString()}."); + /// /// /// @@ -69,6 +76,13 @@ public bool TryPickSubAgentToolVariant2( value = SubAgentToolVariant2; return IsSubAgentToolVariant2; } + + /// + /// + /// + public global::Vectara.SubAgentToolVariant2 PickSubAgentToolVariant2() => IsSubAgentToolVariant2 + ? SubAgentToolVariant2! + : throw new global::System.InvalidOperationException($"Expected union variant 'SubAgentToolVariant2' but the value was {ToString()}."); /// /// /// @@ -87,6 +101,11 @@ public SubAgentTool(global::Vectara.ToolBase? value) Base = value; } + /// + /// + /// + public static SubAgentTool FromBase(global::Vectara.ToolBase? value) => new SubAgentTool(value); + /// /// /// @@ -105,6 +124,11 @@ public SubAgentTool(global::Vectara.SubAgentToolVariant2? value) SubAgentToolVariant2 = value; } + /// + /// + /// + public static SubAgentTool FromSubAgentToolVariant2(global::Vectara.SubAgentToolVariant2? value) => new SubAgentTool(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.SummarizeDocumentStreamedResponse.g.cs b/src/libs/Vectara/Generated/Vectara.Models.SummarizeDocumentStreamedResponse.g.cs index e5579ca2..21bfa27f 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.SummarizeDocumentStreamedResponse.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.SummarizeDocumentStreamedResponse.g.cs @@ -44,6 +44,13 @@ public bool TryPickGenerationChunk( return IsGenerationChunk; } + /// + /// + /// + public global::Vectara.StreamGenerationChunk PickGenerationChunk() => IsGenerationChunk + ? GenerationChunk! + : throw new global::System.InvalidOperationException($"Expected union variant 'GenerationChunk' but the value was {ToString()}."); + /// /// Event containing information on how the generation was accomplished. /// @@ -74,6 +81,13 @@ public bool TryPickGenerationInfo( return IsGenerationInfo; } + /// + /// + /// + public global::Vectara.GenerationInfo PickGenerationInfo() => IsGenerationInfo + ? GenerationInfo! + : throw new global::System.InvalidOperationException($"Expected union variant 'GenerationInfo' but the value was {ToString()}."); + /// /// The end of generation. There may still be more information such as the factual consistency score, but generation has stopped. /// @@ -104,6 +118,13 @@ public bool TryPickGenerationEnd( return IsGenerationEnd; } + /// + /// + /// + public global::Vectara.StreamGenerationEnd PickGenerationEnd() => IsGenerationEnd + ? GenerationEnd! + : throw new global::System.InvalidOperationException($"Expected union variant 'GenerationEnd' but the value was {ToString()}."); + /// /// The end of a query response stream. /// @@ -134,6 +155,13 @@ public bool TryPickEnd( return IsEnd; } + /// + /// + /// + public global::Vectara.StreamResponseEnd PickEnd() => IsEnd + ? End! + : throw new global::System.InvalidOperationException($"Expected union variant 'End' but the value was {ToString()}."); + /// /// Event signaling there was an error with the request. /// @@ -163,6 +191,13 @@ public bool TryPickError( value = Error; return IsError; } + + /// + /// + /// + public global::Vectara.StreamError PickError() => IsError + ? Error! + : throw new global::System.InvalidOperationException($"Expected union variant 'Error' but the value was {ToString()}."); /// /// /// @@ -181,6 +216,11 @@ public SummarizeDocumentStreamedResponse(global::Vectara.StreamGenerationChunk? GenerationChunk = value; } + /// + /// + /// + public static SummarizeDocumentStreamedResponse FromGenerationChunk(global::Vectara.StreamGenerationChunk? value) => new SummarizeDocumentStreamedResponse(value); + /// /// /// @@ -199,6 +239,11 @@ public SummarizeDocumentStreamedResponse(global::Vectara.GenerationInfo? value) GenerationInfo = value; } + /// + /// + /// + public static SummarizeDocumentStreamedResponse FromGenerationInfo(global::Vectara.GenerationInfo? value) => new SummarizeDocumentStreamedResponse(value); + /// /// /// @@ -217,6 +262,11 @@ public SummarizeDocumentStreamedResponse(global::Vectara.StreamGenerationEnd? va GenerationEnd = value; } + /// + /// + /// + public static SummarizeDocumentStreamedResponse FromGenerationEnd(global::Vectara.StreamGenerationEnd? value) => new SummarizeDocumentStreamedResponse(value); + /// /// /// @@ -235,6 +285,11 @@ public SummarizeDocumentStreamedResponse(global::Vectara.StreamResponseEnd? valu End = value; } + /// + /// + /// + public static SummarizeDocumentStreamedResponse FromEnd(global::Vectara.StreamResponseEnd? value) => new SummarizeDocumentStreamedResponse(value); + /// /// /// @@ -253,6 +308,11 @@ public SummarizeDocumentStreamedResponse(global::Vectara.StreamError? value) Error = value; } + /// + /// + /// + public static SummarizeDocumentStreamedResponse FromError(global::Vectara.StreamError? value) => new SummarizeDocumentStreamedResponse(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.TestToolResponse.g.cs b/src/libs/Vectara/Generated/Vectara.Models.TestToolResponse.g.cs index 013ef6cc..e93805f7 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.TestToolResponse.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.TestToolResponse.g.cs @@ -44,6 +44,13 @@ public bool TryPickSuccess( return IsSuccess; } + /// + /// + /// + public global::Vectara.TestToolSuccessResponse PickSuccess() => IsSuccess + ? Success! + : throw new global::System.InvalidOperationException($"Expected union variant 'Success' but the value was {ToString()}."); + /// /// Error response from testing a Lambda tool. /// @@ -73,6 +80,13 @@ public bool TryPickError( value = Error; return IsError; } + + /// + /// + /// + public global::Vectara.TestToolErrorResponse PickError() => IsError + ? Error! + : throw new global::System.InvalidOperationException($"Expected union variant 'Error' but the value was {ToString()}."); /// /// /// @@ -91,6 +105,11 @@ public TestToolResponse(global::Vectara.TestToolSuccessResponse? value) Success = value; } + /// + /// + /// + public static TestToolResponse FromSuccess(global::Vectara.TestToolSuccessResponse? value) => new TestToolResponse(value); + /// /// /// @@ -109,6 +128,11 @@ public TestToolResponse(global::Vectara.TestToolErrorResponse? value) Error = value; } + /// + /// + /// + public static TestToolResponse FromError(global::Vectara.TestToolErrorResponse? value) => new TestToolResponse(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.ThinkingEvent.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ThinkingEvent.g.cs index 08667f05..a35d95b3 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.ThinkingEvent.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.ThinkingEvent.g.cs @@ -39,6 +39,13 @@ public bool TryPickAgentBase( return IsAgentBase; } + /// + /// + /// + public global::Vectara.AgentEventBase PickAgentBase() => IsAgentBase + ? AgentBase! + : throw new global::System.InvalidOperationException($"Expected union variant 'AgentBase' but the value was {ToString()}."); + /// /// /// @@ -68,6 +75,13 @@ public bool TryPickThinkingEventVariant2( value = ThinkingEventVariant2; return IsThinkingEventVariant2; } + + /// + /// + /// + public global::Vectara.ThinkingEventVariant2 PickThinkingEventVariant2() => IsThinkingEventVariant2 + ? ThinkingEventVariant2! + : throw new global::System.InvalidOperationException($"Expected union variant 'ThinkingEventVariant2' but the value was {ToString()}."); /// /// /// @@ -86,6 +100,11 @@ public ThinkingEvent(global::Vectara.AgentEventBase? value) AgentBase = value; } + /// + /// + /// + public static ThinkingEvent FromAgentBase(global::Vectara.AgentEventBase? value) => new ThinkingEvent(value); + /// /// /// @@ -104,6 +123,11 @@ public ThinkingEvent(global::Vectara.ThinkingEventVariant2? value) ThinkingEventVariant2 = value; } + /// + /// + /// + public static ThinkingEvent FromThinkingEventVariant2(global::Vectara.ThinkingEventVariant2? value) => new ThinkingEvent(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.ThinkingTraceSpan.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ThinkingTraceSpan.g.cs index 67584e39..47fc54d6 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.ThinkingTraceSpan.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.ThinkingTraceSpan.g.cs @@ -39,6 +39,13 @@ public bool TryPickAgentBase( return IsAgentBase; } + /// + /// + /// + public global::Vectara.AgentTraceSpanBase PickAgentBase() => IsAgentBase + ? AgentBase! + : throw new global::System.InvalidOperationException($"Expected union variant 'AgentBase' but the value was {ToString()}."); + /// /// /// @@ -68,6 +75,13 @@ public bool TryPickThinkingTraceSpanVariant2( value = ThinkingTraceSpanVariant2; return IsThinkingTraceSpanVariant2; } + + /// + /// + /// + public global::Vectara.ThinkingTraceSpanVariant2 PickThinkingTraceSpanVariant2() => IsThinkingTraceSpanVariant2 + ? ThinkingTraceSpanVariant2! + : throw new global::System.InvalidOperationException($"Expected union variant 'ThinkingTraceSpanVariant2' but the value was {ToString()}."); /// /// /// @@ -86,6 +100,11 @@ public ThinkingTraceSpan(global::Vectara.AgentTraceSpanBase? value) AgentBase = value; } + /// + /// + /// + public static ThinkingTraceSpan FromAgentBase(global::Vectara.AgentTraceSpanBase? value) => new ThinkingTraceSpan(value); + /// /// /// @@ -104,6 +123,11 @@ public ThinkingTraceSpan(global::Vectara.ThinkingTraceSpanVariant2? value) ThinkingTraceSpanVariant2 = value; } + /// + /// + /// + public static ThinkingTraceSpan FromThinkingTraceSpanVariant2(global::Vectara.ThinkingTraceSpanVariant2? value) => new ThinkingTraceSpan(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.Tool.g.cs b/src/libs/Vectara/Generated/Vectara.Models.Tool.g.cs index 23b6683d..852a081c 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.Tool.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.Tool.g.cs @@ -44,6 +44,13 @@ public bool TryPickDynamicVectara( return IsDynamicVectara; } + /// + /// + /// + public global::Vectara.DynamicVectaraTool PickDynamicVectara() => IsDynamicVectara + ? DynamicVectara!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'DynamicVectara' but the value was {ToString()}."); + /// /// An MCP (Model Context Protocol) tool that connects to external MCP servers for extended functionality. /// @@ -74,6 +81,13 @@ public bool TryPickMcp( return IsMcp; } + /// + /// + /// + public global::Vectara.McpTool PickMcp() => IsMcp + ? Mcp!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'Mcp' but the value was {ToString()}."); + /// /// A corpora search tool that searches through Vectara corpora to find relevant information. /// @@ -104,6 +118,13 @@ public bool TryPickCorporaSearch( return IsCorporaSearch; } + /// + /// + /// + public global::Vectara.CorporaSearchTool PickCorporaSearch() => IsCorporaSearch + ? CorporaSearch!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'CorporaSearch' but the value was {ToString()}."); + /// /// A web search tool that searches the internet for relevant information. /// @@ -134,6 +155,13 @@ public bool TryPickWebSearch( return IsWebSearch; } + /// + /// + /// + public global::Vectara.WebSearchTool PickWebSearch() => IsWebSearch + ? WebSearch!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'WebSearch' but the value was {ToString()}."); + /// /// A web get tool that fetches content from URLs using HTTP requests. /// @@ -164,6 +192,13 @@ public bool TryPickWebGet( return IsWebGet; } + /// + /// + /// + public global::Vectara.WebGetTool PickWebGet() => IsWebGet + ? WebGet!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'WebGet' but the value was {ToString()}."); + /// /// A user-defined function that can be executed as a tool by agents.
/// Lambda tools run in a secure, sandboxed environment with resource limits.
@@ -196,6 +231,13 @@ public bool TryPickLambda( return IsLambda; } + /// + /// + /// + public global::Vectara.LambdaTool PickLambda() => IsLambda + ? Lambda!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'Lambda' but the value was {ToString()}."); + /// /// A tool that spawns a specialized sub-agent to handle complex, multi-step tasks autonomously.
/// Sub-agents maintain separate context from the main agent and can be specialized for specific types of tasks like code review, general research, or output styling. @@ -227,6 +269,13 @@ public bool TryPickSubAgent( return IsSubAgent; } + /// + /// + /// + public global::Vectara.SubAgentTool PickSubAgent() => IsSubAgent + ? SubAgent!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'SubAgent' but the value was {ToString()}."); + /// /// A tool that creates artifacts from text or structured data content that can be stored and referenced later. /// @@ -257,6 +306,13 @@ public bool TryPickArtifactCreate( return IsArtifactCreate; } + /// + /// + /// + public global::Vectara.ArtifactCreateTool PickArtifactCreate() => IsArtifactCreate + ? ArtifactCreate!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'ArtifactCreate' but the value was {ToString()}."); + /// /// A tool that reads artifact content from the agent session workspace with flexible size and range options. /// @@ -287,6 +343,13 @@ public bool TryPickArtifactRead( return IsArtifactRead; } + /// + /// + /// + public global::Vectara.ArtifactReadTool PickArtifactRead() => IsArtifactRead + ? ArtifactRead!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'ArtifactRead' but the value was {ToString()}."); + /// /// A tool that searches through an artifact's content using grep with support for all standard grep options. /// @@ -317,6 +380,13 @@ public bool TryPickArtifactGrep( return IsArtifactGrep; } + /// + /// + /// + public global::Vectara.ArtifactGrepTool PickArtifactGrep() => IsArtifactGrep + ? ArtifactGrep!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'ArtifactGrep' but the value was {ToString()}."); + /// /// A tool that loads image artifacts into the conversation context for viewing and analysis. /// @@ -347,6 +417,13 @@ public bool TryPickImageRead( return IsImageRead; } + /// + /// + /// + public global::Vectara.ImageReadTool PickImageRead() => IsImageRead + ? ImageRead!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'ImageRead' but the value was {ToString()}."); + /// /// A tool that converts document artifacts (PDF, Word, PowerPoint, etc.) to various formats. /// @@ -377,6 +454,13 @@ public bool TryPickDocumentConversion( return IsDocumentConversion; } + /// + /// + /// + public global::Vectara.DocumentConversionTool PickDocumentConversion() => IsDocumentConversion + ? DocumentConversion!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'DocumentConversion' but the value was {ToString()}."); + /// /// A tool that fetches the full text content of a document from a corpus and stores it as an artifact. /// @@ -406,6 +490,13 @@ public bool TryPickGetDocumentText( value = GetDocumentText; return IsGetDocumentText; } + + /// + /// + /// + public global::Vectara.GetDocumentTextTool PickGetDocumentText() => IsGetDocumentText + ? GetDocumentText!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'GetDocumentText' but the value was {ToString()}."); /// /// /// @@ -424,6 +515,11 @@ public Tool(global::Vectara.DynamicVectaraTool? value) DynamicVectara = value; } + /// + /// + /// + public static Tool FromDynamicVectara(global::Vectara.DynamicVectaraTool? value) => new Tool(value); + /// /// /// @@ -442,6 +538,11 @@ public Tool(global::Vectara.McpTool? value) Mcp = value; } + /// + /// + /// + public static Tool FromMcp(global::Vectara.McpTool? value) => new Tool(value); + /// /// /// @@ -460,6 +561,11 @@ public Tool(global::Vectara.CorporaSearchTool? value) CorporaSearch = value; } + /// + /// + /// + public static Tool FromCorporaSearch(global::Vectara.CorporaSearchTool? value) => new Tool(value); + /// /// /// @@ -478,6 +584,11 @@ public Tool(global::Vectara.WebSearchTool? value) WebSearch = value; } + /// + /// + /// + public static Tool FromWebSearch(global::Vectara.WebSearchTool? value) => new Tool(value); + /// /// /// @@ -496,6 +607,11 @@ public Tool(global::Vectara.WebGetTool? value) WebGet = value; } + /// + /// + /// + public static Tool FromWebGet(global::Vectara.WebGetTool? value) => new Tool(value); + /// /// /// @@ -514,6 +630,11 @@ public Tool(global::Vectara.LambdaTool? value) Lambda = value; } + /// + /// + /// + public static Tool FromLambda(global::Vectara.LambdaTool? value) => new Tool(value); + /// /// /// @@ -532,6 +653,11 @@ public Tool(global::Vectara.SubAgentTool? value) SubAgent = value; } + /// + /// + /// + public static Tool FromSubAgent(global::Vectara.SubAgentTool? value) => new Tool(value); + /// /// /// @@ -550,6 +676,11 @@ public Tool(global::Vectara.ArtifactCreateTool? value) ArtifactCreate = value; } + /// + /// + /// + public static Tool FromArtifactCreate(global::Vectara.ArtifactCreateTool? value) => new Tool(value); + /// /// /// @@ -568,6 +699,11 @@ public Tool(global::Vectara.ArtifactReadTool? value) ArtifactRead = value; } + /// + /// + /// + public static Tool FromArtifactRead(global::Vectara.ArtifactReadTool? value) => new Tool(value); + /// /// /// @@ -586,6 +722,11 @@ public Tool(global::Vectara.ArtifactGrepTool? value) ArtifactGrep = value; } + /// + /// + /// + public static Tool FromArtifactGrep(global::Vectara.ArtifactGrepTool? value) => new Tool(value); + /// /// /// @@ -604,6 +745,11 @@ public Tool(global::Vectara.ImageReadTool? value) ImageRead = value; } + /// + /// + /// + public static Tool FromImageRead(global::Vectara.ImageReadTool? value) => new Tool(value); + /// /// /// @@ -622,6 +768,11 @@ public Tool(global::Vectara.DocumentConversionTool? value) DocumentConversion = value; } + /// + /// + /// + public static Tool FromDocumentConversion(global::Vectara.DocumentConversionTool? value) => new Tool(value); + /// /// /// @@ -640,6 +791,11 @@ public Tool(global::Vectara.GetDocumentTextTool? value) GetDocumentText = value; } + /// + /// + /// + public static Tool FromGetDocumentText(global::Vectara.GetDocumentTextTool? value) => new Tool(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.ToolInputEvent.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ToolInputEvent.g.cs index cc555b4c..1123c052 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.ToolInputEvent.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.ToolInputEvent.g.cs @@ -39,6 +39,13 @@ public bool TryPickAgentBase( return IsAgentBase; } + /// + /// + /// + public global::Vectara.AgentEventBase PickAgentBase() => IsAgentBase + ? AgentBase! + : throw new global::System.InvalidOperationException($"Expected union variant 'AgentBase' but the value was {ToString()}."); + /// /// /// @@ -68,6 +75,13 @@ public bool TryPickToolInputEventVariant2( value = ToolInputEventVariant2; return IsToolInputEventVariant2; } + + /// + /// + /// + public global::Vectara.ToolInputEventVariant2 PickToolInputEventVariant2() => IsToolInputEventVariant2 + ? ToolInputEventVariant2! + : throw new global::System.InvalidOperationException($"Expected union variant 'ToolInputEventVariant2' but the value was {ToString()}."); /// /// /// @@ -86,6 +100,11 @@ public ToolInputEvent(global::Vectara.AgentEventBase? value) AgentBase = value; } + /// + /// + /// + public static ToolInputEvent FromAgentBase(global::Vectara.AgentEventBase? value) => new ToolInputEvent(value); + /// /// /// @@ -104,6 +123,11 @@ public ToolInputEvent(global::Vectara.ToolInputEventVariant2? value) ToolInputEventVariant2 = value; } + /// + /// + /// + public static ToolInputEvent FromToolInputEventVariant2(global::Vectara.ToolInputEventVariant2? value) => new ToolInputEvent(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.ToolOutputEvent.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ToolOutputEvent.g.cs index 5191060c..83b6ed3b 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.ToolOutputEvent.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.ToolOutputEvent.g.cs @@ -39,6 +39,13 @@ public bool TryPickAgentBase( return IsAgentBase; } + /// + /// + /// + public global::Vectara.AgentEventBase PickAgentBase() => IsAgentBase + ? AgentBase! + : throw new global::System.InvalidOperationException($"Expected union variant 'AgentBase' but the value was {ToString()}."); + /// /// /// @@ -68,6 +75,13 @@ public bool TryPickToolOutputEventVariant2( value = ToolOutputEventVariant2; return IsToolOutputEventVariant2; } + + /// + /// + /// + public global::Vectara.ToolOutputEventVariant2 PickToolOutputEventVariant2() => IsToolOutputEventVariant2 + ? ToolOutputEventVariant2! + : throw new global::System.InvalidOperationException($"Expected union variant 'ToolOutputEventVariant2' but the value was {ToString()}."); /// /// /// @@ -86,6 +100,11 @@ public ToolOutputEvent(global::Vectara.AgentEventBase? value) AgentBase = value; } + /// + /// + /// + public static ToolOutputEvent FromAgentBase(global::Vectara.AgentEventBase? value) => new ToolOutputEvent(value); + /// /// /// @@ -104,6 +123,11 @@ public ToolOutputEvent(global::Vectara.ToolOutputEventVariant2? value) ToolOutputEventVariant2 = value; } + /// + /// + /// + public static ToolOutputEvent FromToolOutputEventVariant2(global::Vectara.ToolOutputEventVariant2? value) => new ToolOutputEvent(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.UpdateInstructionRequest.g.cs b/src/libs/Vectara/Generated/Vectara.Models.UpdateInstructionRequest.g.cs index 8fb4f9a7..24019778 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.UpdateInstructionRequest.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.UpdateInstructionRequest.g.cs @@ -43,6 +43,13 @@ public bool TryPickInitial( value = Initial; return IsInitial; } + + /// + /// + /// + public global::Vectara.UpdateInitialInstructionRequest PickInitial() => IsInitial + ? Initial! + : throw new global::System.InvalidOperationException($"Expected union variant 'Initial' but the value was {ToString()}."); /// /// /// @@ -61,6 +68,11 @@ public UpdateInstructionRequest(global::Vectara.UpdateInitialInstructionRequest? Initial = value; } + /// + /// + /// + public static UpdateInstructionRequest FromInitial(global::Vectara.UpdateInitialInstructionRequest? value) => new UpdateInstructionRequest(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.UpdateLLMRequest.g.cs b/src/libs/Vectara/Generated/Vectara.Models.UpdateLLMRequest.g.cs index 1bfc0824..d8fd9154 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.UpdateLLMRequest.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.UpdateLLMRequest.g.cs @@ -44,6 +44,13 @@ public bool TryPickOpenaiCompatible( return IsOpenaiCompatible; } + /// + /// + /// + public global::Vectara.UpdateOpenAILLMRequest PickOpenaiCompatible() => IsOpenaiCompatible + ? OpenaiCompatible!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'OpenaiCompatible' but the value was {ToString()}."); + /// /// Request to update an OpenAI Responses API Large Language Model connection. All fields are optional. /// @@ -74,6 +81,13 @@ public bool TryPickOpenaiResponses( return IsOpenaiResponses; } + /// + /// + /// + public global::Vectara.UpdateOpenAIResponsesLLMRequest PickOpenaiResponses() => IsOpenaiResponses + ? OpenaiResponses!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'OpenaiResponses' but the value was {ToString()}."); + /// /// Request to update a Vertex AI Large Language Model connection. All fields are optional. /// @@ -104,6 +118,13 @@ public bool TryPickVertexAi( return IsVertexAi; } + /// + /// + /// + public global::Vectara.UpdateVertexAILLMRequest PickVertexAi() => IsVertexAi + ? VertexAi! + : throw new global::System.InvalidOperationException($"Expected union variant 'VertexAi' but the value was {ToString()}."); + /// /// Request to update an Anthropic Large Language Model connection. All fields are optional. /// @@ -133,6 +154,13 @@ public bool TryPickAnthropic( value = Anthropic; return IsAnthropic; } + + /// + /// + /// + public global::Vectara.UpdateAnthropicLLMRequest PickAnthropic() => IsAnthropic + ? Anthropic! + : throw new global::System.InvalidOperationException($"Expected union variant 'Anthropic' but the value was {ToString()}."); /// /// /// @@ -151,6 +179,11 @@ public UpdateLLMRequest(global::Vectara.UpdateOpenAILLMRequest? value) OpenaiCompatible = value; } + /// + /// + /// + public static UpdateLLMRequest FromOpenaiCompatible(global::Vectara.UpdateOpenAILLMRequest? value) => new UpdateLLMRequest(value); + /// /// /// @@ -169,6 +202,11 @@ public UpdateLLMRequest(global::Vectara.UpdateOpenAIResponsesLLMRequest? value) OpenaiResponses = value; } + /// + /// + /// + public static UpdateLLMRequest FromOpenaiResponses(global::Vectara.UpdateOpenAIResponsesLLMRequest? value) => new UpdateLLMRequest(value); + /// /// /// @@ -187,6 +225,11 @@ public UpdateLLMRequest(global::Vectara.UpdateVertexAILLMRequest? value) VertexAi = value; } + /// + /// + /// + public static UpdateLLMRequest FromVertexAi(global::Vectara.UpdateVertexAILLMRequest? value) => new UpdateLLMRequest(value); + /// /// /// @@ -205,6 +248,11 @@ public UpdateLLMRequest(global::Vectara.UpdateAnthropicLLMRequest? value) Anthropic = value; } + /// + /// + /// + public static UpdateLLMRequest FromAnthropic(global::Vectara.UpdateAnthropicLLMRequest? value) => new UpdateLLMRequest(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.UpdateOpenAILLMRequest.g.cs b/src/libs/Vectara/Generated/Vectara.Models.UpdateOpenAILLMRequest.g.cs index 10a6b5ef..da20b987 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.UpdateOpenAILLMRequest.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.UpdateOpenAILLMRequest.g.cs @@ -39,6 +39,13 @@ public bool TryPickBase( return IsBase; } + /// + /// + /// + public global::Vectara.OpenAILLMUpdateBase PickBase() => IsBase + ? Base! + : throw new global::System.InvalidOperationException($"Expected union variant 'Base' but the value was {ToString()}."); + /// /// /// @@ -68,6 +75,13 @@ public bool TryPickUpdateOpenAILLMRequestVariant2( value = UpdateOpenAILLMRequestVariant2; return IsUpdateOpenAILLMRequestVariant2; } + + /// + /// + /// + public global::Vectara.UpdateOpenAILLMRequestVariant2 PickUpdateOpenAILLMRequestVariant2() => IsUpdateOpenAILLMRequestVariant2 + ? UpdateOpenAILLMRequestVariant2! + : throw new global::System.InvalidOperationException($"Expected union variant 'UpdateOpenAILLMRequestVariant2' but the value was {ToString()}."); /// /// /// @@ -86,6 +100,11 @@ public UpdateOpenAILLMRequest(global::Vectara.OpenAILLMUpdateBase? value) Base = value; } + /// + /// + /// + public static UpdateOpenAILLMRequest FromBase(global::Vectara.OpenAILLMUpdateBase? value) => new UpdateOpenAILLMRequest(value); + /// /// /// @@ -104,6 +123,11 @@ public UpdateOpenAILLMRequest(global::Vectara.UpdateOpenAILLMRequestVariant2? va UpdateOpenAILLMRequestVariant2 = value; } + /// + /// + /// + public static UpdateOpenAILLMRequest FromUpdateOpenAILLMRequestVariant2(global::Vectara.UpdateOpenAILLMRequestVariant2? value) => new UpdateOpenAILLMRequest(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.UpdateOpenAIResponsesLLMRequest.g.cs b/src/libs/Vectara/Generated/Vectara.Models.UpdateOpenAIResponsesLLMRequest.g.cs index 198273f8..c6b4f8df 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.UpdateOpenAIResponsesLLMRequest.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.UpdateOpenAIResponsesLLMRequest.g.cs @@ -39,6 +39,13 @@ public bool TryPickBase( return IsBase; } + /// + /// + /// + public global::Vectara.OpenAILLMUpdateBase PickBase() => IsBase + ? Base! + : throw new global::System.InvalidOperationException($"Expected union variant 'Base' but the value was {ToString()}."); + /// /// /// @@ -68,6 +75,13 @@ public bool TryPickUpdateOpenAIResponsesLLMRequestVariant2( value = UpdateOpenAIResponsesLLMRequestVariant2; return IsUpdateOpenAIResponsesLLMRequestVariant2; } + + /// + /// + /// + public global::Vectara.UpdateOpenAIResponsesLLMRequestVariant2 PickUpdateOpenAIResponsesLLMRequestVariant2() => IsUpdateOpenAIResponsesLLMRequestVariant2 + ? UpdateOpenAIResponsesLLMRequestVariant2! + : throw new global::System.InvalidOperationException($"Expected union variant 'UpdateOpenAIResponsesLLMRequestVariant2' but the value was {ToString()}."); /// /// /// @@ -86,6 +100,11 @@ public UpdateOpenAIResponsesLLMRequest(global::Vectara.OpenAILLMUpdateBase? valu Base = value; } + /// + /// + /// + public static UpdateOpenAIResponsesLLMRequest FromBase(global::Vectara.OpenAILLMUpdateBase? value) => new UpdateOpenAIResponsesLLMRequest(value); + /// /// /// @@ -104,6 +123,11 @@ public UpdateOpenAIResponsesLLMRequest(global::Vectara.UpdateOpenAIResponsesLLMR UpdateOpenAIResponsesLLMRequestVariant2 = value; } + /// + /// + /// + public static UpdateOpenAIResponsesLLMRequest FromUpdateOpenAIResponsesLLMRequestVariant2(global::Vectara.UpdateOpenAIResponsesLLMRequestVariant2? value) => new UpdateOpenAIResponsesLLMRequest(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.UpdatePipelineSource.g.cs b/src/libs/Vectara/Generated/Vectara.Models.UpdatePipelineSource.g.cs index 2b563259..a26b51c5 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.UpdatePipelineSource.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.UpdatePipelineSource.g.cs @@ -43,6 +43,13 @@ public bool TryPickS3( value = S3; return IsS3; } + + /// + /// + /// + public global::Vectara.UpdateS3SourceConfiguration PickS3() => IsS3 + ? S3!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'S3' but the value was {ToString()}."); /// /// /// @@ -61,6 +68,11 @@ public UpdatePipelineSource(global::Vectara.UpdateS3SourceConfiguration? value) S3 = value; } + /// + /// + /// + public static UpdatePipelineSource FromS3(global::Vectara.UpdateS3SourceConfiguration? value) => new UpdatePipelineSource(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.UpdateS3SourceConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.Models.UpdateS3SourceConfiguration.g.cs index ce76f350..72746c31 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.UpdateS3SourceConfiguration.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.UpdateS3SourceConfiguration.g.cs @@ -38,6 +38,13 @@ public bool TryPickBase( value = Base; return IsBase; } + + /// + /// + /// + public global::Vectara.BaseS3SourceConfiguration PickBase() => IsBase + ? Base! + : throw new global::System.InvalidOperationException($"Expected union variant 'Base' but the value was {ToString()}."); /// /// /// @@ -56,6 +63,11 @@ public UpdateS3SourceConfiguration(global::Vectara.BaseS3SourceConfiguration? va Base = value; } + /// + /// + /// + public static UpdateS3SourceConfiguration FromBase(global::Vectara.BaseS3SourceConfiguration? value) => new UpdateS3SourceConfiguration(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.UpdateToolRequest.g.cs b/src/libs/Vectara/Generated/Vectara.Models.UpdateToolRequest.g.cs index 882ed5c5..1a168b38 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.UpdateToolRequest.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.UpdateToolRequest.g.cs @@ -44,6 +44,13 @@ public bool TryPickMcp( return IsMcp; } + /// + /// + /// + public global::Vectara.UpdateMcpToolRequest PickMcp() => IsMcp + ? Mcp! + : throw new global::System.InvalidOperationException($"Expected union variant 'Mcp' but the value was {ToString()}."); + /// /// Request to update a lambda tool, allowing modifications to code, configuration, and metadata.
/// When code is updated, input and output schemas are automatically re-discovered from function parameter type annotations. @@ -74,6 +81,13 @@ public bool TryPickLambda( value = Lambda; return IsLambda; } + + /// + /// + /// + public global::Vectara.UpdateLambdaToolRequest PickLambda() => IsLambda + ? Lambda! + : throw new global::System.InvalidOperationException($"Expected union variant 'Lambda' but the value was {ToString()}."); /// /// /// @@ -92,6 +106,11 @@ public UpdateToolRequest(global::Vectara.UpdateMcpToolRequest? value) Mcp = value; } + /// + /// + /// + public static UpdateToolRequest FromMcp(global::Vectara.UpdateMcpToolRequest? value) => new UpdateToolRequest(value); + /// /// /// @@ -110,6 +129,11 @@ public UpdateToolRequest(global::Vectara.UpdateLambdaToolRequest? value) Lambda = value; } + /// + /// + /// + public static UpdateToolRequest FromLambda(global::Vectara.UpdateLambdaToolRequest? value) => new UpdateToolRequest(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.VertexAiAuth.g.cs b/src/libs/Vectara/Generated/Vectara.Models.VertexAiAuth.g.cs index 048a2cd5..e3595671 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.VertexAiAuth.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.VertexAiAuth.g.cs @@ -44,6 +44,13 @@ public bool TryPickApiKey( return IsApiKey; } + /// + /// + /// + public global::Vectara.VertexAiApiKeyAuth PickApiKey() => IsApiKey + ? ApiKey! + : throw new global::System.InvalidOperationException($"Expected union variant 'ApiKey' but the value was {ToString()}."); + /// /// Service account authentication for Vertex AI /// @@ -73,6 +80,13 @@ public bool TryPickServiceAccount( value = ServiceAccount; return IsServiceAccount; } + + /// + /// + /// + public global::Vectara.VertexAiServiceAccountAuth PickServiceAccount() => IsServiceAccount + ? ServiceAccount! + : throw new global::System.InvalidOperationException($"Expected union variant 'ServiceAccount' but the value was {ToString()}."); /// /// /// @@ -91,6 +105,11 @@ public VertexAiAuth(global::Vectara.VertexAiApiKeyAuth? value) ApiKey = value; } + /// + /// + /// + public static VertexAiAuth FromApiKey(global::Vectara.VertexAiApiKeyAuth? value) => new VertexAiAuth(value); + /// /// /// @@ -109,6 +128,11 @@ public VertexAiAuth(global::Vectara.VertexAiServiceAccountAuth? value) ServiceAccount = value; } + /// + /// + /// + public static VertexAiAuth FromServiceAccount(global::Vectara.VertexAiServiceAccountAuth? value) => new VertexAiAuth(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.WebGetTool.g.cs b/src/libs/Vectara/Generated/Vectara.Models.WebGetTool.g.cs index 2b1fe812..92f988f1 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.WebGetTool.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.WebGetTool.g.cs @@ -39,6 +39,13 @@ public bool TryPickBase( return IsBase; } + /// + /// + /// + public global::Vectara.ToolBase PickBase() => IsBase + ? Base! + : throw new global::System.InvalidOperationException($"Expected union variant 'Base' but the value was {ToString()}."); + /// /// /// @@ -68,6 +75,13 @@ public bool TryPickWebGetToolVariant2( value = WebGetToolVariant2; return IsWebGetToolVariant2; } + + /// + /// + /// + public global::Vectara.WebGetToolVariant2 PickWebGetToolVariant2() => IsWebGetToolVariant2 + ? WebGetToolVariant2! + : throw new global::System.InvalidOperationException($"Expected union variant 'WebGetToolVariant2' but the value was {ToString()}."); /// /// /// @@ -86,6 +100,11 @@ public WebGetTool(global::Vectara.ToolBase? value) Base = value; } + /// + /// + /// + public static WebGetTool FromBase(global::Vectara.ToolBase? value) => new WebGetTool(value); + /// /// /// @@ -104,6 +123,11 @@ public WebGetTool(global::Vectara.WebGetToolVariant2? value) WebGetToolVariant2 = value; } + /// + /// + /// + public static WebGetTool FromWebGetToolVariant2(global::Vectara.WebGetToolVariant2? value) => new WebGetTool(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.WebSearchTool.g.cs b/src/libs/Vectara/Generated/Vectara.Models.WebSearchTool.g.cs index f0fd0245..0dd39e06 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.WebSearchTool.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.WebSearchTool.g.cs @@ -39,6 +39,13 @@ public bool TryPickBase( return IsBase; } + /// + /// + /// + public global::Vectara.ToolBase PickBase() => IsBase + ? Base! + : throw new global::System.InvalidOperationException($"Expected union variant 'Base' but the value was {ToString()}."); + /// /// /// @@ -68,6 +75,13 @@ public bool TryPickWebSearchToolVariant2( value = WebSearchToolVariant2; return IsWebSearchToolVariant2; } + + /// + /// + /// + public global::Vectara.WebSearchToolVariant2 PickWebSearchToolVariant2() => IsWebSearchToolVariant2 + ? WebSearchToolVariant2! + : throw new global::System.InvalidOperationException($"Expected union variant 'WebSearchToolVariant2' but the value was {ToString()}."); /// /// /// @@ -86,6 +100,11 @@ public WebSearchTool(global::Vectara.ToolBase? value) Base = value; } + /// + /// + /// + public static WebSearchTool FromBase(global::Vectara.ToolBase? value) => new WebSearchTool(value); + /// /// /// @@ -104,6 +123,11 @@ public WebSearchTool(global::Vectara.WebSearchToolVariant2? value) WebSearchToolVariant2 = value; } + /// + /// + /// + public static WebSearchTool FromWebSearchToolVariant2(global::Vectara.WebSearchToolVariant2? value) => new WebSearchTool(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.OneOf.2.g.cs b/src/libs/Vectara/Generated/Vectara.OneOf.2.g.cs index b0aea07c..2fe70c10 100644 --- a/src/libs/Vectara/Generated/Vectara.OneOf.2.g.cs +++ b/src/libs/Vectara/Generated/Vectara.OneOf.2.g.cs @@ -38,6 +38,13 @@ public bool TryPickValue1( return IsValue1; } + /// + /// + /// + public T1 PickValue1() => IsValue1 + ? Value1! + : throw new global::System.InvalidOperationException($"Expected union variant 'Value1' but the value was {ToString()}."); + /// /// /// @@ -67,6 +74,13 @@ public bool TryPickValue2( value = Value2; return IsValue2; } + + /// + /// + /// + public T2 PickValue2() => IsValue2 + ? Value2! + : throw new global::System.InvalidOperationException($"Expected union variant 'Value2' but the value was {ToString()}."); /// /// /// @@ -85,6 +99,11 @@ public OneOf(T1? value) Value1 = value; } + /// + /// + /// + public static OneOf FromValue1(T1? value) => new OneOf(value); + /// /// /// @@ -103,6 +122,11 @@ public OneOf(T2? value) Value2 = value; } + /// + /// + /// + public static OneOf FromValue2(T2? value) => new OneOf(value); + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.OptionsSupport.g.cs b/src/libs/Vectara/Generated/Vectara.OptionsSupport.g.cs index 7caa1ac8..d2c4322b 100644 --- a/src/libs/Vectara/Generated/Vectara.OptionsSupport.g.cs +++ b/src/libs/Vectara/Generated/Vectara.OptionsSupport.g.cs @@ -54,6 +54,172 @@ public sealed class AutoSDKClientOptions Hooks.Add(hook ?? throw new global::System.ArgumentNullException(nameof(hook))); return this; } + + /// + /// Optional per-request authorization provider invoked before each request is sent. + /// Set this when the client is registered as a singleton in DI but each call needs + /// a fresh credential resolved from a provider, secret-store, or session — instead + /// of mutating the shared Authorizations list at construction time. + /// + public global::Vectara.IAutoSDKAuthorizationProvider? AuthorizationProvider { get; set; } + + /// + /// Convenience helper that registers + /// using so request-level auth is resolved without + /// touching shared client state. + /// + /// + public global::Vectara.AutoSDKClientOptions UseAuthorizationProvider( + global::Vectara.IAutoSDKAuthorizationProvider provider) + { + AuthorizationProvider = provider ?? throw new global::System.ArgumentNullException(nameof(provider)); + if (Hooks.Find(static x => x is global::Vectara.AutoSDKAuthorizationProviderHook) == null) + { + Hooks.Add(new global::Vectara.AutoSDKAuthorizationProviderHook()); + } + + return this; + } + } + + /// + /// A request-level authorization value supplied by . + /// Mirrors the runtime fields the SDK applies for HTTP / OAuth2 / API-key auth without + /// requiring the consumer to construct the generated EndPointAuthorization type. + /// + public readonly struct AutoSDKAuthorizationValue + { + /// + /// Initializes a new . + /// + /// + /// + /// + /// + /// + public AutoSDKAuthorizationValue( + string value, + string scheme = "Bearer", + string? headerName = null, + string location = "Header", + string type = "Http") + { + Value = value ?? string.Empty; + Scheme = string.IsNullOrWhiteSpace(scheme) ? "Bearer" : scheme; + HeaderName = headerName ?? string.Empty; + Location = string.IsNullOrWhiteSpace(location) ? "Header" : location; + Type = string.IsNullOrWhiteSpace(type) ? "Http" : type; + } + + /// The credential value (token, API key, etc.). + public string Value { get; } + + /// The HTTP authorization scheme — typically Bearer, Basic, or Token. + public string Scheme { get; } + + /// The custom header name when is ApiKey; ignored for HTTP/OAuth2 auth. + public string HeaderName { get; } + + /// The credential location — Header, Query, or Cookie. + public string Location { get; } + + /// The auth type — Http, OAuth2, OpenIdConnect, or ApiKey. + public string Type { get; } + + /// Convenience factory for a Bearer token. + public static global::Vectara.AutoSDKAuthorizationValue Bearer(string token) => new(value: token, scheme: "Bearer"); + + /// Convenience factory for an API-key header. + public static global::Vectara.AutoSDKAuthorizationValue ApiKeyHeader(string name, string value) => + new(value: value, headerName: name, location: "Header", type: "ApiKey"); + } + + /// + /// Resolves request-level authorization values without mutating the shared client + /// authorization list. Implementations should be safe to invoke concurrently — + /// the hook calls them once per outgoing request. + /// + public interface IAutoSDKAuthorizationProvider + { + /// + /// Returns one or more values to apply to + /// the current request, or an empty list / null to leave the request as-is. + /// + /// + global::System.Threading.Tasks.Task?> ResolveAsync( + global::Vectara.AutoSDKHookContext context); + } + + /// + /// Built-in that consults + /// before every outgoing + /// request and stamps the resolved values onto the . + /// + public sealed class AutoSDKAuthorizationProviderHook : global::Vectara.AutoSDKHook + { + /// + public override async global::System.Threading.Tasks.Task OnBeforeRequestAsync( + global::Vectara.AutoSDKHookContext context) + { + context = context ?? throw new global::System.ArgumentNullException(nameof(context)); + + if (context.Request == null) + { + return; + } + + var perRequest = context.RequestOptions?.Authorizations; + if (perRequest != null && perRequest.Count > 0) + { + for (var index = 0; index < perRequest.Count; index++) + { + ApplyAuthorization(context.Request, perRequest[index]); + } + + return; + } + + var provider = context.ClientOptions?.AuthorizationProvider; + if (provider == null) + { + return; + } + + var resolved = await provider.ResolveAsync(context).ConfigureAwait(false); + if (resolved == null || resolved.Count == 0) + { + return; + } + + for (var index = 0; index < resolved.Count; index++) + { + ApplyAuthorization(context.Request, resolved[index]); + } + } + + private static void ApplyAuthorization( + global::System.Net.Http.HttpRequestMessage request, + global::Vectara.AutoSDKAuthorizationValue authorization) + { + switch (authorization.Type) + { + case "Http": + case "OAuth2": + case "OpenIdConnect": + request.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: authorization.Scheme, + parameter: authorization.Value); + break; + case "ApiKey": + if (string.Equals(authorization.Location, "Header", global::System.StringComparison.OrdinalIgnoreCase) && + !string.IsNullOrEmpty(authorization.HeaderName)) + { + request.Headers.Remove(authorization.HeaderName); + request.Headers.TryAddWithoutValidation(authorization.HeaderName, authorization.Value ?? string.Empty); + } + break; + } + } } /// @@ -87,6 +253,15 @@ public sealed class AutoSDKRequestOptions /// Overrides response buffering for this request when set. /// public bool? ReadResponseAsString { get; set; } + + /// + /// Optional per-request authorization values. When non-empty, the built-in + /// applies these instead of consulting + /// for this request only. + /// Useful for multi-tenant routing or "act-as" admin tooling that needs a different + /// credential per call without mutating shared client state. + /// + public global::System.Collections.Generic.IReadOnlyList? Authorizations { get; set; } } ///