diff --git a/src/libs/Vectara/Generated/Vectara.AllOf.2.g.cs b/src/libs/Vectara/Generated/Vectara.AllOf.2.g.cs index cb9097e3..880bbbf9 100644 --- a/src/libs/Vectara/Generated/Vectara.AllOf.2.g.cs +++ b/src/libs/Vectara/Generated/Vectara.AllOf.2.g.cs @@ -25,6 +25,19 @@ namespace Vectara #endif public bool IsValue1 => Value1 != null; + /// + /// + /// + public bool TryPickValue1( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out T1? value) + { + value = Value1; + return IsValue1; + } + /// /// /// @@ -41,6 +54,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] #endif public bool IsValue2 => Value2 != null; + + /// + /// + /// + public bool TryPickValue2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out T2? value) + { + value = Value2; + return IsValue2; + } /// /// /// @@ -157,6 +183,30 @@ public bool Validate() /// public void Match( global::System.Action? value1 = null, + + global::System.Action? value2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsValue1) + { + value1?.Invoke(Value1!); + } + else if (IsValue2) + { + value2?.Invoke(Value2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? value1 = null, global::System.Action? value2 = null, bool validate = true) { diff --git a/src/libs/Vectara/Generated/Vectara.Models.AgentEvent.g.cs b/src/libs/Vectara/Generated/Vectara.Models.AgentEvent.g.cs index 59ffc18b..46b56fd5 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.AgentEvent.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.AgentEvent.g.cs @@ -31,6 +31,19 @@ namespace Vectara #endif public bool IsInputMessage => InputMessage != null; + /// + /// + /// + public bool TryPickInputMessage( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.InputMessageEvent? value) + { + value = InputMessage; + return IsInputMessage; + } + /// /// An event representing the loading of a skill's content into the conversation. /// @@ -48,6 +61,19 @@ namespace Vectara #endif public bool IsSkillLoad => SkillLoad != null; + /// + /// + /// + public bool TryPickSkillLoad( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.SkillLoadEvent? value) + { + value = SkillLoad; + return IsSkillLoad; + } + /// /// 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.
@@ -68,6 +94,19 @@ namespace Vectara #endif public bool IsArtifactUpload => ArtifactUpload != null; + /// + /// + /// + public bool TryPickArtifactUpload( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.ArtifactUploadEvent? value) + { + value = ArtifactUpload; + return IsArtifactUpload; + } + /// /// An event representing input to a tool call. /// @@ -85,6 +124,19 @@ namespace Vectara #endif public bool IsToolInput => ToolInput != null; + /// + /// + /// + public bool TryPickToolInput( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.ToolInputEvent? value) + { + value = ToolInput; + return IsToolInput; + } + /// /// An event representing output from a tool call. /// @@ -102,6 +154,19 @@ namespace Vectara #endif public bool IsToolOutput => ToolOutput != null; + /// + /// + /// + public bool TryPickToolOutput( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.ToolOutputEvent? value) + { + value = ToolOutput; + return IsToolOutput; + } + /// /// An event representing chain-of-thought thinking by the agent. /// @@ -119,6 +184,19 @@ namespace Vectara #endif public bool IsThinking => Thinking != null; + /// + /// + /// + public bool TryPickThinking( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.ThinkingEvent? value) + { + value = Thinking; + return IsThinking; + } + /// /// An event representing a complete agent response. /// @@ -136,6 +214,19 @@ namespace Vectara #endif public bool IsAgentOutput => AgentOutput != null; + /// + /// + /// + public bool TryPickAgentOutput( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.AgentOutputEvent? value) + { + value = AgentOutput; + return IsAgentOutput; + } + /// /// 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
@@ -159,6 +250,19 @@ namespace Vectara #endif public bool IsStructuredOutput => StructuredOutput != null; + /// + /// + /// + public bool TryPickStructuredOutput( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.StructuredOutputEvent? value) + { + value = StructuredOutput; + return IsStructuredOutput; + } + /// /// A transient event indicating the current request exceeded the LLM's context limit.
/// This event is not persisted to the session history. @@ -177,6 +281,19 @@ namespace Vectara #endif public bool IsContextLimitExceeded => ContextLimitExceeded != null; + /// + /// + /// + public bool TryPickContextLimitExceeded( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.ContextLimitExceededEvent? value) + { + value = ContextLimitExceeded; + return IsContextLimitExceeded; + } + /// /// A transient event indicating the agent exceeded the maximum number of step transitions,
/// which may indicate an infinite loop between steps.
@@ -196,6 +313,19 @@ namespace Vectara #endif public bool IsStepTransitionLimitExceeded => StepTransitionLimitExceeded != null; + /// + /// + /// + public bool TryPickStepTransitionLimitExceeded( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.StepTransitionLimitExceededEvent? value) + { + value = StepTransitionLimitExceeded; + return IsStepTransitionLimitExceeded; + } + /// /// A transient event indicating the agent session was interrupted by a user request.
/// This event is not persisted to the session history. @@ -214,6 +344,19 @@ namespace Vectara #endif public bool IsSessionInterrupted => SessionInterrupted != null; + /// + /// + /// + public bool TryPickSessionInterrupted( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.SessionInterruptedEvent? value) + { + value = SessionInterrupted; + return IsSessionInterrupted; + } + /// /// An event representing an image being loaded into the conversation context for viewing and analysis. /// @@ -231,6 +374,19 @@ namespace Vectara #endif public bool IsImageRead => ImageRead != null; + /// + /// + /// + public bool TryPickImageRead( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.ImageReadEvent? value) + { + value = ImageRead; + return IsImageRead; + } + /// /// An event representing a transition between agent steps. /// @@ -248,6 +404,19 @@ namespace Vectara #endif public bool IsStepTransition => StepTransition != null; + /// + /// + /// + public bool TryPickStepTransition( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.StepTransitionEvent? value) + { + value = StepTransition; + return IsStepTransition; + } + /// /// An event indicating that context compaction has completed. /// @@ -264,6 +433,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Compaction))] #endif public bool IsCompaction => Compaction != null; + + /// + /// + /// + public bool TryPickCompaction( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.CompactionEvent? value) + { + value = Compaction; + return IsCompaction; + } /// /// /// @@ -693,6 +875,102 @@ public bool Validate() ///
public void Match( global::System.Action? inputMessage = null, + + global::System.Action? skillLoad = null, + + global::System.Action? artifactUpload = null, + + global::System.Action? toolInput = null, + + global::System.Action? toolOutput = null, + + global::System.Action? thinking = null, + + global::System.Action? agentOutput = null, + + global::System.Action? structuredOutput = null, + + global::System.Action? contextLimitExceeded = null, + + global::System.Action? stepTransitionLimitExceeded = null, + + global::System.Action? sessionInterrupted = null, + + global::System.Action? imageRead = null, + + global::System.Action? stepTransition = null, + + global::System.Action? compaction = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsInputMessage) + { + inputMessage?.Invoke(InputMessage!); + } + else if (IsSkillLoad) + { + skillLoad?.Invoke(SkillLoad!); + } + else if (IsArtifactUpload) + { + artifactUpload?.Invoke(ArtifactUpload!); + } + else if (IsToolInput) + { + toolInput?.Invoke(ToolInput!); + } + else if (IsToolOutput) + { + toolOutput?.Invoke(ToolOutput!); + } + else if (IsThinking) + { + thinking?.Invoke(Thinking!); + } + else if (IsAgentOutput) + { + agentOutput?.Invoke(AgentOutput!); + } + else if (IsStructuredOutput) + { + structuredOutput?.Invoke(StructuredOutput!); + } + else if (IsContextLimitExceeded) + { + contextLimitExceeded?.Invoke(ContextLimitExceeded!); + } + else if (IsStepTransitionLimitExceeded) + { + stepTransitionLimitExceeded?.Invoke(StepTransitionLimitExceeded!); + } + else if (IsSessionInterrupted) + { + sessionInterrupted?.Invoke(SessionInterrupted!); + } + else if (IsImageRead) + { + imageRead?.Invoke(ImageRead!); + } + else if (IsStepTransition) + { + stepTransition?.Invoke(StepTransition!); + } + else if (IsCompaction) + { + compaction?.Invoke(Compaction!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? inputMessage = null, global::System.Action? skillLoad = null, global::System.Action? artifactUpload = null, global::System.Action? toolInput = null, diff --git a/src/libs/Vectara/Generated/Vectara.Models.AgentInput.g.cs b/src/libs/Vectara/Generated/Vectara.Models.AgentInput.g.cs index 177976a1..9ca5d0da 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.AgentInput.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.AgentInput.g.cs @@ -31,6 +31,19 @@ namespace Vectara #endif public bool IsText => Text != null; + /// + /// + /// + public bool TryPickText( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.AgentTextInput? value) + { + value = Text; + return IsText; + } + /// /// An input that invokes a skill by name. /// @@ -47,6 +60,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Skill))] #endif public bool IsSkill => Skill != null; + + /// + /// + /// + public bool TryPickSkill( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.AgentSkillInput? value) + { + value = Skill; + return IsSkill; + } /// /// /// @@ -126,8 +152,8 @@ public bool Validate() /// ///
public TResult? Match( - global::System.Func? text = null, - global::System.Func? skill = null, + global::System.Func? text = null, + global::System.Func? skill = null, bool validate = true) { if (validate) @@ -151,8 +177,32 @@ public bool Validate() /// ///
public void Match( - global::System.Action? text = null, - global::System.Action? skill = null, + global::System.Action? text = null, + + global::System.Action? skill = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsText) + { + text?.Invoke(Text!); + } + else if (IsSkill) + { + skill?.Invoke(Skill!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? text = null, + global::System.Action? skill = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.AgentOutputEvent.g.cs b/src/libs/Vectara/Generated/Vectara.Models.AgentOutputEvent.g.cs index 12dd3bff..98163772 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.AgentOutputEvent.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.AgentOutputEvent.g.cs @@ -26,6 +26,19 @@ namespace Vectara #endif public bool IsBase => Base != null; + /// + /// + /// + public bool TryPickBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.AgentEventBase? value) + { + value = Base; + return IsBase; + } + /// /// /// @@ -42,6 +55,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AgentOutputEventVariant2))] #endif public bool IsAgentOutputEventVariant2 => AgentOutputEventVariant2 != null; + + /// + /// + /// + public bool TryPickAgentOutputEventVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.AgentOutputEventVariant2? value) + { + value = AgentOutputEventVariant2; + return IsAgentOutputEventVariant2; + } /// /// /// @@ -118,8 +144,8 @@ public bool Validate() /// ///
public TResult? Match( - global::System.Func? @base = null, - global::System.Func? agentOutputEventVariant2 = null, + global::System.Func? @base = null, + global::System.Func? agentOutputEventVariant2 = null, bool validate = true) { if (validate) @@ -143,8 +169,32 @@ public bool Validate() /// ///
public void Match( - global::System.Action? @base = null, - global::System.Action? agentOutputEventVariant2 = null, + global::System.Action? @base = null, + + global::System.Action? agentOutputEventVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsBase) + { + @base?.Invoke(Base!); + } + else if (IsAgentOutputEventVariant2) + { + agentOutputEventVariant2?.Invoke(AgentOutputEventVariant2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? @base = null, + global::System.Action? agentOutputEventVariant2 = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.AgentOutputParser.g.cs b/src/libs/Vectara/Generated/Vectara.Models.AgentOutputParser.g.cs index 9f8ab09f..ebbf9a70 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.AgentOutputParser.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.AgentOutputParser.g.cs @@ -32,6 +32,19 @@ namespace Vectara #endif public bool IsDefault => Default != null; + /// + /// + /// + public bool TryPickDefault( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.DefaultOutputParser? value) + { + value = Default; + return IsDefault; + } + /// /// Parses agent output as structured JSON conforming to a specified schema.
/// Uses the model's native structured outputs capability to guarantee valid JSON
@@ -58,6 +71,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Structured))] #endif public bool IsStructured => Structured != null; + + /// + /// + /// + public bool TryPickStructured( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.StructuredOutputParser? value) + { + value = Structured; + return IsStructured; + } /// /// /// @@ -137,8 +163,8 @@ public bool Validate() /// ///
public TResult? Match( - global::System.Func? @default = null, - global::System.Func? structured = null, + global::System.Func? @default = null, + global::System.Func? structured = null, bool validate = true) { if (validate) @@ -162,8 +188,32 @@ public bool Validate() /// /// public void Match( - global::System.Action? @default = null, - global::System.Action? structured = null, + global::System.Action? @default = null, + + global::System.Action? structured = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsDefault) + { + @default?.Invoke(Default!); + } + else if (IsStructured) + { + structured?.Invoke(Structured!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? @default = null, + global::System.Action? structured = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.AgentStepInstruction.g.cs b/src/libs/Vectara/Generated/Vectara.Models.AgentStepInstruction.g.cs index 80b061f0..d3c22e18 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.AgentStepInstruction.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.AgentStepInstruction.g.cs @@ -32,6 +32,19 @@ namespace Vectara #endif public bool IsReference => Reference != null; + /// + /// + /// + public bool TryPickReference( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.ReferenceInstruction? value) + { + value = Reference; + return IsReference; + } + /// /// An instruction defined inline in the request. /// @@ -48,6 +61,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Inline))] #endif public bool IsInline => Inline != null; + + /// + /// + /// + public bool TryPickInline( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.InlineInstruction? value) + { + value = Inline; + return IsInline; + } /// /// /// @@ -153,6 +179,30 @@ public bool Validate() /// public void Match( global::System.Action? reference = null, + + global::System.Action? inline = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsReference) + { + reference?.Invoke(Reference!); + } + else if (IsInline) + { + inline?.Invoke(Inline!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? reference = null, global::System.Action? inline = null, bool validate = true) { diff --git a/src/libs/Vectara/Generated/Vectara.Models.AgentStepReminder.g.cs b/src/libs/Vectara/Generated/Vectara.Models.AgentStepReminder.g.cs index 105cbf85..5c4715ef 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.AgentStepReminder.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.AgentStepReminder.g.cs @@ -31,6 +31,19 @@ namespace Vectara #endif public bool IsTemplated => Templated != null; + /// + /// + /// + public bool TryPickTemplated( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.TemplatedReminder? value) + { + value = Templated; + return IsTemplated; + } + /// /// 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
@@ -49,6 +62,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(GlossaryExpansion))] #endif public bool IsGlossaryExpansion => GlossaryExpansion != null; + + /// + /// + /// + public bool TryPickGlossaryExpansion( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.GlossaryExpansionReminder? value) + { + value = GlossaryExpansion; + return IsGlossaryExpansion; + } /// /// /// @@ -128,8 +154,8 @@ public bool Validate() /// ///
public TResult? Match( - global::System.Func? templated = null, - global::System.Func? glossaryExpansion = null, + global::System.Func? templated = null, + global::System.Func? glossaryExpansion = null, bool validate = true) { if (validate) @@ -153,8 +179,32 @@ public bool Validate() /// /// public void Match( - global::System.Action? templated = null, - global::System.Action? glossaryExpansion = null, + global::System.Action? templated = null, + + global::System.Action? glossaryExpansion = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsTemplated) + { + templated?.Invoke(Templated!); + } + else if (IsGlossaryExpansion) + { + glossaryExpansion?.Invoke(GlossaryExpansion!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? templated = null, + global::System.Action? glossaryExpansion = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.AgentStreamedResponse.g.cs b/src/libs/Vectara/Generated/Vectara.Models.AgentStreamedResponse.g.cs index 4fe41929..6c7e4b8b 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.AgentStreamedResponse.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.AgentStreamedResponse.g.cs @@ -31,6 +31,19 @@ namespace Vectara #endif public bool IsSkillLoad => SkillLoad != null; + /// + /// + /// + public bool TryPickSkillLoad( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.SkillLoadEvent? value) + { + value = SkillLoad; + return IsSkillLoad; + } + /// /// An event representing chain-of-thought thinking by the agent. /// @@ -48,6 +61,19 @@ namespace Vectara #endif public bool IsThinking => Thinking != null; + /// + /// + /// + public bool TryPickThinking( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.ThinkingEvent? value) + { + value = Thinking; + return IsThinking; + } + /// /// 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.
@@ -68,6 +94,19 @@ namespace Vectara #endif public bool IsArtifactUpload => ArtifactUpload != null; + /// + /// + /// + public bool TryPickArtifactUpload( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.ArtifactUploadEvent? value) + { + value = ArtifactUpload; + return IsArtifactUpload; + } + /// /// An input message event from a user. /// @@ -85,6 +124,19 @@ namespace Vectara #endif public bool IsInputMessage => InputMessage != null; + /// + /// + /// + public bool TryPickInputMessage( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.InputMessageEvent? value) + { + value = InputMessage; + return IsInputMessage; + } + /// /// A streaming chunk of agent output (SSE only, not stored). /// @@ -102,6 +154,19 @@ namespace Vectara #endif public bool IsStreamingAgentOutput => StreamingAgentOutput != null; + /// + /// + /// + public bool TryPickStreamingAgentOutput( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.StreamingAgentOutput? value) + { + value = StreamingAgentOutput; + return IsStreamingAgentOutput; + } + /// /// Signals the end of streaming agent output (SSE only, not stored). /// @@ -119,6 +184,19 @@ namespace Vectara #endif public bool IsStreamingAgentOutputEnd => StreamingAgentOutputEnd != null; + /// + /// + /// + public bool TryPickStreamingAgentOutputEnd( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.StreamingAgentOutputEnd? value) + { + value = StreamingAgentOutputEnd; + return IsStreamingAgentOutputEnd; + } + /// /// A streaming chunk of agent thinking (SSE only, not stored). /// @@ -136,6 +214,19 @@ namespace Vectara #endif public bool IsStreamingThinking => StreamingThinking != null; + /// + /// + /// + public bool TryPickStreamingThinking( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.StreamingThinking? value) + { + value = StreamingThinking; + return IsStreamingThinking; + } + /// /// Signals the end of streaming thinking (SSE only, not stored). /// @@ -153,6 +244,19 @@ namespace Vectara #endif public bool IsStreamingThinkingEnd => StreamingThinkingEnd != null; + /// + /// + /// + public bool TryPickStreamingThinkingEnd( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.StreamingThinkingEnd? value) + { + value = StreamingThinkingEnd; + return IsStreamingThinkingEnd; + } + /// /// An event representing input to a tool call. /// @@ -170,6 +274,19 @@ namespace Vectara #endif public bool IsToolInput => ToolInput != null; + /// + /// + /// + public bool TryPickToolInput( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.ToolInputEvent? value) + { + value = ToolInput; + return IsToolInput; + } + /// /// An event representing output from a tool call. /// @@ -187,6 +304,19 @@ namespace Vectara #endif public bool IsToolOutput => ToolOutput != null; + /// + /// + /// + public bool TryPickToolOutput( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.ToolOutputEvent? value) + { + value = ToolOutput; + return IsToolOutput; + } + /// /// 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
@@ -210,6 +340,19 @@ namespace Vectara #endif public bool IsStructuredOutput => StructuredOutput != null; + /// + /// + /// + public bool TryPickStructuredOutput( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.StructuredOutputEvent? value) + { + value = StructuredOutput; + return IsStructuredOutput; + } + /// /// A transient event indicating the current request exceeded the LLM's context limit.
/// This event is not persisted to the session history. @@ -228,6 +371,19 @@ namespace Vectara #endif public bool IsContextLimitExceeded => ContextLimitExceeded != null; + /// + /// + /// + public bool TryPickContextLimitExceeded( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.ContextLimitExceededEvent? value) + { + value = ContextLimitExceeded; + return IsContextLimitExceeded; + } + /// /// A transient event indicating the agent exceeded the maximum number of step transitions,
/// which may indicate an infinite loop between steps.
@@ -247,6 +403,19 @@ namespace Vectara #endif public bool IsStepTransitionLimitExceeded => StepTransitionLimitExceeded != null; + /// + /// + /// + public bool TryPickStepTransitionLimitExceeded( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.StepTransitionLimitExceededEvent? value) + { + value = StepTransitionLimitExceeded; + return IsStepTransitionLimitExceeded; + } + /// /// A transient event indicating the agent session was interrupted by a user request.
/// This event is not persisted to the session history. @@ -265,6 +434,19 @@ namespace Vectara #endif public bool IsSessionInterrupted => SessionInterrupted != null; + /// + /// + /// + public bool TryPickSessionInterrupted( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.SessionInterruptedEvent? value) + { + value = SessionInterrupted; + return IsSessionInterrupted; + } + /// /// An event representing an image being loaded into the conversation context for viewing and analysis. /// @@ -282,6 +464,19 @@ namespace Vectara #endif public bool IsImageRead => ImageRead != null; + /// + /// + /// + public bool TryPickImageRead( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.ImageReadEvent? value) + { + value = ImageRead; + return IsImageRead; + } + /// /// An event representing a transition between agent steps. /// @@ -299,6 +494,19 @@ namespace Vectara #endif public bool IsStepTransition => StepTransition != null; + /// + /// + /// + public bool TryPickStepTransition( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.StepTransitionEvent? value) + { + value = StepTransition; + return IsStepTransition; + } + /// /// Token usage event reporting context window consumption. /// @@ -316,6 +524,19 @@ namespace Vectara #endif public bool IsContextConsumed => ContextConsumed != null; + /// + /// + /// + public bool TryPickContextConsumed( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.ContextConsumedEvent? value) + { + value = ContextConsumed; + return IsContextConsumed; + } + /// /// An event indicating that context compaction has started. /// @@ -333,6 +554,19 @@ namespace Vectara #endif public bool IsCompactionStarted => CompactionStarted != null; + /// + /// + /// + public bool TryPickCompactionStarted( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.CompactionStartedEvent? value) + { + value = CompactionStarted; + return IsCompactionStarted; + } + /// /// An event indicating that context compaction has completed. /// @@ -350,6 +584,19 @@ namespace Vectara #endif public bool IsCompaction => Compaction != null; + /// + /// + /// + public bool TryPickCompaction( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.CompactionEvent? value) + { + value = Compaction; + return IsCompaction; + } + /// /// Event signaling there was an error with the request. /// @@ -367,6 +614,19 @@ namespace Vectara #endif public bool IsError => Error != null; + /// + /// + /// + public bool TryPickError( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.StreamError? value) + { + value = Error; + return IsError; + } + /// /// The end of a query response stream. /// @@ -383,6 +643,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(End))] #endif public bool IsEnd => End != null; + + /// + /// + /// + public bool TryPickEnd( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.StreamResponseEnd? value) + { + value = End; + return IsEnd; + } /// /// /// @@ -884,10 +1157,10 @@ public bool Validate() global::System.Func? thinking = null, global::System.Func? artifactUpload = null, global::System.Func? inputMessage = null, - global::System.Func? streamingAgentOutput = null, - global::System.Func? streamingAgentOutputEnd = null, - global::System.Func? streamingThinking = null, - global::System.Func? streamingThinkingEnd = null, + global::System.Func? streamingAgentOutput = null, + global::System.Func? streamingAgentOutputEnd = null, + global::System.Func? streamingThinking = null, + global::System.Func? streamingThinkingEnd = null, global::System.Func? toolInput = null, global::System.Func? toolOutput = null, global::System.Func? structuredOutput = null, @@ -896,11 +1169,11 @@ public bool Validate() global::System.Func? sessionInterrupted = null, global::System.Func? imageRead = null, global::System.Func? stepTransition = null, - global::System.Func? contextConsumed = null, + global::System.Func? contextConsumed = null, global::System.Func? compactionStarted = null, global::System.Func? compaction = null, - global::System.Func? error = null, - global::System.Func? end = null, + global::System.Func? error = null, + global::System.Func? end = null, bool validate = true) { if (validate) @@ -1001,13 +1274,151 @@ public bool Validate() ///
public void Match( global::System.Action? skillLoad = null, + + global::System.Action? thinking = null, + + global::System.Action? artifactUpload = null, + + global::System.Action? inputMessage = null, + + global::System.Action? streamingAgentOutput = null, + + global::System.Action? streamingAgentOutputEnd = null, + + global::System.Action? streamingThinking = null, + + global::System.Action? streamingThinkingEnd = null, + + global::System.Action? toolInput = null, + + global::System.Action? toolOutput = null, + + global::System.Action? structuredOutput = null, + + global::System.Action? contextLimitExceeded = null, + + global::System.Action? stepTransitionLimitExceeded = null, + + global::System.Action? sessionInterrupted = null, + + global::System.Action? imageRead = null, + + global::System.Action? stepTransition = null, + + global::System.Action? contextConsumed = null, + + global::System.Action? compactionStarted = null, + + global::System.Action? compaction = null, + + global::System.Action? error = null, + + global::System.Action? end = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsSkillLoad) + { + skillLoad?.Invoke(SkillLoad!); + } + else if (IsThinking) + { + thinking?.Invoke(Thinking!); + } + else if (IsArtifactUpload) + { + artifactUpload?.Invoke(ArtifactUpload!); + } + else if (IsInputMessage) + { + inputMessage?.Invoke(InputMessage!); + } + else if (IsStreamingAgentOutput) + { + streamingAgentOutput?.Invoke(StreamingAgentOutput!); + } + else if (IsStreamingAgentOutputEnd) + { + streamingAgentOutputEnd?.Invoke(StreamingAgentOutputEnd!); + } + else if (IsStreamingThinking) + { + streamingThinking?.Invoke(StreamingThinking!); + } + else if (IsStreamingThinkingEnd) + { + streamingThinkingEnd?.Invoke(StreamingThinkingEnd!); + } + else if (IsToolInput) + { + toolInput?.Invoke(ToolInput!); + } + else if (IsToolOutput) + { + toolOutput?.Invoke(ToolOutput!); + } + else if (IsStructuredOutput) + { + structuredOutput?.Invoke(StructuredOutput!); + } + else if (IsContextLimitExceeded) + { + contextLimitExceeded?.Invoke(ContextLimitExceeded!); + } + else if (IsStepTransitionLimitExceeded) + { + stepTransitionLimitExceeded?.Invoke(StepTransitionLimitExceeded!); + } + else if (IsSessionInterrupted) + { + sessionInterrupted?.Invoke(SessionInterrupted!); + } + else if (IsImageRead) + { + imageRead?.Invoke(ImageRead!); + } + else if (IsStepTransition) + { + stepTransition?.Invoke(StepTransition!); + } + else if (IsContextConsumed) + { + contextConsumed?.Invoke(ContextConsumed!); + } + else if (IsCompactionStarted) + { + compactionStarted?.Invoke(CompactionStarted!); + } + else if (IsCompaction) + { + compaction?.Invoke(Compaction!); + } + else if (IsError) + { + error?.Invoke(Error!); + } + else if (IsEnd) + { + end?.Invoke(End!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? skillLoad = null, global::System.Action? thinking = null, global::System.Action? artifactUpload = null, global::System.Action? inputMessage = null, - global::System.Action? streamingAgentOutput = null, - global::System.Action? streamingAgentOutputEnd = null, - global::System.Action? streamingThinking = null, - global::System.Action? streamingThinkingEnd = null, + global::System.Action? streamingAgentOutput = null, + global::System.Action? streamingAgentOutputEnd = null, + global::System.Action? streamingThinking = null, + global::System.Action? streamingThinkingEnd = null, global::System.Action? toolInput = null, global::System.Action? toolOutput = null, global::System.Action? structuredOutput = null, @@ -1016,11 +1427,11 @@ public void Match( global::System.Action? sessionInterrupted = null, global::System.Action? imageRead = null, global::System.Action? stepTransition = null, - global::System.Action? contextConsumed = null, + global::System.Action? contextConsumed = null, global::System.Action? compactionStarted = null, global::System.Action? compaction = null, - global::System.Action? error = null, - global::System.Action? end = null, + global::System.Action? error = null, + global::System.Action? end = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.AgentToolConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.Models.AgentToolConfiguration.g.cs index f2191ac3..fe3cfc83 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.AgentToolConfiguration.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.AgentToolConfiguration.g.cs @@ -32,6 +32,19 @@ namespace Vectara #endif public bool IsDynamicVectara => DynamicVectara != null; + /// + /// + /// + public bool TryPickDynamicVectara( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.InlineDynamicVectaraToolConfiguration? value) + { + value = DynamicVectara; + return IsDynamicVectara; + } + /// /// An MCP tool configuration defined inline in the agent. /// @@ -49,6 +62,19 @@ namespace Vectara #endif public bool IsMcp => Mcp != null; + /// + /// + /// + public bool TryPickMcp( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.InlineMcpToolConfiguration? value) + { + value = Mcp; + return IsMcp; + } + /// /// A corpora search tool configuration defined inline in the agent. /// @@ -66,6 +92,19 @@ namespace Vectara #endif public bool IsCorporaSearch => CorporaSearch != null; + /// + /// + /// + public bool TryPickCorporaSearch( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.InlineCorporaSearchToolConfiguration? value) + { + value = CorporaSearch; + return IsCorporaSearch; + } + /// /// A web search tool configuration defined inline in the agent. /// @@ -83,6 +122,19 @@ namespace Vectara #endif public bool IsWebSearch => WebSearch != null; + /// + /// + /// + public bool TryPickWebSearch( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.InlineWebSearchToolConfiguration? value) + { + value = WebSearch; + return IsWebSearch; + } + /// /// A web get tool configuration defined inline in the agent for fetching content from URLs. /// @@ -100,6 +152,19 @@ namespace Vectara #endif public bool IsWebGet => WebGet != null; + /// + /// + /// + public bool TryPickWebGet( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.InlineWebGetToolConfiguration? value) + { + value = WebGet; + return IsWebGet; + } + /// /// A lambda tool configuration defined inline in the agent for executing user-defined functions. /// @@ -117,6 +182,19 @@ namespace Vectara #endif public bool IsLambda => Lambda != null; + /// + /// + /// + public bool TryPickLambda( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.InlineLambdaToolConfiguration? value) + { + value = Lambda; + return IsLambda; + } + /// /// A sub-agent tool configuration defined inline in the agent for invoking specialized sub-agents. /// @@ -134,6 +212,19 @@ namespace Vectara #endif public bool IsSubAgent => SubAgent != null; + /// + /// + /// + public bool TryPickSubAgent( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.InlineSubAgentToolConfiguration? value) + { + value = SubAgent; + return IsSubAgent; + } + /// /// An artifact create tool configuration defined inline in the agent for creating artifacts on-the-fly from text or structured data content. /// @@ -151,6 +242,19 @@ namespace Vectara #endif public bool IsArtifactCreate => ArtifactCreate != null; + /// + /// + /// + public bool TryPickArtifactCreate( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.InlineArtifactCreateToolConfiguration? value) + { + value = ArtifactCreate; + return IsArtifactCreate; + } + /// /// An artifact read tool configuration defined inline in the agent for reading artifacts from the session workspace. /// @@ -168,6 +272,19 @@ namespace Vectara #endif public bool IsArtifactRead => ArtifactRead != null; + /// + /// + /// + public bool TryPickArtifactRead( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.InlineArtifactReadToolConfiguration? value) + { + value = ArtifactRead; + return IsArtifactRead; + } + /// /// An artifact grep tool configuration defined inline in the agent for searching through artifact content. /// @@ -185,6 +302,19 @@ namespace Vectara #endif public bool IsArtifactGrep => ArtifactGrep != null; + /// + /// + /// + public bool TryPickArtifactGrep( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.InlineArtifactGrepToolConfiguration? value) + { + value = ArtifactGrep; + return IsArtifactGrep; + } + /// /// An image read tool configuration defined inline in the agent for loading images into the conversation context. /// @@ -202,6 +332,19 @@ namespace Vectara #endif public bool IsImageRead => ImageRead != null; + /// + /// + /// + public bool TryPickImageRead( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.InlineImageReadToolConfiguration? value) + { + value = ImageRead; + return IsImageRead; + } + /// /// A document conversion tool configuration defined inline in the agent for converting document artifacts to various formats. /// @@ -219,6 +362,19 @@ namespace Vectara #endif public bool IsDocumentConversion => DocumentConversion != null; + /// + /// + /// + public bool TryPickDocumentConversion( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.InlineDocumentConversionToolConfiguration? value) + { + value = DocumentConversion; + return IsDocumentConversion; + } + /// /// A get document text tool configuration defined inline in the agent for fetching document text content from a corpus. /// @@ -235,6 +391,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(GetDocumentText))] #endif public bool IsGetDocumentText => GetDocumentText != null; + + /// + /// + /// + public bool TryPickGetDocumentText( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.InlineGetDocumentTextToolConfiguration? value) + { + value = GetDocumentText; + return IsGetDocumentText; + } /// /// /// @@ -637,6 +806,96 @@ public bool Validate() ///
public void Match( global::System.Action? dynamicVectara = null, + + global::System.Action? mcp = null, + + global::System.Action? corporaSearch = null, + + global::System.Action? webSearch = null, + + global::System.Action? webGet = null, + + global::System.Action? lambda = null, + + global::System.Action? subAgent = null, + + global::System.Action? artifactCreate = null, + + global::System.Action? artifactRead = null, + + global::System.Action? artifactGrep = null, + + global::System.Action? imageRead = null, + + global::System.Action? documentConversion = null, + + global::System.Action? getDocumentText = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsDynamicVectara) + { + dynamicVectara?.Invoke(DynamicVectara!); + } + else if (IsMcp) + { + mcp?.Invoke(Mcp!); + } + else if (IsCorporaSearch) + { + corporaSearch?.Invoke(CorporaSearch!); + } + else if (IsWebSearch) + { + webSearch?.Invoke(WebSearch!); + } + else if (IsWebGet) + { + webGet?.Invoke(WebGet!); + } + else if (IsLambda) + { + lambda?.Invoke(Lambda!); + } + else if (IsSubAgent) + { + subAgent?.Invoke(SubAgent!); + } + else if (IsArtifactCreate) + { + artifactCreate?.Invoke(ArtifactCreate!); + } + else if (IsArtifactRead) + { + artifactRead?.Invoke(ArtifactRead!); + } + else if (IsArtifactGrep) + { + artifactGrep?.Invoke(ArtifactGrep!); + } + else if (IsImageRead) + { + imageRead?.Invoke(ImageRead!); + } + else if (IsDocumentConversion) + { + documentConversion?.Invoke(DocumentConversion!); + } + else if (IsGetDocumentText) + { + getDocumentText?.Invoke(GetDocumentText!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? dynamicVectara = null, global::System.Action? mcp = null, global::System.Action? corporaSearch = null, global::System.Action? webSearch = null, diff --git a/src/libs/Vectara/Generated/Vectara.Models.AgentTraceSpan.g.cs b/src/libs/Vectara/Generated/Vectara.Models.AgentTraceSpan.g.cs index 6d0cc85c..578e2e55 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.AgentTraceSpan.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.AgentTraceSpan.g.cs @@ -31,6 +31,19 @@ namespace Vectara #endif public bool IsInvokeAgent => InvokeAgent != null; + /// + /// + /// + public bool TryPickInvokeAgent( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.InvokeAgentTraceSpan? value) + { + value = InvokeAgent; + return IsInvokeAgent; + } + /// /// A span representing a single LLM chat completion call within an agent turn. /// @@ -48,6 +61,19 @@ namespace Vectara #endif public bool IsChat => Chat != null; + /// + /// + /// + public bool TryPickChat( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.ChatTraceSpan? value) + { + value = Chat; + return IsChat; + } + /// /// A span representing a tool execution within an agent turn. /// @@ -65,6 +91,19 @@ namespace Vectara #endif public bool IsExecuteTool => ExecuteTool != null; + /// + /// + /// + public bool TryPickExecuteTool( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.ExecuteToolTraceSpan? value) + { + value = ExecuteTool; + return IsExecuteTool; + } + /// /// A span representing extended thinking output from the LLM. /// @@ -82,6 +121,19 @@ namespace Vectara #endif public bool IsThinking => Thinking != null; + /// + /// + /// + public bool TryPickThinking( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.ThinkingTraceSpan? value) + { + value = Thinking; + return IsThinking; + } + /// /// A span representing the final text output of an agent turn. /// @@ -99,6 +151,19 @@ namespace Vectara #endif public bool IsOutput => Output != null; + /// + /// + /// + public bool TryPickOutput( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.OutputTraceSpan? value) + { + value = Output; + return IsOutput; + } + /// /// A span representing a guardrail safety check on tool call results. /// @@ -116,6 +181,19 @@ namespace Vectara #endif public bool IsGuardrail => Guardrail != null; + /// + /// + /// + public bool TryPickGuardrail( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.GuardrailTraceSpan? value) + { + value = Guardrail; + return IsGuardrail; + } + /// /// A span representing a transition between agent steps. /// @@ -133,6 +211,19 @@ namespace Vectara #endif public bool IsStepTransition => StepTransition != null; + /// + /// + /// + public bool TryPickStepTransition( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.StepTransitionTraceSpan? value) + { + value = StepTransition; + return IsStepTransition; + } + /// /// A span representing an image being loaded into conversation context. /// @@ -150,6 +241,19 @@ namespace Vectara #endif public bool IsImageRead => ImageRead != null; + /// + /// + /// + public bool TryPickImageRead( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.ImageReadTraceSpan? value) + { + value = ImageRead; + return IsImageRead; + } + /// /// A span representing context compaction (summarization of older conversation turns). /// @@ -166,6 +270,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Compaction))] #endif public bool IsCompaction => Compaction != null; + + /// + /// + /// + public bool TryPickCompaction( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.CompactionTraceSpan? value) + { + value = Compaction; + return IsCompaction; + } /// /// /// @@ -460,6 +577,72 @@ public bool Validate() ///
public void Match( global::System.Action? invokeAgent = null, + + global::System.Action? chat = null, + + global::System.Action? executeTool = null, + + global::System.Action? thinking = null, + + global::System.Action? output = null, + + global::System.Action? guardrail = null, + + global::System.Action? stepTransition = null, + + global::System.Action? imageRead = null, + + global::System.Action? compaction = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsInvokeAgent) + { + invokeAgent?.Invoke(InvokeAgent!); + } + else if (IsChat) + { + chat?.Invoke(Chat!); + } + else if (IsExecuteTool) + { + executeTool?.Invoke(ExecuteTool!); + } + else if (IsThinking) + { + thinking?.Invoke(Thinking!); + } + else if (IsOutput) + { + output?.Invoke(Output!); + } + else if (IsGuardrail) + { + guardrail?.Invoke(Guardrail!); + } + else if (IsStepTransition) + { + stepTransition?.Invoke(StepTransition!); + } + else if (IsImageRead) + { + imageRead?.Invoke(ImageRead!); + } + else if (IsCompaction) + { + compaction?.Invoke(Compaction!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? invokeAgent = null, global::System.Action? chat = null, global::System.Action? executeTool = null, global::System.Action? thinking = null, diff --git a/src/libs/Vectara/Generated/Vectara.Models.AnthropicAuth.g.cs b/src/libs/Vectara/Generated/Vectara.Models.AnthropicAuth.g.cs index 4437bf1b..1072d9c8 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.AnthropicAuth.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.AnthropicAuth.g.cs @@ -31,6 +31,19 @@ namespace Vectara #endif public bool IsBearer => Bearer != null; + /// + /// + /// + public bool TryPickBearer( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.BearerAuth? value) + { + value = Bearer; + return IsBearer; + } + /// /// Custom header-based authentication /// @@ -48,6 +61,19 @@ namespace Vectara #endif public bool IsHeader => Header != null; + /// + /// + /// + public bool TryPickHeader( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.HeaderAuth? value) + { + value = Header; + return IsHeader; + } + /// /// AWS Bedrock authentication with explicit IAM credentials /// @@ -65,6 +91,19 @@ namespace Vectara #endif public bool IsBedrockStaticIam => BedrockStaticIam != null; + /// + /// + /// + public bool TryPickBedrockStaticIam( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.BedrockStaticIAMAuth? value) + { + value = BedrockStaticIam; + return IsBedrockStaticIam; + } + /// /// AWS Bedrock API key authentication /// @@ -82,6 +121,19 @@ namespace Vectara #endif public bool IsBedrockApiKey => BedrockApiKey != null; + /// + /// + /// + public bool TryPickBedrockApiKey( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.BedrockApiKeyAuth? value) + { + value = BedrockApiKey; + return IsBedrockApiKey; + } + /// /// Google Cloud Vertex AI service account authentication /// @@ -99,6 +151,19 @@ namespace Vectara #endif public bool IsVertexServiceAccount => VertexServiceAccount != null; + /// + /// + /// + public bool TryPickVertexServiceAccount( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.VertexServiceAccountAuth? value) + { + value = VertexServiceAccount; + return IsVertexServiceAccount; + } + /// /// Google Cloud Vertex AI access token authentication /// @@ -115,6 +180,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(VertexAccessToken))] #endif public bool IsVertexAccessToken => VertexAccessToken != null; + + /// + /// + /// + public bool TryPickVertexAccessToken( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.VertexAccessTokenAuth? value) + { + value = VertexAccessToken; + return IsVertexAccessToken; + } /// /// /// @@ -282,12 +360,12 @@ public bool Validate() /// ///
public TResult? Match( - global::System.Func? bearer = null, - global::System.Func? header = null, - global::System.Func? bedrockStaticIam = null, - global::System.Func? bedrockApiKey = null, - global::System.Func? vertexServiceAccount = null, - global::System.Func? vertexAccessToken = null, + global::System.Func? bearer = null, + global::System.Func? header = null, + global::System.Func? bedrockStaticIam = null, + global::System.Func? bedrockApiKey = null, + global::System.Func? vertexServiceAccount = null, + global::System.Func? vertexAccessToken = null, bool validate = true) { if (validate) @@ -327,12 +405,60 @@ public bool Validate() /// ///
public void Match( - global::System.Action? bearer = null, - global::System.Action? header = null, - global::System.Action? bedrockStaticIam = null, - global::System.Action? bedrockApiKey = null, - global::System.Action? vertexServiceAccount = null, - global::System.Action? vertexAccessToken = null, + global::System.Action? bearer = null, + + global::System.Action? header = null, + + global::System.Action? bedrockStaticIam = null, + + global::System.Action? bedrockApiKey = null, + + global::System.Action? vertexServiceAccount = null, + + global::System.Action? vertexAccessToken = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsBearer) + { + bearer?.Invoke(Bearer!); + } + else if (IsHeader) + { + header?.Invoke(Header!); + } + else if (IsBedrockStaticIam) + { + bedrockStaticIam?.Invoke(BedrockStaticIam!); + } + else if (IsBedrockApiKey) + { + bedrockApiKey?.Invoke(BedrockApiKey!); + } + else if (IsVertexServiceAccount) + { + vertexServiceAccount?.Invoke(VertexServiceAccount!); + } + else if (IsVertexAccessToken) + { + vertexAccessToken?.Invoke(VertexAccessToken!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? bearer = null, + global::System.Action? header = null, + global::System.Action? bedrockStaticIam = null, + global::System.Action? bedrockApiKey = null, + global::System.Action? vertexServiceAccount = null, + global::System.Action? vertexAccessToken = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.ArtifactCreateTool.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ArtifactCreateTool.g.cs index 7defb0d4..3b6d3795 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.ArtifactCreateTool.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.ArtifactCreateTool.g.cs @@ -26,6 +26,19 @@ namespace Vectara #endif public bool IsBase => Base != null; + /// + /// + /// + public bool TryPickBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.ToolBase? value) + { + value = Base; + return IsBase; + } + /// /// /// @@ -42,6 +55,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ArtifactCreateToolVariant2))] #endif public bool IsArtifactCreateToolVariant2 => ArtifactCreateToolVariant2 != null; + + /// + /// + /// + public bool TryPickArtifactCreateToolVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.ArtifactCreateToolVariant2? value) + { + value = ArtifactCreateToolVariant2; + return IsArtifactCreateToolVariant2; + } /// /// /// @@ -118,8 +144,8 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? @base = null, - global::System.Func? artifactCreateToolVariant2 = null, + global::System.Func? @base = null, + global::System.Func? artifactCreateToolVariant2 = null, bool validate = true) { if (validate) @@ -143,8 +169,32 @@ public bool Validate() /// /// public void Match( - global::System.Action? @base = null, - global::System.Action? artifactCreateToolVariant2 = null, + global::System.Action? @base = null, + + global::System.Action? artifactCreateToolVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsBase) + { + @base?.Invoke(Base!); + } + else if (IsArtifactCreateToolVariant2) + { + artifactCreateToolVariant2?.Invoke(ArtifactCreateToolVariant2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? @base = null, + global::System.Action? artifactCreateToolVariant2 = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.ArtifactGrepTool.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ArtifactGrepTool.g.cs index 2494484c..a644bfc0 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.ArtifactGrepTool.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.ArtifactGrepTool.g.cs @@ -26,6 +26,19 @@ namespace Vectara #endif public bool IsBase => Base != null; + /// + /// + /// + public bool TryPickBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.ToolBase? value) + { + value = Base; + return IsBase; + } + /// /// /// @@ -42,6 +55,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ArtifactGrepToolVariant2))] #endif public bool IsArtifactGrepToolVariant2 => ArtifactGrepToolVariant2 != null; + + /// + /// + /// + public bool TryPickArtifactGrepToolVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.ArtifactGrepToolVariant2? value) + { + value = ArtifactGrepToolVariant2; + return IsArtifactGrepToolVariant2; + } /// /// /// @@ -118,8 +144,8 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? @base = null, - global::System.Func? artifactGrepToolVariant2 = null, + global::System.Func? @base = null, + global::System.Func? artifactGrepToolVariant2 = null, bool validate = true) { if (validate) @@ -143,8 +169,32 @@ public bool Validate() /// /// public void Match( - global::System.Action? @base = null, - global::System.Action? artifactGrepToolVariant2 = null, + global::System.Action? @base = null, + + global::System.Action? artifactGrepToolVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsBase) + { + @base?.Invoke(Base!); + } + else if (IsArtifactGrepToolVariant2) + { + artifactGrepToolVariant2?.Invoke(ArtifactGrepToolVariant2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? @base = null, + global::System.Action? artifactGrepToolVariant2 = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.ArtifactReadTool.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ArtifactReadTool.g.cs index cc7b33f4..3a3b849c 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.ArtifactReadTool.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.ArtifactReadTool.g.cs @@ -26,6 +26,19 @@ namespace Vectara #endif public bool IsBase => Base != null; + /// + /// + /// + public bool TryPickBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.ToolBase? value) + { + value = Base; + return IsBase; + } + /// /// /// @@ -42,6 +55,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ArtifactReadToolVariant2))] #endif public bool IsArtifactReadToolVariant2 => ArtifactReadToolVariant2 != null; + + /// + /// + /// + public bool TryPickArtifactReadToolVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.ArtifactReadToolVariant2? value) + { + value = ArtifactReadToolVariant2; + return IsArtifactReadToolVariant2; + } /// /// /// @@ -118,8 +144,8 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? @base = null, - global::System.Func? artifactReadToolVariant2 = null, + global::System.Func? @base = null, + global::System.Func? artifactReadToolVariant2 = null, bool validate = true) { if (validate) @@ -143,8 +169,32 @@ public bool Validate() /// /// public void Match( - global::System.Action? @base = null, - global::System.Action? artifactReadToolVariant2 = null, + global::System.Action? @base = null, + + global::System.Action? artifactReadToolVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsBase) + { + @base?.Invoke(Base!); + } + else if (IsArtifactReadToolVariant2) + { + artifactReadToolVariant2?.Invoke(ArtifactReadToolVariant2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? @base = null, + global::System.Action? artifactReadToolVariant2 = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.ArtifactUploadEvent.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ArtifactUploadEvent.g.cs index a60bc507..4cf7457d 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.ArtifactUploadEvent.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.ArtifactUploadEvent.g.cs @@ -29,6 +29,19 @@ namespace Vectara #endif public bool IsAgentBase => AgentBase != null; + /// + /// + /// + public bool TryPickAgentBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.AgentEventBase? value) + { + value = AgentBase; + return IsAgentBase; + } + /// /// /// @@ -45,6 +58,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ArtifactUploadEventVariant2))] #endif public bool IsArtifactUploadEventVariant2 => ArtifactUploadEventVariant2 != null; + + /// + /// + /// + public bool TryPickArtifactUploadEventVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.ArtifactUploadEventVariant2? value) + { + value = ArtifactUploadEventVariant2; + return IsArtifactUploadEventVariant2; + } /// /// /// @@ -121,8 +147,8 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? agentBase = null, - global::System.Func? artifactUploadEventVariant2 = null, + global::System.Func? agentBase = null, + global::System.Func? artifactUploadEventVariant2 = null, bool validate = true) { if (validate) @@ -146,8 +172,32 @@ public bool Validate() /// /// public void Match( - global::System.Action? agentBase = null, - global::System.Action? artifactUploadEventVariant2 = null, + global::System.Action? agentBase = null, + + global::System.Action? artifactUploadEventVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAgentBase) + { + agentBase?.Invoke(AgentBase!); + } + else if (IsArtifactUploadEventVariant2) + { + artifactUploadEventVariant2?.Invoke(ArtifactUploadEventVariant2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? agentBase = null, + global::System.Action? artifactUploadEventVariant2 = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.BulkDeleteDocumentsResponse.g.cs b/src/libs/Vectara/Generated/Vectara.Models.BulkDeleteDocumentsResponse.g.cs index 62188470..4a4872d6 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.BulkDeleteDocumentsResponse.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.BulkDeleteDocumentsResponse.g.cs @@ -46,6 +46,19 @@ namespace Vectara #endif public bool IsAsync => Async != null; + /// + /// + /// + public bool TryPickAsync( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.BulkDeleteAsyncResponse? value) + { + value = Async; + return IsAsync; + } + /// /// Response when async=false and operation completes successfully (HTTP 200). /// @@ -62,6 +75,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Success))] #endif public bool IsSuccess => Success != null; + + /// + /// + /// + public bool TryPickSuccess( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.BulkDeleteSyncSuccessResponse? value) + { + value = Success; + return IsSuccess; + } /// /// /// @@ -141,8 +167,8 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? async = null, - global::System.Func? success = null, + global::System.Func? async = null, + global::System.Func? success = null, bool validate = true) { if (validate) @@ -166,8 +192,32 @@ public bool Validate() /// /// public void Match( - global::System.Action? async = null, - global::System.Action? success = null, + global::System.Action? async = null, + + global::System.Action? success = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAsync) + { + async?.Invoke(Async!); + } + else if (IsSuccess) + { + success?.Invoke(Success!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? async = null, + global::System.Action? success = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.ChatStreamedResponse.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ChatStreamedResponse.g.cs index fe433129..1872dec0 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.ChatStreamedResponse.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.ChatStreamedResponse.g.cs @@ -31,6 +31,19 @@ namespace Vectara #endif public bool IsSearchResults => SearchResults != null; + /// + /// + /// + public bool TryPickSearchResults( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.StreamSearchResponse? value) + { + value = SearchResults; + return IsSearchResults; + } + /// /// Information about the chat. /// @@ -48,6 +61,19 @@ namespace Vectara #endif public bool IsChatInfo => ChatInfo != null; + /// + /// + /// + public bool TryPickChatInfo( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.ChatInfoResponse? value) + { + value = ChatInfo; + return IsChatInfo; + } + /// /// The chunk response from the generation, which may be a partial generation. /// @@ -65,6 +91,19 @@ namespace Vectara #endif public bool IsGenerationChunk => GenerationChunk != null; + /// + /// + /// + public bool TryPickGenerationChunk( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.StreamGenerationChunk? value) + { + value = GenerationChunk; + return IsGenerationChunk; + } + /// /// The end of generation. There may still be more information such as the factual consistency score, but generation has stopped. /// @@ -82,6 +121,19 @@ namespace Vectara #endif public bool IsGenerationEnd => GenerationEnd != null; + /// + /// + /// + public bool TryPickGenerationEnd( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.StreamGenerationEnd? value) + { + value = GenerationEnd; + return IsGenerationEnd; + } + /// /// Event containing information on how the generation was accomplished. /// @@ -99,6 +151,19 @@ namespace Vectara #endif public bool IsGenerationInfo => GenerationInfo != null; + /// + /// + /// + public bool TryPickGenerationInfo( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.GenerationInfo? value) + { + value = GenerationInfo; + return IsGenerationInfo; + } + /// /// Event containing the factual consistency score. /// @@ -116,6 +181,19 @@ namespace Vectara #endif public bool IsFactualConsistencyScore => FactualConsistencyScore != null; + /// + /// + /// + public bool TryPickFactualConsistencyScore( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.FactualConsistencyScore? value) + { + value = FactualConsistencyScore; + return IsFactualConsistencyScore; + } + /// /// The end of a query response stream. /// @@ -133,6 +211,19 @@ namespace Vectara #endif public bool IsEnd => End != null; + /// + /// + /// + public bool TryPickEnd( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.StreamResponseEnd? value) + { + value = End; + return IsEnd; + } + /// /// Event signaling there was an error with the request. /// @@ -149,6 +240,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Error))] #endif public bool IsError => Error != null; + + /// + /// + /// + public bool TryPickError( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.StreamError? value) + { + value = Error; + return IsError; + } /// /// /// @@ -360,14 +464,14 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? searchResults = null, - global::System.Func? chatInfo = null, - global::System.Func? generationChunk = null, - global::System.Func? generationEnd = null, - global::System.Func? generationInfo = null, - global::System.Func? factualConsistencyScore = null, - global::System.Func? end = null, - global::System.Func? error = null, + global::System.Func? searchResults = null, + global::System.Func? chatInfo = null, + global::System.Func? generationChunk = null, + global::System.Func? generationEnd = null, + global::System.Func? generationInfo = null, + global::System.Func? factualConsistencyScore = null, + global::System.Func? end = null, + global::System.Func? error = null, bool validate = true) { if (validate) @@ -415,14 +519,74 @@ public bool Validate() /// /// public void Match( - global::System.Action? searchResults = null, - global::System.Action? chatInfo = null, - global::System.Action? generationChunk = null, - global::System.Action? generationEnd = null, - global::System.Action? generationInfo = null, - global::System.Action? factualConsistencyScore = null, - global::System.Action? end = null, - global::System.Action? error = null, + global::System.Action? searchResults = null, + + global::System.Action? chatInfo = null, + + global::System.Action? generationChunk = null, + + global::System.Action? generationEnd = null, + + global::System.Action? generationInfo = null, + + global::System.Action? factualConsistencyScore = null, + + global::System.Action? end = null, + + global::System.Action? error = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsSearchResults) + { + searchResults?.Invoke(SearchResults!); + } + else if (IsChatInfo) + { + chatInfo?.Invoke(ChatInfo!); + } + else if (IsGenerationChunk) + { + generationChunk?.Invoke(GenerationChunk!); + } + else if (IsGenerationEnd) + { + generationEnd?.Invoke(GenerationEnd!); + } + else if (IsGenerationInfo) + { + generationInfo?.Invoke(GenerationInfo!); + } + else if (IsFactualConsistencyScore) + { + factualConsistencyScore?.Invoke(FactualConsistencyScore!); + } + else if (IsEnd) + { + end?.Invoke(End!); + } + else if (IsError) + { + error?.Invoke(Error!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? searchResults = null, + global::System.Action? chatInfo = null, + global::System.Action? generationChunk = null, + global::System.Action? generationEnd = null, + global::System.Action? generationInfo = null, + global::System.Action? factualConsistencyScore = null, + global::System.Action? end = null, + global::System.Action? error = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.ChatTraceSpan.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ChatTraceSpan.g.cs index df6f0eb5..1b493b55 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.ChatTraceSpan.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.ChatTraceSpan.g.cs @@ -26,6 +26,19 @@ namespace Vectara #endif public bool IsAgentBase => AgentBase != null; + /// + /// + /// + public bool TryPickAgentBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.AgentTraceSpanBase? value) + { + value = AgentBase; + return IsAgentBase; + } + /// /// /// @@ -42,6 +55,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ChatTraceSpanVariant2))] #endif public bool IsChatTraceSpanVariant2 => ChatTraceSpanVariant2 != null; + + /// + /// + /// + public bool TryPickChatTraceSpanVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.ChatTraceSpanVariant2? value) + { + value = ChatTraceSpanVariant2; + return IsChatTraceSpanVariant2; + } /// /// /// @@ -118,8 +144,8 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? agentBase = null, - global::System.Func? chatTraceSpanVariant2 = null, + global::System.Func? agentBase = null, + global::System.Func? chatTraceSpanVariant2 = null, bool validate = true) { if (validate) @@ -143,8 +169,32 @@ public bool Validate() /// /// public void Match( - global::System.Action? agentBase = null, - global::System.Action? chatTraceSpanVariant2 = null, + global::System.Action? agentBase = null, + + global::System.Action? chatTraceSpanVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAgentBase) + { + agentBase?.Invoke(AgentBase!); + } + else if (IsChatTraceSpanVariant2) + { + chatTraceSpanVariant2?.Invoke(ChatTraceSpanVariant2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? agentBase = null, + global::System.Action? chatTraceSpanVariant2 = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.ChunkingStrategy.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ChunkingStrategy.g.cs index f24268da..a9f38284 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.ChunkingStrategy.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.ChunkingStrategy.g.cs @@ -31,6 +31,19 @@ namespace Vectara #endif public bool IsMaxCharsChunkingStrategy => MaxCharsChunkingStrategy != null; + /// + /// + /// + public bool TryPickMaxCharsChunkingStrategy( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.MaxCharsChunkingStrategy? value) + { + value = MaxCharsChunkingStrategy; + return IsMaxCharsChunkingStrategy; + } + /// /// Sets a chunking strategy that creates one chunk per sentence. This is the default strategy used when no chunking strategy is specified. /// @@ -47,6 +60,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(SentenceChunkingStrategy))] #endif public bool IsSentenceChunkingStrategy => SentenceChunkingStrategy != null; + + /// + /// + /// + public bool TryPickSentenceChunkingStrategy( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.SentenceChunkingStrategy? value) + { + value = SentenceChunkingStrategy; + return IsSentenceChunkingStrategy; + } /// /// /// @@ -126,8 +152,8 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? maxCharsChunkingStrategy = null, - global::System.Func? sentenceChunkingStrategy = null, + global::System.Func? maxCharsChunkingStrategy = null, + global::System.Func? sentenceChunkingStrategy = null, bool validate = true) { if (validate) @@ -151,8 +177,32 @@ public bool Validate() /// /// public void Match( - global::System.Action? maxCharsChunkingStrategy = null, - global::System.Action? sentenceChunkingStrategy = null, + global::System.Action? maxCharsChunkingStrategy = null, + + global::System.Action? sentenceChunkingStrategy = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsMaxCharsChunkingStrategy) + { + maxCharsChunkingStrategy?.Invoke(MaxCharsChunkingStrategy!); + } + else if (IsSentenceChunkingStrategy) + { + sentenceChunkingStrategy?.Invoke(SentenceChunkingStrategy!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? maxCharsChunkingStrategy = null, + global::System.Action? sentenceChunkingStrategy = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.CompactionEvent.g.cs b/src/libs/Vectara/Generated/Vectara.Models.CompactionEvent.g.cs index dfd32682..958e8a40 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.CompactionEvent.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.CompactionEvent.g.cs @@ -26,6 +26,19 @@ namespace Vectara #endif public bool IsAgentBase => AgentBase != null; + /// + /// + /// + public bool TryPickAgentBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.AgentEventBase? value) + { + value = AgentBase; + return IsAgentBase; + } + /// /// /// @@ -42,6 +55,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CompactionEventVariant2))] #endif public bool IsCompactionEventVariant2 => CompactionEventVariant2 != null; + + /// + /// + /// + public bool TryPickCompactionEventVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.CompactionEventVariant2? value) + { + value = CompactionEventVariant2; + return IsCompactionEventVariant2; + } /// /// /// @@ -118,8 +144,8 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? agentBase = null, - global::System.Func? compactionEventVariant2 = null, + global::System.Func? agentBase = null, + global::System.Func? compactionEventVariant2 = null, bool validate = true) { if (validate) @@ -143,8 +169,32 @@ public bool Validate() /// /// public void Match( - global::System.Action? agentBase = null, - global::System.Action? compactionEventVariant2 = null, + global::System.Action? agentBase = null, + + global::System.Action? compactionEventVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAgentBase) + { + agentBase?.Invoke(AgentBase!); + } + else if (IsCompactionEventVariant2) + { + compactionEventVariant2?.Invoke(CompactionEventVariant2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? agentBase = null, + global::System.Action? compactionEventVariant2 = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.CompactionStartedEvent.g.cs b/src/libs/Vectara/Generated/Vectara.Models.CompactionStartedEvent.g.cs index 52091156..105aab88 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.CompactionStartedEvent.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.CompactionStartedEvent.g.cs @@ -26,6 +26,19 @@ namespace Vectara #endif public bool IsAgentBase => AgentBase != null; + /// + /// + /// + public bool TryPickAgentBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.AgentEventBase? value) + { + value = AgentBase; + return IsAgentBase; + } + /// /// /// @@ -42,6 +55,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CompactionStartedEventVariant2))] #endif public bool IsCompactionStartedEventVariant2 => CompactionStartedEventVariant2 != null; + + /// + /// + /// + public bool TryPickCompactionStartedEventVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.CompactionStartedEventVariant2? value) + { + value = CompactionStartedEventVariant2; + return IsCompactionStartedEventVariant2; + } /// /// /// @@ -118,8 +144,8 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? agentBase = null, - global::System.Func? compactionStartedEventVariant2 = null, + global::System.Func? agentBase = null, + global::System.Func? compactionStartedEventVariant2 = null, bool validate = true) { if (validate) @@ -143,8 +169,32 @@ public bool Validate() /// /// public void Match( - global::System.Action? agentBase = null, - global::System.Action? compactionStartedEventVariant2 = null, + global::System.Action? agentBase = null, + + global::System.Action? compactionStartedEventVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAgentBase) + { + agentBase?.Invoke(AgentBase!); + } + else if (IsCompactionStartedEventVariant2) + { + compactionStartedEventVariant2?.Invoke(CompactionStartedEventVariant2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? agentBase = null, + global::System.Action? compactionStartedEventVariant2 = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.CompactionTraceSpan.g.cs b/src/libs/Vectara/Generated/Vectara.Models.CompactionTraceSpan.g.cs index 65b80597..cc2cb6c3 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.CompactionTraceSpan.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.CompactionTraceSpan.g.cs @@ -26,6 +26,19 @@ namespace Vectara #endif public bool IsAgentBase => AgentBase != null; + /// + /// + /// + public bool TryPickAgentBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.AgentTraceSpanBase? value) + { + value = AgentBase; + return IsAgentBase; + } + /// /// /// @@ -42,6 +55,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CompactionTraceSpanVariant2))] #endif public bool IsCompactionTraceSpanVariant2 => CompactionTraceSpanVariant2 != null; + + /// + /// + /// + public bool TryPickCompactionTraceSpanVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.CompactionTraceSpanVariant2? value) + { + value = CompactionTraceSpanVariant2; + return IsCompactionTraceSpanVariant2; + } /// /// /// @@ -118,8 +144,8 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? agentBase = null, - global::System.Func? compactionTraceSpanVariant2 = null, + global::System.Func? agentBase = null, + global::System.Func? compactionTraceSpanVariant2 = null, bool validate = true) { if (validate) @@ -143,8 +169,32 @@ public bool Validate() /// /// public void Match( - global::System.Action? agentBase = null, - global::System.Action? compactionTraceSpanVariant2 = null, + global::System.Action? agentBase = null, + + global::System.Action? compactionTraceSpanVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAgentBase) + { + agentBase?.Invoke(AgentBase!); + } + else if (IsCompactionTraceSpanVariant2) + { + compactionTraceSpanVariant2?.Invoke(CompactionTraceSpanVariant2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? agentBase = null, + global::System.Action? compactionTraceSpanVariant2 = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.ConnectorConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ConnectorConfiguration.g.cs index 8c94fc08..bddc84f0 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.ConnectorConfiguration.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.ConnectorConfiguration.g.cs @@ -30,6 +30,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Slack))] #endif public bool IsSlack => Slack != null; + + /// + /// + /// + public bool TryPickSlack( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.SlackConnectorConfiguration? value) + { + value = Slack; + return IsSlack; + } /// /// /// @@ -87,7 +100,7 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? slack = null, + global::System.Func? slack = null, bool validate = true) { if (validate) @@ -107,7 +120,25 @@ public bool Validate() /// /// public void Match( - global::System.Action? slack = null, + global::System.Action? slack = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsSlack) + { + slack?.Invoke(Slack!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? slack = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.ContextLimitExceededEvent.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ContextLimitExceededEvent.g.cs index 71448348..a1d1aa15 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.ContextLimitExceededEvent.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.ContextLimitExceededEvent.g.cs @@ -27,6 +27,19 @@ namespace Vectara #endif public bool IsAgentBase => AgentBase != null; + /// + /// + /// + public bool TryPickAgentBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.AgentEventBase? value) + { + value = AgentBase; + return IsAgentBase; + } + /// /// /// @@ -43,6 +56,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ContextLimitExceededEventVariant2))] #endif public bool IsContextLimitExceededEventVariant2 => ContextLimitExceededEventVariant2 != null; + + /// + /// + /// + public bool TryPickContextLimitExceededEventVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.ContextLimitExceededEventVariant2? value) + { + value = ContextLimitExceededEventVariant2; + return IsContextLimitExceededEventVariant2; + } /// /// /// @@ -119,8 +145,8 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? agentBase = null, - global::System.Func? contextLimitExceededEventVariant2 = null, + global::System.Func? agentBase = null, + global::System.Func? contextLimitExceededEventVariant2 = null, bool validate = true) { if (validate) @@ -144,8 +170,32 @@ public bool Validate() /// /// public void Match( - global::System.Action? agentBase = null, - global::System.Action? contextLimitExceededEventVariant2 = null, + global::System.Action? agentBase = null, + + global::System.Action? contextLimitExceededEventVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAgentBase) + { + agentBase?.Invoke(AgentBase!); + } + else if (IsContextLimitExceededEventVariant2) + { + contextLimitExceededEventVariant2?.Invoke(ContextLimitExceededEventVariant2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? agentBase = null, + global::System.Action? contextLimitExceededEventVariant2 = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.CorporaSearchTool.g.cs b/src/libs/Vectara/Generated/Vectara.Models.CorporaSearchTool.g.cs index ef7ba11c..6b53cb3c 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.CorporaSearchTool.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.CorporaSearchTool.g.cs @@ -26,6 +26,19 @@ namespace Vectara #endif public bool IsBase => Base != null; + /// + /// + /// + public bool TryPickBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.ToolBase? value) + { + value = Base; + return IsBase; + } + /// /// /// @@ -42,6 +55,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CorporaSearchToolVariant2))] #endif public bool IsCorporaSearchToolVariant2 => CorporaSearchToolVariant2 != null; + + /// + /// + /// + public bool TryPickCorporaSearchToolVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.CorporaSearchToolVariant2? value) + { + value = CorporaSearchToolVariant2; + return IsCorporaSearchToolVariant2; + } /// /// /// @@ -118,8 +144,8 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? @base = null, - global::System.Func? corporaSearchToolVariant2 = null, + global::System.Func? @base = null, + global::System.Func? corporaSearchToolVariant2 = null, bool validate = true) { if (validate) @@ -143,8 +169,32 @@ public bool Validate() /// /// public void Match( - global::System.Action? @base = null, - global::System.Action? corporaSearchToolVariant2 = null, + global::System.Action? @base = null, + + global::System.Action? corporaSearchToolVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsBase) + { + @base?.Invoke(Base!); + } + else if (IsCorporaSearchToolVariant2) + { + corporaSearchToolVariant2?.Invoke(CorporaSearchToolVariant2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? @base = null, + global::System.Action? corporaSearchToolVariant2 = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.CreateAppClientRequest.g.cs b/src/libs/Vectara/Generated/Vectara.Models.CreateAppClientRequest.g.cs index 02dae3f1..7d19f15e 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.CreateAppClientRequest.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.CreateAppClientRequest.g.cs @@ -30,6 +30,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ClientCredentials))] #endif public bool IsClientCredentials => ClientCredentials != null; + + /// + /// + /// + public bool TryPickClientCredentials( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.CreateClientCredentialsRequest? value) + { + value = ClientCredentials; + return IsClientCredentials; + } /// /// /// @@ -87,7 +100,7 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? clientCredentials = null, + global::System.Func? clientCredentials = null, bool validate = true) { if (validate) @@ -107,7 +120,25 @@ public bool Validate() /// /// public void Match( - global::System.Action? clientCredentials = null, + global::System.Action? clientCredentials = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsClientCredentials) + { + clientCredentials?.Invoke(ClientCredentials!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? clientCredentials = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.CreateCompactRequest.g.cs b/src/libs/Vectara/Generated/Vectara.Models.CreateCompactRequest.g.cs index 67228484..55264511 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.CreateCompactRequest.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.CreateCompactRequest.g.cs @@ -27,6 +27,19 @@ namespace Vectara #endif public bool IsInputBase => InputBase != null; + /// + /// + /// + public bool TryPickInputBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.CreateInputRequestBase? value) + { + value = InputBase; + return IsInputBase; + } + /// /// /// @@ -43,6 +56,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CreateCompactRequestVariant2))] #endif public bool IsCreateCompactRequestVariant2 => CreateCompactRequestVariant2 != null; + + /// + /// + /// + public bool TryPickCreateCompactRequestVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.CreateCompactRequestVariant2? value) + { + value = CreateCompactRequestVariant2; + return IsCreateCompactRequestVariant2; + } /// /// /// @@ -119,8 +145,8 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? inputBase = null, - global::System.Func? createCompactRequestVariant2 = null, + global::System.Func? inputBase = null, + global::System.Func? createCompactRequestVariant2 = null, bool validate = true) { if (validate) @@ -144,8 +170,32 @@ public bool Validate() /// /// public void Match( - global::System.Action? inputBase = null, - global::System.Action? createCompactRequestVariant2 = null, + global::System.Action? inputBase = null, + + global::System.Action? createCompactRequestVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsInputBase) + { + inputBase?.Invoke(InputBase!); + } + else if (IsCreateCompactRequestVariant2) + { + createCompactRequestVariant2?.Invoke(CreateCompactRequestVariant2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? inputBase = null, + global::System.Action? createCompactRequestVariant2 = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.CreateDocumentRequest.g.cs b/src/libs/Vectara/Generated/Vectara.Models.CreateDocumentRequest.g.cs index 7139371e..e8214f4c 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.CreateDocumentRequest.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.CreateDocumentRequest.g.cs @@ -33,6 +33,19 @@ namespace Vectara #endif public bool IsCore => Core != null; + /// + /// + /// + public bool TryPickCore( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.CoreDocument? value) + { + value = Core; + return IsCore; + } + /// /// A document with layout features. /// @@ -49,6 +62,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Structured))] #endif public bool IsStructured => Structured != null; + + /// + /// + /// + public bool TryPickStructured( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.StructuredDocument? value) + { + value = Structured; + return IsStructured; + } /// /// /// @@ -128,8 +154,8 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? core = null, - global::System.Func? structured = null, + global::System.Func? core = null, + global::System.Func? structured = null, bool validate = true) { if (validate) @@ -153,8 +179,32 @@ public bool Validate() /// /// public void Match( - global::System.Action? core = null, - global::System.Action? structured = null, + global::System.Action? core = null, + + global::System.Action? structured = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsCore) + { + core?.Invoke(Core!); + } + else if (IsStructured) + { + structured?.Invoke(Structured!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? core = null, + global::System.Action? structured = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.CreateEncoderRequest.g.cs b/src/libs/Vectara/Generated/Vectara.Models.CreateEncoderRequest.g.cs index 870eaa31..4a9ba666 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.CreateEncoderRequest.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.CreateEncoderRequest.g.cs @@ -30,6 +30,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(OpenaiCompatible))] #endif public bool IsOpenaiCompatible => OpenaiCompatible != null; + + /// + /// + /// + public bool TryPickOpenaiCompatible( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.CreateOpenAIEncoderRequest? value) + { + value = OpenaiCompatible; + return IsOpenaiCompatible; + } /// /// /// @@ -87,7 +100,7 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? openaiCompatible = null, + global::System.Func? openaiCompatible = null, bool validate = true) { if (validate) @@ -107,7 +120,25 @@ public bool Validate() /// /// public void Match( - global::System.Action? openaiCompatible = null, + global::System.Action? openaiCompatible = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsOpenaiCompatible) + { + openaiCompatible?.Invoke(OpenaiCompatible!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? openaiCompatible = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.CreateGenerationPresetRequest.g.cs b/src/libs/Vectara/Generated/Vectara.Models.CreateGenerationPresetRequest.g.cs index ed4df0f1..80863132 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.CreateGenerationPresetRequest.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.CreateGenerationPresetRequest.g.cs @@ -25,6 +25,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(GenerationPreset))] #endif public bool IsGenerationPreset => GenerationPreset != null; + + /// + /// + /// + public bool TryPickGenerationPreset( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.GenerationPreset? value) + { + value = GenerationPreset; + return IsGenerationPreset; + } /// /// /// @@ -69,7 +82,7 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? generationPreset = null, + global::System.Func? generationPreset = null, bool validate = true) { if (validate) @@ -89,7 +102,25 @@ public bool Validate() /// /// public void Match( - global::System.Action? generationPreset = null, + global::System.Action? generationPreset = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsGenerationPreset) + { + generationPreset?.Invoke(GenerationPreset!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? generationPreset = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.CreateInitialInstructionRequest.g.cs b/src/libs/Vectara/Generated/Vectara.Models.CreateInitialInstructionRequest.g.cs index b6b0d119..2720a088 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.CreateInitialInstructionRequest.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.CreateInitialInstructionRequest.g.cs @@ -26,6 +26,19 @@ namespace Vectara #endif public bool IsBase => Base != null; + /// + /// + /// + public bool TryPickBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.InstructionRequestBase? value) + { + value = Base; + return IsBase; + } + /// /// /// @@ -42,6 +55,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CreateInitialInstructionRequestVariant2))] #endif public bool IsCreateInitialInstructionRequestVariant2 => CreateInitialInstructionRequestVariant2 != null; + + /// + /// + /// + public bool TryPickCreateInitialInstructionRequestVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.CreateInitialInstructionRequestVariant2? value) + { + value = CreateInitialInstructionRequestVariant2; + return IsCreateInitialInstructionRequestVariant2; + } /// /// /// @@ -118,8 +144,8 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? @base = null, - global::System.Func? createInitialInstructionRequestVariant2 = null, + global::System.Func? @base = null, + global::System.Func? createInitialInstructionRequestVariant2 = null, bool validate = true) { if (validate) @@ -143,8 +169,32 @@ public bool Validate() /// /// public void Match( - global::System.Action? @base = null, - global::System.Action? createInitialInstructionRequestVariant2 = null, + global::System.Action? @base = null, + + global::System.Action? createInitialInstructionRequestVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsBase) + { + @base?.Invoke(Base!); + } + else if (IsCreateInitialInstructionRequestVariant2) + { + createInitialInstructionRequestVariant2?.Invoke(CreateInitialInstructionRequestVariant2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? @base = null, + global::System.Action? createInitialInstructionRequestVariant2 = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.CreateInputMessageRequest.g.cs b/src/libs/Vectara/Generated/Vectara.Models.CreateInputMessageRequest.g.cs index 0244dddb..7bb32c8e 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.CreateInputMessageRequest.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.CreateInputMessageRequest.g.cs @@ -26,6 +26,19 @@ namespace Vectara #endif public bool IsBase => Base != null; + /// + /// + /// + public bool TryPickBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.CreateInputRequestBase? value) + { + value = Base; + return IsBase; + } + /// /// /// @@ -42,6 +55,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CreateInputMessageRequestVariant2))] #endif public bool IsCreateInputMessageRequestVariant2 => CreateInputMessageRequestVariant2 != null; + + /// + /// + /// + public bool TryPickCreateInputMessageRequestVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.CreateInputMessageRequestVariant2? value) + { + value = CreateInputMessageRequestVariant2; + return IsCreateInputMessageRequestVariant2; + } /// /// /// @@ -118,8 +144,8 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? @base = null, - global::System.Func? createInputMessageRequestVariant2 = null, + global::System.Func? @base = null, + global::System.Func? createInputMessageRequestVariant2 = null, bool validate = true) { if (validate) @@ -143,8 +169,32 @@ public bool Validate() /// /// public void Match( - global::System.Action? @base = null, - global::System.Action? createInputMessageRequestVariant2 = null, + global::System.Action? @base = null, + + global::System.Action? createInputMessageRequestVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsBase) + { + @base?.Invoke(Base!); + } + else if (IsCreateInputMessageRequestVariant2) + { + createInputMessageRequestVariant2?.Invoke(CreateInputMessageRequestVariant2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? @base = null, + global::System.Action? createInputMessageRequestVariant2 = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.CreateInputRequest.g.cs b/src/libs/Vectara/Generated/Vectara.Models.CreateInputRequest.g.cs index 3c0eee8a..7bc08330 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.CreateInputRequest.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.CreateInputRequest.g.cs @@ -31,6 +31,19 @@ namespace Vectara #endif public bool IsInputMessage => InputMessage != null; + /// + /// + /// + public bool TryPickInputMessage( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.CreateInputMessageRequest? value) + { + value = InputMessage; + return IsInputMessage; + } + /// /// Cancels the current agent operation. /// @@ -48,6 +61,19 @@ namespace Vectara #endif public bool IsInterrupt => Interrupt != null; + /// + /// + /// + public bool TryPickInterrupt( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.CreateInterruptRequest? value) + { + value = Interrupt; + return IsInterrupt; + } + /// /// Requests compaction of the session history. Can be sent while the session is processing
/// (queued as a follow-up) or when idle. @@ -65,6 +91,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Compact))] #endif public bool IsCompact => Compact != null; + + /// + /// + /// + public bool TryPickCompact( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.CreateCompactRequest? value) + { + value = Compact; + return IsCompact; + } /// /// /// @@ -197,6 +236,36 @@ public bool Validate() ///
public void Match( global::System.Action? inputMessage = null, + + global::System.Action? interrupt = null, + + global::System.Action? compact = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsInputMessage) + { + inputMessage?.Invoke(InputMessage!); + } + else if (IsInterrupt) + { + interrupt?.Invoke(Interrupt!); + } + else if (IsCompact) + { + compact?.Invoke(Compact!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? inputMessage = null, global::System.Action? interrupt = null, global::System.Action? compact = null, bool validate = true) diff --git a/src/libs/Vectara/Generated/Vectara.Models.CreateInstructionRequest.g.cs b/src/libs/Vectara/Generated/Vectara.Models.CreateInstructionRequest.g.cs index 851989a6..6b0a043e 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.CreateInstructionRequest.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.CreateInstructionRequest.g.cs @@ -30,6 +30,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Initial))] #endif public bool IsInitial => Initial != null; + + /// + /// + /// + public bool TryPickInitial( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.CreateInitialInstructionRequest? value) + { + value = Initial; + return IsInitial; + } /// /// /// @@ -121,6 +134,24 @@ public void Match( } } + /// + /// + /// + public void Switch( + global::System.Action? initial = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsInitial) + { + initial?.Invoke(Initial!); + } + } + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.CreateInterruptRequest.g.cs b/src/libs/Vectara/Generated/Vectara.Models.CreateInterruptRequest.g.cs index 90c24405..c3e258ca 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.CreateInterruptRequest.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.CreateInterruptRequest.g.cs @@ -26,6 +26,19 @@ namespace Vectara #endif public bool IsInputBase => InputBase != null; + /// + /// + /// + public bool TryPickInputBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.CreateInputRequestBase? value) + { + value = InputBase; + return IsInputBase; + } + /// /// /// @@ -42,6 +55,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CreateInterruptRequestVariant2))] #endif public bool IsCreateInterruptRequestVariant2 => CreateInterruptRequestVariant2 != null; + + /// + /// + /// + public bool TryPickCreateInterruptRequestVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.CreateInterruptRequestVariant2? value) + { + value = CreateInterruptRequestVariant2; + return IsCreateInterruptRequestVariant2; + } /// /// /// @@ -118,8 +144,8 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? inputBase = null, - global::System.Func? createInterruptRequestVariant2 = null, + global::System.Func? inputBase = null, + global::System.Func? createInterruptRequestVariant2 = null, bool validate = true) { if (validate) @@ -143,8 +169,32 @@ public bool Validate() /// /// public void Match( - global::System.Action? inputBase = null, - global::System.Action? createInterruptRequestVariant2 = null, + global::System.Action? inputBase = null, + + global::System.Action? createInterruptRequestVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsInputBase) + { + inputBase?.Invoke(InputBase!); + } + else if (IsCreateInterruptRequestVariant2) + { + createInterruptRequestVariant2?.Invoke(CreateInterruptRequestVariant2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? inputBase = null, + global::System.Action? createInterruptRequestVariant2 = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.CreateLLMRequest.g.cs b/src/libs/Vectara/Generated/Vectara.Models.CreateLLMRequest.g.cs index 07087a6b..ca274e32 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.CreateLLMRequest.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.CreateLLMRequest.g.cs @@ -31,6 +31,19 @@ namespace Vectara #endif public bool IsOpenaiCompatible => OpenaiCompatible != null; + /// + /// + /// + public bool TryPickOpenaiCompatible( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.CreateOpenAILLMRequest? value) + { + value = OpenaiCompatible; + return IsOpenaiCompatible; + } + /// /// Request to create an OpenAI Responses API Large Language Model connection for reasoning models like o1, o3. /// @@ -48,6 +61,19 @@ namespace Vectara #endif public bool IsOpenaiResponses => OpenaiResponses != null; + /// + /// + /// + public bool TryPickOpenaiResponses( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.CreateOpenAIResponsesLLMRequest? value) + { + value = OpenaiResponses; + return IsOpenaiResponses; + } + /// /// Request to create a Vertex AI Large Language Model connection for Gemini models. /// @@ -65,6 +91,19 @@ namespace Vectara #endif public bool IsVertexAi => VertexAi != null; + /// + /// + /// + public bool TryPickVertexAi( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.CreateVertexAILLMRequest? value) + { + value = VertexAi; + return IsVertexAi; + } + /// /// Request to create an Anthropic Large Language Model connection for Claude models (direct API, Bedrock, or Vertex). /// @@ -81,6 +120,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Anthropic))] #endif public bool IsAnthropic => Anthropic != null; + + /// + /// + /// + public bool TryPickAnthropic( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.CreateAnthropicLLMRequest? value) + { + value = Anthropic; + return IsAnthropic; + } /// /// /// @@ -206,8 +258,8 @@ public bool Validate() public TResult? Match( global::System.Func? openaiCompatible = null, global::System.Func? openaiResponses = null, - global::System.Func? vertexAi = null, - global::System.Func? anthropic = null, + global::System.Func? vertexAi = null, + global::System.Func? anthropic = null, bool validate = true) { if (validate) @@ -240,9 +292,45 @@ public bool Validate() /// public void Match( global::System.Action? openaiCompatible = null, + + global::System.Action? openaiResponses = null, + + global::System.Action? vertexAi = null, + + global::System.Action? anthropic = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsOpenaiCompatible) + { + openaiCompatible?.Invoke(OpenaiCompatible!); + } + else if (IsOpenaiResponses) + { + openaiResponses?.Invoke(OpenaiResponses!); + } + else if (IsVertexAi) + { + vertexAi?.Invoke(VertexAi!); + } + else if (IsAnthropic) + { + anthropic?.Invoke(Anthropic!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? openaiCompatible = null, global::System.Action? openaiResponses = null, - global::System.Action? vertexAi = null, - global::System.Action? anthropic = null, + global::System.Action? vertexAi = null, + global::System.Action? anthropic = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.CreateOpenAILLMRequest.g.cs b/src/libs/Vectara/Generated/Vectara.Models.CreateOpenAILLMRequest.g.cs index a5e3276e..b6a23752 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.CreateOpenAILLMRequest.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.CreateOpenAILLMRequest.g.cs @@ -26,6 +26,19 @@ namespace Vectara #endif public bool IsBase => Base != null; + /// + /// + /// + public bool TryPickBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.OpenAILLMRequestBase? value) + { + value = Base; + return IsBase; + } + /// /// /// @@ -42,6 +55,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CreateOpenAILLMRequestVariant2))] #endif public bool IsCreateOpenAILLMRequestVariant2 => CreateOpenAILLMRequestVariant2 != null; + + /// + /// + /// + public bool TryPickCreateOpenAILLMRequestVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.CreateOpenAILLMRequestVariant2? value) + { + value = CreateOpenAILLMRequestVariant2; + return IsCreateOpenAILLMRequestVariant2; + } /// /// /// @@ -118,8 +144,8 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? @base = null, - global::System.Func? createOpenAILLMRequestVariant2 = null, + global::System.Func? @base = null, + global::System.Func? createOpenAILLMRequestVariant2 = null, bool validate = true) { if (validate) @@ -143,8 +169,32 @@ public bool Validate() /// /// public void Match( - global::System.Action? @base = null, - global::System.Action? createOpenAILLMRequestVariant2 = null, + global::System.Action? @base = null, + + global::System.Action? createOpenAILLMRequestVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsBase) + { + @base?.Invoke(Base!); + } + else if (IsCreateOpenAILLMRequestVariant2) + { + createOpenAILLMRequestVariant2?.Invoke(CreateOpenAILLMRequestVariant2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? @base = null, + global::System.Action? createOpenAILLMRequestVariant2 = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.CreateOpenAIResponsesLLMRequest.g.cs b/src/libs/Vectara/Generated/Vectara.Models.CreateOpenAIResponsesLLMRequest.g.cs index 1da4bb1a..5b43d770 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.CreateOpenAIResponsesLLMRequest.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.CreateOpenAIResponsesLLMRequest.g.cs @@ -26,6 +26,19 @@ namespace Vectara #endif public bool IsBase => Base != null; + /// + /// + /// + public bool TryPickBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.OpenAILLMRequestBase? value) + { + value = Base; + return IsBase; + } + /// /// /// @@ -42,6 +55,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CreateOpenAIResponsesLLMRequestVariant2))] #endif public bool IsCreateOpenAIResponsesLLMRequestVariant2 => CreateOpenAIResponsesLLMRequestVariant2 != null; + + /// + /// + /// + public bool TryPickCreateOpenAIResponsesLLMRequestVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.CreateOpenAIResponsesLLMRequestVariant2? value) + { + value = CreateOpenAIResponsesLLMRequestVariant2; + return IsCreateOpenAIResponsesLLMRequestVariant2; + } /// /// /// @@ -118,8 +144,8 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? @base = null, - global::System.Func? createOpenAIResponsesLLMRequestVariant2 = null, + global::System.Func? @base = null, + global::System.Func? createOpenAIResponsesLLMRequestVariant2 = null, bool validate = true) { if (validate) @@ -143,8 +169,32 @@ public bool Validate() /// /// public void Match( - global::System.Action? @base = null, - global::System.Action? createOpenAIResponsesLLMRequestVariant2 = null, + global::System.Action? @base = null, + + global::System.Action? createOpenAIResponsesLLMRequestVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsBase) + { + @base?.Invoke(Base!); + } + else if (IsCreateOpenAIResponsesLLMRequestVariant2) + { + createOpenAIResponsesLLMRequestVariant2?.Invoke(CreateOpenAIResponsesLLMRequestVariant2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? @base = null, + global::System.Action? createOpenAIResponsesLLMRequestVariant2 = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.CreateToolRequest.g.cs b/src/libs/Vectara/Generated/Vectara.Models.CreateToolRequest.g.cs index 62c9c584..f471fcc1 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.CreateToolRequest.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.CreateToolRequest.g.cs @@ -31,6 +31,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Lambda))] #endif public bool IsLambda => Lambda != null; + + /// + /// + /// + public bool TryPickLambda( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.CreateLambdaToolRequest? value) + { + value = Lambda; + return IsLambda; + } /// /// /// @@ -88,7 +101,7 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? lambda = null, + global::System.Func? lambda = null, bool validate = true) { if (validate) @@ -108,7 +121,25 @@ public bool Validate() /// /// public void Match( - global::System.Action? lambda = null, + global::System.Action? lambda = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsLambda) + { + lambda?.Invoke(Lambda!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? lambda = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.DocumentConversionTool.g.cs b/src/libs/Vectara/Generated/Vectara.Models.DocumentConversionTool.g.cs index 1648b85b..076c558e 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.DocumentConversionTool.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.DocumentConversionTool.g.cs @@ -26,6 +26,19 @@ namespace Vectara #endif public bool IsBase => Base != null; + /// + /// + /// + public bool TryPickBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.ToolBase? value) + { + value = Base; + return IsBase; + } + /// /// /// @@ -42,6 +55,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(DocumentConversionToolVariant2))] #endif public bool IsDocumentConversionToolVariant2 => DocumentConversionToolVariant2 != null; + + /// + /// + /// + public bool TryPickDocumentConversionToolVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.DocumentConversionToolVariant2? value) + { + value = DocumentConversionToolVariant2; + return IsDocumentConversionToolVariant2; + } /// /// /// @@ -118,8 +144,8 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? @base = null, - global::System.Func? documentConversionToolVariant2 = null, + global::System.Func? @base = null, + global::System.Func? documentConversionToolVariant2 = null, bool validate = true) { if (validate) @@ -143,8 +169,32 @@ public bool Validate() /// /// public void Match( - global::System.Action? @base = null, - global::System.Action? documentConversionToolVariant2 = null, + global::System.Action? @base = null, + + global::System.Action? documentConversionToolVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsBase) + { + @base?.Invoke(Base!); + } + else if (IsDocumentConversionToolVariant2) + { + documentConversionToolVariant2?.Invoke(DocumentConversionToolVariant2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? @base = null, + global::System.Action? documentConversionToolVariant2 = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.DynamicVectaraTool.g.cs b/src/libs/Vectara/Generated/Vectara.Models.DynamicVectaraTool.g.cs index c73568b9..b2d990a4 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.DynamicVectaraTool.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.DynamicVectaraTool.g.cs @@ -26,6 +26,19 @@ namespace Vectara #endif public bool IsBase => Base != null; + /// + /// + /// + public bool TryPickBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.ToolBase? value) + { + value = Base; + return IsBase; + } + /// /// /// @@ -42,6 +55,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(DynamicVectaraToolVariant2))] #endif public bool IsDynamicVectaraToolVariant2 => DynamicVectaraToolVariant2 != null; + + /// + /// + /// + public bool TryPickDynamicVectaraToolVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.DynamicVectaraToolVariant2? value) + { + value = DynamicVectaraToolVariant2; + return IsDynamicVectaraToolVariant2; + } /// /// /// @@ -118,8 +144,8 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? @base = null, - global::System.Func? dynamicVectaraToolVariant2 = null, + global::System.Func? @base = null, + global::System.Func? dynamicVectaraToolVariant2 = null, bool validate = true) { if (validate) @@ -143,8 +169,32 @@ public bool Validate() /// /// public void Match( - global::System.Action? @base = null, - global::System.Action? dynamicVectaraToolVariant2 = null, + global::System.Action? @base = null, + + global::System.Action? dynamicVectaraToolVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsBase) + { + @base?.Invoke(Base!); + } + else if (IsDynamicVectaraToolVariant2) + { + dynamicVectaraToolVariant2?.Invoke(DynamicVectaraToolVariant2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? @base = null, + global::System.Action? dynamicVectaraToolVariant2 = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.ExecuteToolTraceSpan.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ExecuteToolTraceSpan.g.cs index 35c8b3b1..ddeba799 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.ExecuteToolTraceSpan.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.ExecuteToolTraceSpan.g.cs @@ -26,6 +26,19 @@ namespace Vectara #endif public bool IsAgentBase => AgentBase != null; + /// + /// + /// + public bool TryPickAgentBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.AgentTraceSpanBase? value) + { + value = AgentBase; + return IsAgentBase; + } + /// /// /// @@ -42,6 +55,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ExecuteToolTraceSpanVariant2))] #endif public bool IsExecuteToolTraceSpanVariant2 => ExecuteToolTraceSpanVariant2 != null; + + /// + /// + /// + public bool TryPickExecuteToolTraceSpanVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.ExecuteToolTraceSpanVariant2? value) + { + value = ExecuteToolTraceSpanVariant2; + return IsExecuteToolTraceSpanVariant2; + } /// /// /// @@ -118,8 +144,8 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? agentBase = null, - global::System.Func? executeToolTraceSpanVariant2 = null, + global::System.Func? agentBase = null, + global::System.Func? executeToolTraceSpanVariant2 = null, bool validate = true) { if (validate) @@ -143,8 +169,32 @@ public bool Validate() /// /// public void Match( - global::System.Action? agentBase = null, - global::System.Action? executeToolTraceSpanVariant2 = null, + global::System.Action? agentBase = null, + + global::System.Action? executeToolTraceSpanVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAgentBase) + { + agentBase?.Invoke(AgentBase!); + } + else if (IsExecuteToolTraceSpanVariant2) + { + executeToolTraceSpanVariant2?.Invoke(ExecuteToolTraceSpanVariant2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? agentBase = null, + global::System.Action? executeToolTraceSpanVariant2 = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.GetDocumentTextTool.g.cs b/src/libs/Vectara/Generated/Vectara.Models.GetDocumentTextTool.g.cs index 086087d7..c322411e 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.GetDocumentTextTool.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.GetDocumentTextTool.g.cs @@ -26,6 +26,19 @@ namespace Vectara #endif public bool IsBase => Base != null; + /// + /// + /// + public bool TryPickBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.ToolBase? value) + { + value = Base; + return IsBase; + } + /// /// /// @@ -42,6 +55,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(GetDocumentTextToolVariant2))] #endif public bool IsGetDocumentTextToolVariant2 => GetDocumentTextToolVariant2 != null; + + /// + /// + /// + public bool TryPickGetDocumentTextToolVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.GetDocumentTextToolVariant2? value) + { + value = GetDocumentTextToolVariant2; + return IsGetDocumentTextToolVariant2; + } /// /// /// @@ -118,8 +144,8 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? @base = null, - global::System.Func? getDocumentTextToolVariant2 = null, + global::System.Func? @base = null, + global::System.Func? getDocumentTextToolVariant2 = null, bool validate = true) { if (validate) @@ -143,8 +169,32 @@ public bool Validate() /// /// public void Match( - global::System.Action? @base = null, - global::System.Action? getDocumentTextToolVariant2 = null, + global::System.Action? @base = null, + + global::System.Action? getDocumentTextToolVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsBase) + { + @base?.Invoke(Base!); + } + else if (IsGetDocumentTextToolVariant2) + { + getDocumentTextToolVariant2?.Invoke(GetDocumentTextToolVariant2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? @base = null, + global::System.Action? getDocumentTextToolVariant2 = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.GuardrailTraceSpan.g.cs b/src/libs/Vectara/Generated/Vectara.Models.GuardrailTraceSpan.g.cs index 6fad6550..9b6b37b8 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.GuardrailTraceSpan.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.GuardrailTraceSpan.g.cs @@ -26,6 +26,19 @@ namespace Vectara #endif public bool IsAgentBase => AgentBase != null; + /// + /// + /// + public bool TryPickAgentBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.AgentTraceSpanBase? value) + { + value = AgentBase; + return IsAgentBase; + } + /// /// /// @@ -42,6 +55,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(GuardrailTraceSpanVariant2))] #endif public bool IsGuardrailTraceSpanVariant2 => GuardrailTraceSpanVariant2 != null; + + /// + /// + /// + public bool TryPickGuardrailTraceSpanVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.GuardrailTraceSpanVariant2? value) + { + value = GuardrailTraceSpanVariant2; + return IsGuardrailTraceSpanVariant2; + } /// /// /// @@ -118,8 +144,8 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? agentBase = null, - global::System.Func? guardrailTraceSpanVariant2 = null, + global::System.Func? agentBase = null, + global::System.Func? guardrailTraceSpanVariant2 = null, bool validate = true) { if (validate) @@ -143,8 +169,32 @@ public bool Validate() /// /// public void Match( - global::System.Action? agentBase = null, - global::System.Action? guardrailTraceSpanVariant2 = null, + global::System.Action? agentBase = null, + + global::System.Action? guardrailTraceSpanVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAgentBase) + { + agentBase?.Invoke(AgentBase!); + } + else if (IsGuardrailTraceSpanVariant2) + { + guardrailTraceSpanVariant2?.Invoke(GuardrailTraceSpanVariant2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? agentBase = null, + global::System.Action? guardrailTraceSpanVariant2 = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.ImageReadEvent.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ImageReadEvent.g.cs index de5e8efc..dd6f79c6 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.ImageReadEvent.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.ImageReadEvent.g.cs @@ -26,6 +26,19 @@ namespace Vectara #endif public bool IsAgentBase => AgentBase != null; + /// + /// + /// + public bool TryPickAgentBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.AgentEventBase? value) + { + value = AgentBase; + return IsAgentBase; + } + /// /// /// @@ -42,6 +55,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ImageReadEventVariant2))] #endif public bool IsImageReadEventVariant2 => ImageReadEventVariant2 != null; + + /// + /// + /// + public bool TryPickImageReadEventVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.ImageReadEventVariant2? value) + { + value = ImageReadEventVariant2; + return IsImageReadEventVariant2; + } /// /// /// @@ -118,8 +144,8 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? agentBase = null, - global::System.Func? imageReadEventVariant2 = null, + global::System.Func? agentBase = null, + global::System.Func? imageReadEventVariant2 = null, bool validate = true) { if (validate) @@ -143,8 +169,32 @@ public bool Validate() /// /// public void Match( - global::System.Action? agentBase = null, - global::System.Action? imageReadEventVariant2 = null, + global::System.Action? agentBase = null, + + global::System.Action? imageReadEventVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAgentBase) + { + agentBase?.Invoke(AgentBase!); + } + else if (IsImageReadEventVariant2) + { + imageReadEventVariant2?.Invoke(ImageReadEventVariant2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? agentBase = null, + global::System.Action? imageReadEventVariant2 = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.ImageReadTool.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ImageReadTool.g.cs index e5ca38a1..faf0af88 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.ImageReadTool.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.ImageReadTool.g.cs @@ -26,6 +26,19 @@ namespace Vectara #endif public bool IsBase => Base != null; + /// + /// + /// + public bool TryPickBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.ToolBase? value) + { + value = Base; + return IsBase; + } + /// /// /// @@ -42,6 +55,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ImageReadToolVariant2))] #endif public bool IsImageReadToolVariant2 => ImageReadToolVariant2 != null; + + /// + /// + /// + public bool TryPickImageReadToolVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.ImageReadToolVariant2? value) + { + value = ImageReadToolVariant2; + return IsImageReadToolVariant2; + } /// /// /// @@ -118,8 +144,8 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? @base = null, - global::System.Func? imageReadToolVariant2 = null, + global::System.Func? @base = null, + global::System.Func? imageReadToolVariant2 = null, bool validate = true) { if (validate) @@ -143,8 +169,32 @@ public bool Validate() /// /// public void Match( - global::System.Action? @base = null, - global::System.Action? imageReadToolVariant2 = null, + global::System.Action? @base = null, + + global::System.Action? imageReadToolVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsBase) + { + @base?.Invoke(Base!); + } + else if (IsImageReadToolVariant2) + { + imageReadToolVariant2?.Invoke(ImageReadToolVariant2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? @base = null, + global::System.Action? imageReadToolVariant2 = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.ImageReadTraceSpan.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ImageReadTraceSpan.g.cs index 3f708e70..ff9d2108 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.ImageReadTraceSpan.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.ImageReadTraceSpan.g.cs @@ -26,6 +26,19 @@ namespace Vectara #endif public bool IsAgentBase => AgentBase != null; + /// + /// + /// + public bool TryPickAgentBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.AgentTraceSpanBase? value) + { + value = AgentBase; + return IsAgentBase; + } + /// /// /// @@ -42,6 +55,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ImageReadTraceSpanVariant2))] #endif public bool IsImageReadTraceSpanVariant2 => ImageReadTraceSpanVariant2 != null; + + /// + /// + /// + public bool TryPickImageReadTraceSpanVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.ImageReadTraceSpanVariant2? value) + { + value = ImageReadTraceSpanVariant2; + return IsImageReadTraceSpanVariant2; + } /// /// /// @@ -118,8 +144,8 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? agentBase = null, - global::System.Func? imageReadTraceSpanVariant2 = null, + global::System.Func? agentBase = null, + global::System.Func? imageReadTraceSpanVariant2 = null, bool validate = true) { if (validate) @@ -143,8 +169,32 @@ public bool Validate() /// /// public void Match( - global::System.Action? agentBase = null, - global::System.Action? imageReadTraceSpanVariant2 = null, + global::System.Action? agentBase = null, + + global::System.Action? imageReadTraceSpanVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAgentBase) + { + agentBase?.Invoke(AgentBase!); + } + else if (IsImageReadTraceSpanVariant2) + { + imageReadTraceSpanVariant2?.Invoke(ImageReadTraceSpanVariant2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? agentBase = null, + global::System.Action? imageReadTraceSpanVariant2 = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineArtifactCreateToolConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineArtifactCreateToolConfiguration.g.cs index 8d086c3c..4a2811ca 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InlineArtifactCreateToolConfiguration.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineArtifactCreateToolConfiguration.g.cs @@ -26,6 +26,19 @@ namespace Vectara #endif public bool IsAgentBase => AgentBase != null; + /// + /// + /// + public bool TryPickAgentBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.AgentToolConfigurationBase? value) + { + value = AgentBase; + return IsAgentBase; + } + /// /// /// @@ -42,6 +55,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(InlineArtifactCreateToolConfigurationVariant2))] #endif public bool IsInlineArtifactCreateToolConfigurationVariant2 => InlineArtifactCreateToolConfigurationVariant2 != null; + + /// + /// + /// + public bool TryPickInlineArtifactCreateToolConfigurationVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.InlineArtifactCreateToolConfigurationVariant2? value) + { + value = InlineArtifactCreateToolConfigurationVariant2; + return IsInlineArtifactCreateToolConfigurationVariant2; + } /// /// /// @@ -118,8 +144,8 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? agentBase = null, - global::System.Func? inlineArtifactCreateToolConfigurationVariant2 = null, + global::System.Func? agentBase = null, + global::System.Func? inlineArtifactCreateToolConfigurationVariant2 = null, bool validate = true) { if (validate) @@ -143,8 +169,32 @@ public bool Validate() /// /// public void Match( - global::System.Action? agentBase = null, - global::System.Action? inlineArtifactCreateToolConfigurationVariant2 = null, + global::System.Action? agentBase = null, + + global::System.Action? inlineArtifactCreateToolConfigurationVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAgentBase) + { + agentBase?.Invoke(AgentBase!); + } + else if (IsInlineArtifactCreateToolConfigurationVariant2) + { + inlineArtifactCreateToolConfigurationVariant2?.Invoke(InlineArtifactCreateToolConfigurationVariant2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? agentBase = null, + global::System.Action? inlineArtifactCreateToolConfigurationVariant2 = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineArtifactGrepToolConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineArtifactGrepToolConfiguration.g.cs index 6c533a9f..15b18d35 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InlineArtifactGrepToolConfiguration.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineArtifactGrepToolConfiguration.g.cs @@ -26,6 +26,19 @@ namespace Vectara #endif public bool IsAgentBase => AgentBase != null; + /// + /// + /// + public bool TryPickAgentBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.AgentToolConfigurationBase? value) + { + value = AgentBase; + return IsAgentBase; + } + /// /// /// @@ -42,6 +55,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(InlineArtifactGrepToolConfigurationVariant2))] #endif public bool IsInlineArtifactGrepToolConfigurationVariant2 => InlineArtifactGrepToolConfigurationVariant2 != null; + + /// + /// + /// + public bool TryPickInlineArtifactGrepToolConfigurationVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.InlineArtifactGrepToolConfigurationVariant2? value) + { + value = InlineArtifactGrepToolConfigurationVariant2; + return IsInlineArtifactGrepToolConfigurationVariant2; + } /// /// /// @@ -118,8 +144,8 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? agentBase = null, - global::System.Func? inlineArtifactGrepToolConfigurationVariant2 = null, + global::System.Func? agentBase = null, + global::System.Func? inlineArtifactGrepToolConfigurationVariant2 = null, bool validate = true) { if (validate) @@ -143,8 +169,32 @@ public bool Validate() /// /// public void Match( - global::System.Action? agentBase = null, - global::System.Action? inlineArtifactGrepToolConfigurationVariant2 = null, + global::System.Action? agentBase = null, + + global::System.Action? inlineArtifactGrepToolConfigurationVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAgentBase) + { + agentBase?.Invoke(AgentBase!); + } + else if (IsInlineArtifactGrepToolConfigurationVariant2) + { + inlineArtifactGrepToolConfigurationVariant2?.Invoke(InlineArtifactGrepToolConfigurationVariant2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? agentBase = null, + global::System.Action? inlineArtifactGrepToolConfigurationVariant2 = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineArtifactReadToolConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineArtifactReadToolConfiguration.g.cs index efb5da94..ada647d2 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InlineArtifactReadToolConfiguration.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineArtifactReadToolConfiguration.g.cs @@ -26,6 +26,19 @@ namespace Vectara #endif public bool IsAgentBase => AgentBase != null; + /// + /// + /// + public bool TryPickAgentBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.AgentToolConfigurationBase? value) + { + value = AgentBase; + return IsAgentBase; + } + /// /// /// @@ -42,6 +55,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(InlineArtifactReadToolConfigurationVariant2))] #endif public bool IsInlineArtifactReadToolConfigurationVariant2 => InlineArtifactReadToolConfigurationVariant2 != null; + + /// + /// + /// + public bool TryPickInlineArtifactReadToolConfigurationVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.InlineArtifactReadToolConfigurationVariant2? value) + { + value = InlineArtifactReadToolConfigurationVariant2; + return IsInlineArtifactReadToolConfigurationVariant2; + } /// /// /// @@ -118,8 +144,8 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? agentBase = null, - global::System.Func? inlineArtifactReadToolConfigurationVariant2 = null, + global::System.Func? agentBase = null, + global::System.Func? inlineArtifactReadToolConfigurationVariant2 = null, bool validate = true) { if (validate) @@ -143,8 +169,32 @@ public bool Validate() /// /// public void Match( - global::System.Action? agentBase = null, - global::System.Action? inlineArtifactReadToolConfigurationVariant2 = null, + global::System.Action? agentBase = null, + + global::System.Action? inlineArtifactReadToolConfigurationVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAgentBase) + { + agentBase?.Invoke(AgentBase!); + } + else if (IsInlineArtifactReadToolConfigurationVariant2) + { + inlineArtifactReadToolConfigurationVariant2?.Invoke(InlineArtifactReadToolConfigurationVariant2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? agentBase = null, + global::System.Action? inlineArtifactReadToolConfigurationVariant2 = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineCorporaSearchToolConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineCorporaSearchToolConfiguration.g.cs index ad2a8762..1b76ef33 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InlineCorporaSearchToolConfiguration.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineCorporaSearchToolConfiguration.g.cs @@ -26,6 +26,19 @@ namespace Vectara #endif public bool IsAgentBase => AgentBase != null; + /// + /// + /// + public bool TryPickAgentBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.AgentToolConfigurationBase? value) + { + value = AgentBase; + return IsAgentBase; + } + /// /// /// @@ -42,6 +55,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(InlineCorporaSearchToolConfigurationVariant2))] #endif public bool IsInlineCorporaSearchToolConfigurationVariant2 => InlineCorporaSearchToolConfigurationVariant2 != null; + + /// + /// + /// + public bool TryPickInlineCorporaSearchToolConfigurationVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.InlineCorporaSearchToolConfigurationVariant2? value) + { + value = InlineCorporaSearchToolConfigurationVariant2; + return IsInlineCorporaSearchToolConfigurationVariant2; + } /// /// /// @@ -118,8 +144,8 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? agentBase = null, - global::System.Func? inlineCorporaSearchToolConfigurationVariant2 = null, + global::System.Func? agentBase = null, + global::System.Func? inlineCorporaSearchToolConfigurationVariant2 = null, bool validate = true) { if (validate) @@ -143,8 +169,32 @@ public bool Validate() /// /// public void Match( - global::System.Action? agentBase = null, - global::System.Action? inlineCorporaSearchToolConfigurationVariant2 = null, + global::System.Action? agentBase = null, + + global::System.Action? inlineCorporaSearchToolConfigurationVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAgentBase) + { + agentBase?.Invoke(AgentBase!); + } + else if (IsInlineCorporaSearchToolConfigurationVariant2) + { + inlineCorporaSearchToolConfigurationVariant2?.Invoke(InlineCorporaSearchToolConfigurationVariant2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? agentBase = null, + global::System.Action? inlineCorporaSearchToolConfigurationVariant2 = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineDocumentConversionToolConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineDocumentConversionToolConfiguration.g.cs index 9523c96e..a778566e 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InlineDocumentConversionToolConfiguration.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineDocumentConversionToolConfiguration.g.cs @@ -26,6 +26,19 @@ namespace Vectara #endif public bool IsAgentBase => AgentBase != null; + /// + /// + /// + public bool TryPickAgentBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.AgentToolConfigurationBase? value) + { + value = AgentBase; + return IsAgentBase; + } + /// /// /// @@ -42,6 +55,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(InlineDocumentConversionToolConfigurationVariant2))] #endif public bool IsInlineDocumentConversionToolConfigurationVariant2 => InlineDocumentConversionToolConfigurationVariant2 != null; + + /// + /// + /// + public bool TryPickInlineDocumentConversionToolConfigurationVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.InlineDocumentConversionToolConfigurationVariant2? value) + { + value = InlineDocumentConversionToolConfigurationVariant2; + return IsInlineDocumentConversionToolConfigurationVariant2; + } /// /// /// @@ -118,8 +144,8 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? agentBase = null, - global::System.Func? inlineDocumentConversionToolConfigurationVariant2 = null, + global::System.Func? agentBase = null, + global::System.Func? inlineDocumentConversionToolConfigurationVariant2 = null, bool validate = true) { if (validate) @@ -143,8 +169,32 @@ public bool Validate() /// /// public void Match( - global::System.Action? agentBase = null, - global::System.Action? inlineDocumentConversionToolConfigurationVariant2 = null, + global::System.Action? agentBase = null, + + global::System.Action? inlineDocumentConversionToolConfigurationVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAgentBase) + { + agentBase?.Invoke(AgentBase!); + } + else if (IsInlineDocumentConversionToolConfigurationVariant2) + { + inlineDocumentConversionToolConfigurationVariant2?.Invoke(InlineDocumentConversionToolConfigurationVariant2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? agentBase = null, + global::System.Action? inlineDocumentConversionToolConfigurationVariant2 = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineDynamicVectaraToolConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineDynamicVectaraToolConfiguration.g.cs index 1dda9a32..cac2c507 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InlineDynamicVectaraToolConfiguration.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineDynamicVectaraToolConfiguration.g.cs @@ -26,6 +26,19 @@ namespace Vectara #endif public bool IsAgentBase => AgentBase != null; + /// + /// + /// + public bool TryPickAgentBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.AgentToolConfigurationBase? value) + { + value = AgentBase; + return IsAgentBase; + } + /// /// /// @@ -42,6 +55,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(InlineDynamicVectaraToolConfigurationVariant2))] #endif public bool IsInlineDynamicVectaraToolConfigurationVariant2 => InlineDynamicVectaraToolConfigurationVariant2 != null; + + /// + /// + /// + public bool TryPickInlineDynamicVectaraToolConfigurationVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.InlineDynamicVectaraToolConfigurationVariant2? value) + { + value = InlineDynamicVectaraToolConfigurationVariant2; + return IsInlineDynamicVectaraToolConfigurationVariant2; + } /// /// /// @@ -118,8 +144,8 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? agentBase = null, - global::System.Func? inlineDynamicVectaraToolConfigurationVariant2 = null, + global::System.Func? agentBase = null, + global::System.Func? inlineDynamicVectaraToolConfigurationVariant2 = null, bool validate = true) { if (validate) @@ -143,8 +169,32 @@ public bool Validate() /// /// public void Match( - global::System.Action? agentBase = null, - global::System.Action? inlineDynamicVectaraToolConfigurationVariant2 = null, + global::System.Action? agentBase = null, + + global::System.Action? inlineDynamicVectaraToolConfigurationVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAgentBase) + { + agentBase?.Invoke(AgentBase!); + } + else if (IsInlineDynamicVectaraToolConfigurationVariant2) + { + inlineDynamicVectaraToolConfigurationVariant2?.Invoke(InlineDynamicVectaraToolConfigurationVariant2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? agentBase = null, + global::System.Action? inlineDynamicVectaraToolConfigurationVariant2 = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineGetDocumentTextToolConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineGetDocumentTextToolConfiguration.g.cs index 3e9496e7..a743313b 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InlineGetDocumentTextToolConfiguration.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineGetDocumentTextToolConfiguration.g.cs @@ -26,6 +26,19 @@ namespace Vectara #endif public bool IsAgentBase => AgentBase != null; + /// + /// + /// + public bool TryPickAgentBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.AgentToolConfigurationBase? value) + { + value = AgentBase; + return IsAgentBase; + } + /// /// /// @@ -42,6 +55,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(InlineGetDocumentTextToolConfigurationVariant2))] #endif public bool IsInlineGetDocumentTextToolConfigurationVariant2 => InlineGetDocumentTextToolConfigurationVariant2 != null; + + /// + /// + /// + public bool TryPickInlineGetDocumentTextToolConfigurationVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.InlineGetDocumentTextToolConfigurationVariant2? value) + { + value = InlineGetDocumentTextToolConfigurationVariant2; + return IsInlineGetDocumentTextToolConfigurationVariant2; + } /// /// /// @@ -118,8 +144,8 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? agentBase = null, - global::System.Func? inlineGetDocumentTextToolConfigurationVariant2 = null, + global::System.Func? agentBase = null, + global::System.Func? inlineGetDocumentTextToolConfigurationVariant2 = null, bool validate = true) { if (validate) @@ -143,8 +169,32 @@ public bool Validate() /// /// public void Match( - global::System.Action? agentBase = null, - global::System.Action? inlineGetDocumentTextToolConfigurationVariant2 = null, + global::System.Action? agentBase = null, + + global::System.Action? inlineGetDocumentTextToolConfigurationVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAgentBase) + { + agentBase?.Invoke(AgentBase!); + } + else if (IsInlineGetDocumentTextToolConfigurationVariant2) + { + inlineGetDocumentTextToolConfigurationVariant2?.Invoke(InlineGetDocumentTextToolConfigurationVariant2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? agentBase = null, + global::System.Action? inlineGetDocumentTextToolConfigurationVariant2 = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineImageReadToolConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineImageReadToolConfiguration.g.cs index bb6af2c5..257889c0 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InlineImageReadToolConfiguration.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineImageReadToolConfiguration.g.cs @@ -26,6 +26,19 @@ namespace Vectara #endif public bool IsAgentBase => AgentBase != null; + /// + /// + /// + public bool TryPickAgentBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.AgentToolConfigurationBase? value) + { + value = AgentBase; + return IsAgentBase; + } + /// /// /// @@ -42,6 +55,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(InlineImageReadToolConfigurationVariant2))] #endif public bool IsInlineImageReadToolConfigurationVariant2 => InlineImageReadToolConfigurationVariant2 != null; + + /// + /// + /// + public bool TryPickInlineImageReadToolConfigurationVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.InlineImageReadToolConfigurationVariant2? value) + { + value = InlineImageReadToolConfigurationVariant2; + return IsInlineImageReadToolConfigurationVariant2; + } /// /// /// @@ -118,8 +144,8 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? agentBase = null, - global::System.Func? inlineImageReadToolConfigurationVariant2 = null, + global::System.Func? agentBase = null, + global::System.Func? inlineImageReadToolConfigurationVariant2 = null, bool validate = true) { if (validate) @@ -143,8 +169,32 @@ public bool Validate() /// /// public void Match( - global::System.Action? agentBase = null, - global::System.Action? inlineImageReadToolConfigurationVariant2 = null, + global::System.Action? agentBase = null, + + global::System.Action? inlineImageReadToolConfigurationVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAgentBase) + { + agentBase?.Invoke(AgentBase!); + } + else if (IsInlineImageReadToolConfigurationVariant2) + { + inlineImageReadToolConfigurationVariant2?.Invoke(InlineImageReadToolConfigurationVariant2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? agentBase = null, + global::System.Action? inlineImageReadToolConfigurationVariant2 = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineInstruction.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineInstruction.g.cs index a01ea69f..2f552932 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InlineInstruction.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineInstruction.g.cs @@ -26,6 +26,19 @@ namespace Vectara #endif public bool IsRequestBase => RequestBase != null; + /// + /// + /// + public bool TryPickRequestBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.InstructionRequestBase? value) + { + value = RequestBase; + return IsRequestBase; + } + /// /// /// @@ -42,6 +55,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(InlineInstructionVariant2))] #endif public bool IsInlineInstructionVariant2 => InlineInstructionVariant2 != null; + + /// + /// + /// + public bool TryPickInlineInstructionVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.InlineInstructionVariant2? value) + { + value = InlineInstructionVariant2; + return IsInlineInstructionVariant2; + } /// /// /// @@ -118,8 +144,8 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? requestBase = null, - global::System.Func? inlineInstructionVariant2 = null, + global::System.Func? requestBase = null, + global::System.Func? inlineInstructionVariant2 = null, bool validate = true) { if (validate) @@ -143,8 +169,32 @@ public bool Validate() /// /// public void Match( - global::System.Action? requestBase = null, - global::System.Action? inlineInstructionVariant2 = null, + global::System.Action? requestBase = null, + + global::System.Action? inlineInstructionVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsRequestBase) + { + requestBase?.Invoke(RequestBase!); + } + else if (IsInlineInstructionVariant2) + { + inlineInstructionVariant2?.Invoke(InlineInstructionVariant2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? requestBase = null, + global::System.Action? inlineInstructionVariant2 = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineLambdaToolConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineLambdaToolConfiguration.g.cs index 4cba8ca2..d174c6fd 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InlineLambdaToolConfiguration.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineLambdaToolConfiguration.g.cs @@ -26,6 +26,19 @@ namespace Vectara #endif public bool IsAgentBase => AgentBase != null; + /// + /// + /// + public bool TryPickAgentBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.AgentToolConfigurationBase? value) + { + value = AgentBase; + return IsAgentBase; + } + /// /// /// @@ -42,6 +55,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(InlineLambdaToolConfigurationVariant2))] #endif public bool IsInlineLambdaToolConfigurationVariant2 => InlineLambdaToolConfigurationVariant2 != null; + + /// + /// + /// + public bool TryPickInlineLambdaToolConfigurationVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.InlineLambdaToolConfigurationVariant2? value) + { + value = InlineLambdaToolConfigurationVariant2; + return IsInlineLambdaToolConfigurationVariant2; + } /// /// /// @@ -118,8 +144,8 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? agentBase = null, - global::System.Func? inlineLambdaToolConfigurationVariant2 = null, + global::System.Func? agentBase = null, + global::System.Func? inlineLambdaToolConfigurationVariant2 = null, bool validate = true) { if (validate) @@ -143,8 +169,32 @@ public bool Validate() /// /// public void Match( - global::System.Action? agentBase = null, - global::System.Action? inlineLambdaToolConfigurationVariant2 = null, + global::System.Action? agentBase = null, + + global::System.Action? inlineLambdaToolConfigurationVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAgentBase) + { + agentBase?.Invoke(AgentBase!); + } + else if (IsInlineLambdaToolConfigurationVariant2) + { + inlineLambdaToolConfigurationVariant2?.Invoke(InlineLambdaToolConfigurationVariant2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? agentBase = null, + global::System.Action? inlineLambdaToolConfigurationVariant2 = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineMcpToolConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineMcpToolConfiguration.g.cs index bf6d7586..32adb0ff 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InlineMcpToolConfiguration.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineMcpToolConfiguration.g.cs @@ -26,6 +26,19 @@ namespace Vectara #endif public bool IsAgentBase => AgentBase != null; + /// + /// + /// + public bool TryPickAgentBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.AgentToolConfigurationBase? value) + { + value = AgentBase; + return IsAgentBase; + } + /// /// /// @@ -42,6 +55,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(InlineMcpToolConfigurationVariant2))] #endif public bool IsInlineMcpToolConfigurationVariant2 => InlineMcpToolConfigurationVariant2 != null; + + /// + /// + /// + public bool TryPickInlineMcpToolConfigurationVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.InlineMcpToolConfigurationVariant2? value) + { + value = InlineMcpToolConfigurationVariant2; + return IsInlineMcpToolConfigurationVariant2; + } /// /// /// @@ -118,8 +144,8 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? agentBase = null, - global::System.Func? inlineMcpToolConfigurationVariant2 = null, + global::System.Func? agentBase = null, + global::System.Func? inlineMcpToolConfigurationVariant2 = null, bool validate = true) { if (validate) @@ -143,8 +169,32 @@ public bool Validate() /// /// public void Match( - global::System.Action? agentBase = null, - global::System.Action? inlineMcpToolConfigurationVariant2 = null, + global::System.Action? agentBase = null, + + global::System.Action? inlineMcpToolConfigurationVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAgentBase) + { + agentBase?.Invoke(AgentBase!); + } + else if (IsInlineMcpToolConfigurationVariant2) + { + inlineMcpToolConfigurationVariant2?.Invoke(InlineMcpToolConfigurationVariant2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? agentBase = null, + global::System.Action? inlineMcpToolConfigurationVariant2 = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineSubAgentToolConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineSubAgentToolConfiguration.g.cs index 25ba63c9..f5bec625 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InlineSubAgentToolConfiguration.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineSubAgentToolConfiguration.g.cs @@ -26,6 +26,19 @@ namespace Vectara #endif public bool IsBase => Base != null; + /// + /// + /// + public bool TryPickBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.AgentToolConfigurationBase? value) + { + value = Base; + return IsBase; + } + /// /// /// @@ -42,6 +55,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(InlineSubAgentToolConfigurationVariant2))] #endif public bool IsInlineSubAgentToolConfigurationVariant2 => InlineSubAgentToolConfigurationVariant2 != null; + + /// + /// + /// + public bool TryPickInlineSubAgentToolConfigurationVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.InlineSubAgentToolConfigurationVariant2? value) + { + value = InlineSubAgentToolConfigurationVariant2; + return IsInlineSubAgentToolConfigurationVariant2; + } /// /// /// @@ -118,8 +144,8 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? @base = null, - global::System.Func? inlineSubAgentToolConfigurationVariant2 = null, + global::System.Func? @base = null, + global::System.Func? inlineSubAgentToolConfigurationVariant2 = null, bool validate = true) { if (validate) @@ -143,8 +169,32 @@ public bool Validate() /// /// public void Match( - global::System.Action? @base = null, - global::System.Action? inlineSubAgentToolConfigurationVariant2 = null, + global::System.Action? @base = null, + + global::System.Action? inlineSubAgentToolConfigurationVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsBase) + { + @base?.Invoke(Base!); + } + else if (IsInlineSubAgentToolConfigurationVariant2) + { + inlineSubAgentToolConfigurationVariant2?.Invoke(InlineSubAgentToolConfigurationVariant2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? @base = null, + global::System.Action? inlineSubAgentToolConfigurationVariant2 = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineWebGetToolConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineWebGetToolConfiguration.g.cs index b8ec4eee..255faf71 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InlineWebGetToolConfiguration.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineWebGetToolConfiguration.g.cs @@ -26,6 +26,19 @@ namespace Vectara #endif public bool IsAgentBase => AgentBase != null; + /// + /// + /// + public bool TryPickAgentBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.AgentToolConfigurationBase? value) + { + value = AgentBase; + return IsAgentBase; + } + /// /// /// @@ -42,6 +55,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(InlineWebGetToolConfigurationVariant2))] #endif public bool IsInlineWebGetToolConfigurationVariant2 => InlineWebGetToolConfigurationVariant2 != null; + + /// + /// + /// + public bool TryPickInlineWebGetToolConfigurationVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.InlineWebGetToolConfigurationVariant2? value) + { + value = InlineWebGetToolConfigurationVariant2; + return IsInlineWebGetToolConfigurationVariant2; + } /// /// /// @@ -118,8 +144,8 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? agentBase = null, - global::System.Func? inlineWebGetToolConfigurationVariant2 = null, + global::System.Func? agentBase = null, + global::System.Func? inlineWebGetToolConfigurationVariant2 = null, bool validate = true) { if (validate) @@ -143,8 +169,32 @@ public bool Validate() /// /// public void Match( - global::System.Action? agentBase = null, - global::System.Action? inlineWebGetToolConfigurationVariant2 = null, + global::System.Action? agentBase = null, + + global::System.Action? inlineWebGetToolConfigurationVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAgentBase) + { + agentBase?.Invoke(AgentBase!); + } + else if (IsInlineWebGetToolConfigurationVariant2) + { + inlineWebGetToolConfigurationVariant2?.Invoke(InlineWebGetToolConfigurationVariant2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? agentBase = null, + global::System.Action? inlineWebGetToolConfigurationVariant2 = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineWebSearchToolConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineWebSearchToolConfiguration.g.cs index c1a53c3e..09719c30 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InlineWebSearchToolConfiguration.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineWebSearchToolConfiguration.g.cs @@ -26,6 +26,19 @@ namespace Vectara #endif public bool IsAgentBase => AgentBase != null; + /// + /// + /// + public bool TryPickAgentBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.AgentToolConfigurationBase? value) + { + value = AgentBase; + return IsAgentBase; + } + /// /// /// @@ -42,6 +55,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(InlineWebSearchToolConfigurationVariant2))] #endif public bool IsInlineWebSearchToolConfigurationVariant2 => InlineWebSearchToolConfigurationVariant2 != null; + + /// + /// + /// + public bool TryPickInlineWebSearchToolConfigurationVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.InlineWebSearchToolConfigurationVariant2? value) + { + value = InlineWebSearchToolConfigurationVariant2; + return IsInlineWebSearchToolConfigurationVariant2; + } /// /// /// @@ -118,8 +144,8 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? agentBase = null, - global::System.Func? inlineWebSearchToolConfigurationVariant2 = null, + global::System.Func? agentBase = null, + global::System.Func? inlineWebSearchToolConfigurationVariant2 = null, bool validate = true) { if (validate) @@ -143,8 +169,32 @@ public bool Validate() /// /// public void Match( - global::System.Action? agentBase = null, - global::System.Action? inlineWebSearchToolConfigurationVariant2 = null, + global::System.Action? agentBase = null, + + global::System.Action? inlineWebSearchToolConfigurationVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAgentBase) + { + agentBase?.Invoke(AgentBase!); + } + else if (IsInlineWebSearchToolConfigurationVariant2) + { + inlineWebSearchToolConfigurationVariant2?.Invoke(InlineWebSearchToolConfigurationVariant2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? agentBase = null, + global::System.Action? inlineWebSearchToolConfigurationVariant2 = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.InputMessageEvent.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InputMessageEvent.g.cs index 31b68cce..2547d232 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InputMessageEvent.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InputMessageEvent.g.cs @@ -26,6 +26,19 @@ namespace Vectara #endif public bool IsAgentBase => AgentBase != null; + /// + /// + /// + public bool TryPickAgentBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.AgentEventBase? value) + { + value = AgentBase; + return IsAgentBase; + } + /// /// /// @@ -42,6 +55,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(InputMessageEventVariant2))] #endif public bool IsInputMessageEventVariant2 => InputMessageEventVariant2 != null; + + /// + /// + /// + public bool TryPickInputMessageEventVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.InputMessageEventVariant2? value) + { + value = InputMessageEventVariant2; + return IsInputMessageEventVariant2; + } /// /// /// @@ -118,8 +144,8 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? agentBase = null, - global::System.Func? inputMessageEventVariant2 = null, + global::System.Func? agentBase = null, + global::System.Func? inputMessageEventVariant2 = null, bool validate = true) { if (validate) @@ -143,8 +169,32 @@ public bool Validate() /// /// public void Match( - global::System.Action? agentBase = null, - global::System.Action? inputMessageEventVariant2 = null, + global::System.Action? agentBase = null, + + global::System.Action? inputMessageEventVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAgentBase) + { + agentBase?.Invoke(AgentBase!); + } + else if (IsInputMessageEventVariant2) + { + inputMessageEventVariant2?.Invoke(InputMessageEventVariant2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? agentBase = null, + global::System.Action? inputMessageEventVariant2 = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.Instruction.g.cs b/src/libs/Vectara/Generated/Vectara.Models.Instruction.g.cs index 81073e67..af52a80a 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.Instruction.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.Instruction.g.cs @@ -30,6 +30,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Initial))] #endif public bool IsInitial => Initial != null; + + /// + /// + /// + public bool TryPickInitial( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.InitialInstruction? value) + { + value = Initial; + return IsInitial; + } /// /// /// @@ -87,7 +100,7 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? initial = null, + global::System.Func? initial = null, bool validate = true) { if (validate) @@ -107,7 +120,25 @@ public bool Validate() /// /// public void Match( - global::System.Action? initial = null, + global::System.Action? initial = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsInitial) + { + initial?.Invoke(Initial!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? initial = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.InvokeAgentTraceSpan.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InvokeAgentTraceSpan.g.cs index 4215dd27..70c8661e 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InvokeAgentTraceSpan.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InvokeAgentTraceSpan.g.cs @@ -26,6 +26,19 @@ namespace Vectara #endif public bool IsBase => Base != null; + /// + /// + /// + public bool TryPickBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.AgentTraceSpanBase? value) + { + value = Base; + return IsBase; + } + /// /// /// @@ -42,6 +55,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(InvokeAgentTraceSpanVariant2))] #endif public bool IsInvokeAgentTraceSpanVariant2 => InvokeAgentTraceSpanVariant2 != null; + + /// + /// + /// + public bool TryPickInvokeAgentTraceSpanVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.InvokeAgentTraceSpanVariant2? value) + { + value = InvokeAgentTraceSpanVariant2; + return IsInvokeAgentTraceSpanVariant2; + } /// /// /// @@ -118,8 +144,8 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? @base = null, - global::System.Func? invokeAgentTraceSpanVariant2 = null, + global::System.Func? @base = null, + global::System.Func? invokeAgentTraceSpanVariant2 = null, bool validate = true) { if (validate) @@ -143,8 +169,32 @@ public bool Validate() /// /// public void Match( - global::System.Action? @base = null, - global::System.Action? invokeAgentTraceSpanVariant2 = null, + global::System.Action? @base = null, + + global::System.Action? invokeAgentTraceSpanVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsBase) + { + @base?.Invoke(Base!); + } + else if (IsInvokeAgentTraceSpanVariant2) + { + invokeAgentTraceSpanVariant2?.Invoke(InvokeAgentTraceSpanVariant2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? @base = null, + global::System.Action? invokeAgentTraceSpanVariant2 = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.KeyedSearchCorpus.g.cs b/src/libs/Vectara/Generated/Vectara.Models.KeyedSearchCorpus.g.cs index b931aca6..c45e92f2 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.KeyedSearchCorpus.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.KeyedSearchCorpus.g.cs @@ -26,6 +26,19 @@ namespace Vectara #endif public bool IsSearchCorpus => SearchCorpus != null; + /// + /// + /// + public bool TryPickSearchCorpus( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.SearchCorpus? value) + { + value = SearchCorpus; + return IsSearchCorpus; + } + /// /// /// @@ -42,6 +55,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(KeyedSearchCorpusVariant2))] #endif public bool IsKeyedSearchCorpusVariant2 => KeyedSearchCorpusVariant2 != null; + + /// + /// + /// + public bool TryPickKeyedSearchCorpusVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.KeyedSearchCorpusVariant2? value) + { + value = KeyedSearchCorpusVariant2; + return IsKeyedSearchCorpusVariant2; + } /// /// /// @@ -118,8 +144,8 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? searchCorpus = null, - global::System.Func? keyedSearchCorpusVariant2 = null, + global::System.Func? searchCorpus = null, + global::System.Func? keyedSearchCorpusVariant2 = null, bool validate = true) { if (validate) @@ -143,8 +169,32 @@ public bool Validate() /// /// public void Match( - global::System.Action? searchCorpus = null, - global::System.Action? keyedSearchCorpusVariant2 = null, + global::System.Action? searchCorpus = null, + + global::System.Action? keyedSearchCorpusVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsSearchCorpus) + { + searchCorpus?.Invoke(SearchCorpus!); + } + else if (IsKeyedSearchCorpusVariant2) + { + keyedSearchCorpusVariant2?.Invoke(KeyedSearchCorpusVariant2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? searchCorpus = null, + global::System.Action? keyedSearchCorpusVariant2 = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.LambdaTool.g.cs b/src/libs/Vectara/Generated/Vectara.Models.LambdaTool.g.cs index 3cc61dab..de472f22 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.LambdaTool.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.LambdaTool.g.cs @@ -28,6 +28,19 @@ namespace Vectara #endif public bool IsBase => Base != null; + /// + /// + /// + public bool TryPickBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.ToolBase? value) + { + value = Base; + return IsBase; + } + /// /// /// @@ -44,6 +57,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(LambdaToolVariant2))] #endif public bool IsLambdaToolVariant2 => LambdaToolVariant2 != null; + + /// + /// + /// + public bool TryPickLambdaToolVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.LambdaToolVariant2? value) + { + value = LambdaToolVariant2; + return IsLambdaToolVariant2; + } /// /// /// @@ -120,8 +146,8 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? @base = null, - global::System.Func? lambdaToolVariant2 = null, + global::System.Func? @base = null, + global::System.Func? lambdaToolVariant2 = null, bool validate = true) { if (validate) @@ -145,8 +171,32 @@ public bool Validate() /// /// public void Match( - global::System.Action? @base = null, - global::System.Action? lambdaToolVariant2 = null, + global::System.Action? @base = null, + + global::System.Action? lambdaToolVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsBase) + { + @base?.Invoke(Base!); + } + else if (IsLambdaToolVariant2) + { + lambdaToolVariant2?.Invoke(LambdaToolVariant2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? @base = null, + global::System.Action? lambdaToolVariant2 = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.McpTool.g.cs b/src/libs/Vectara/Generated/Vectara.Models.McpTool.g.cs index d515a5d4..1e257b4c 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.McpTool.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.McpTool.g.cs @@ -26,6 +26,19 @@ namespace Vectara #endif public bool IsBase => Base != null; + /// + /// + /// + public bool TryPickBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.ToolBase? value) + { + value = Base; + return IsBase; + } + /// /// /// @@ -42,6 +55,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(McpToolVariant2))] #endif public bool IsMcpToolVariant2 => McpToolVariant2 != null; + + /// + /// + /// + public bool TryPickMcpToolVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.McpToolVariant2? value) + { + value = McpToolVariant2; + return IsMcpToolVariant2; + } /// /// /// @@ -118,8 +144,8 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? @base = null, - global::System.Func? mcpToolVariant2 = null, + global::System.Func? @base = null, + global::System.Func? mcpToolVariant2 = null, bool validate = true) { if (validate) @@ -143,8 +169,32 @@ public bool Validate() /// /// public void Match( - global::System.Action? @base = null, - global::System.Action? mcpToolVariant2 = null, + global::System.Action? @base = null, + + global::System.Action? mcpToolVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsBase) + { + @base?.Invoke(Base!); + } + else if (IsMcpToolVariant2) + { + mcpToolVariant2?.Invoke(McpToolVariant2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? @base = null, + global::System.Action? mcpToolVariant2 = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.OutputTraceSpan.g.cs b/src/libs/Vectara/Generated/Vectara.Models.OutputTraceSpan.g.cs index 41bc386e..53ad40a4 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.OutputTraceSpan.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.OutputTraceSpan.g.cs @@ -26,6 +26,19 @@ namespace Vectara #endif public bool IsAgentBase => AgentBase != null; + /// + /// + /// + public bool TryPickAgentBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.AgentTraceSpanBase? value) + { + value = AgentBase; + return IsAgentBase; + } + /// /// /// @@ -42,6 +55,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(OutputTraceSpanVariant2))] #endif public bool IsOutputTraceSpanVariant2 => OutputTraceSpanVariant2 != null; + + /// + /// + /// + public bool TryPickOutputTraceSpanVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.OutputTraceSpanVariant2? value) + { + value = OutputTraceSpanVariant2; + return IsOutputTraceSpanVariant2; + } /// /// /// @@ -118,8 +144,8 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? agentBase = null, - global::System.Func? outputTraceSpanVariant2 = null, + global::System.Func? agentBase = null, + global::System.Func? outputTraceSpanVariant2 = null, bool validate = true) { if (validate) @@ -143,8 +169,32 @@ public bool Validate() /// /// public void Match( - global::System.Action? agentBase = null, - global::System.Action? outputTraceSpanVariant2 = null, + global::System.Action? agentBase = null, + + global::System.Action? outputTraceSpanVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAgentBase) + { + agentBase?.Invoke(AgentBase!); + } + else if (IsOutputTraceSpanVariant2) + { + outputTraceSpanVariant2?.Invoke(OutputTraceSpanVariant2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? agentBase = null, + global::System.Action? outputTraceSpanVariant2 = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.PipelineSource.g.cs b/src/libs/Vectara/Generated/Vectara.Models.PipelineSource.g.cs index d99bf922..3f1e3fbb 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.PipelineSource.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.PipelineSource.g.cs @@ -30,6 +30,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(S3))] #endif public bool IsS3 => S3 != null; + + /// + /// + /// + public bool TryPickS3( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.S3SourceConfiguration? value) + { + value = S3; + return IsS3; + } /// /// /// @@ -121,6 +134,24 @@ public void Match( } } + /// + /// + /// + public void Switch( + global::System.Action? s3 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsS3) + { + s3?.Invoke(S3!); + } + } + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.PipelineTrigger.g.cs b/src/libs/Vectara/Generated/Vectara.Models.PipelineTrigger.g.cs index 0357d7a4..bd1e798c 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.PipelineTrigger.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.PipelineTrigger.g.cs @@ -31,6 +31,19 @@ namespace Vectara #endif public bool IsCron => Cron != null; + /// + /// + /// + public bool TryPickCron( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.CronTriggerConfiguration? value) + { + value = Cron; + return IsCron; + } + /// /// Run the pipeline at a fixed interval. /// @@ -48,6 +61,19 @@ namespace Vectara #endif public bool IsInterval => Interval != null; + /// + /// + /// + public bool TryPickInterval( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.IntervalTriggerConfiguration? value) + { + value = Interval; + return IsInterval; + } + /// /// Pipeline is only triggered manually via the trigger endpoint. No automatic scheduling. /// @@ -64,6 +90,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Manual))] #endif public bool IsManual => Manual != null; + + /// + /// + /// + public bool TryPickManual( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.ManualTriggerConfiguration? value) + { + value = Manual; + return IsManual; + } /// /// /// @@ -165,9 +204,9 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? cron = null, - global::System.Func? interval = null, - global::System.Func? manual = null, + global::System.Func? cron = null, + global::System.Func? interval = null, + global::System.Func? manual = null, bool validate = true) { if (validate) @@ -195,9 +234,39 @@ public bool Validate() /// /// public void Match( - global::System.Action? cron = null, - global::System.Action? interval = null, - global::System.Action? manual = null, + global::System.Action? cron = null, + + global::System.Action? interval = null, + + global::System.Action? manual = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsCron) + { + cron?.Invoke(Cron!); + } + else if (IsInterval) + { + interval?.Invoke(Interval!); + } + else if (IsManual) + { + manual?.Invoke(Manual!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? cron = null, + global::System.Action? interval = null, + global::System.Action? manual = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.PipelineVerification.g.cs b/src/libs/Vectara/Generated/Vectara.Models.PipelineVerification.g.cs index 0cf51dd6..1874e211 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.PipelineVerification.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.PipelineVerification.g.cs @@ -35,6 +35,19 @@ namespace Vectara #endif public bool IsCondition => Condition != null; + /// + /// + /// + public bool TryPickCondition( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.ConditionVerification? value) + { + value = Condition; + return IsCondition; + } + /// /// 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
@@ -54,6 +67,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Agent))] #endif public bool IsAgent => Agent != null; + + /// + /// + /// + public bool TryPickAgent( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.AgentVerification? value) + { + value = Agent; + return IsAgent; + } /// /// /// @@ -133,8 +159,8 @@ public bool Validate() /// ///
public TResult? Match( - global::System.Func? condition = null, - global::System.Func? agent = null, + global::System.Func? condition = null, + global::System.Func? agent = null, bool validate = true) { if (validate) @@ -158,8 +184,32 @@ public bool Validate() /// /// public void Match( - global::System.Action? condition = null, - global::System.Action? agent = null, + global::System.Action? condition = null, + + global::System.Action? agent = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsCondition) + { + condition?.Invoke(Condition!); + } + else if (IsAgent) + { + agent?.Invoke(Agent!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? condition = null, + global::System.Action? agent = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.QueryHistorySpan.g.cs b/src/libs/Vectara/Generated/Vectara.Models.QueryHistorySpan.g.cs index 5e24abc6..2cdf40f0 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.QueryHistorySpan.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.QueryHistorySpan.g.cs @@ -31,6 +31,19 @@ namespace Vectara #endif public bool IsRephrase => Rephrase != null; + /// + /// + /// + public bool TryPickRephrase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.RephraseSpan? value) + { + value = Rephrase; + return IsRephrase; + } + /// /// The search portion of the query pipeline. This occurs before any reranking span. /// @@ -48,6 +61,19 @@ namespace Vectara #endif public bool IsSearch => Search != null; + /// + /// + /// + public bool TryPickSearch( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.SearchSpan? value) + { + value = Search; + return IsSearch; + } + /// /// The reranking of the search result. /// @@ -65,6 +91,19 @@ namespace Vectara #endif public bool IsRerank => Rerank != null; + /// + /// + /// + public bool TryPickRerank( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.RerankSpan? value) + { + value = Rerank; + return IsRerank; + } + /// /// The generation by an LLM. /// @@ -82,6 +121,19 @@ namespace Vectara #endif public bool IsGeneration => Generation != null; + /// + /// + /// + public bool TryPickGeneration( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.GenerationSpan? value) + { + value = Generation; + return IsGeneration; + } + /// /// The factual consistency of the generation. /// @@ -99,6 +151,19 @@ namespace Vectara #endif public bool IsFcs => Fcs != null; + /// + /// + /// + public bool TryPickFcs( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.FactualConsistencyScoreSpan? value) + { + value = Fcs; + return IsFcs; + } + /// /// Provides detailed information about a rewritten query generated for a specific corpus when intelligent query rewriting is enabled. /// @@ -115,6 +180,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(RewrittenQuery))] #endif public bool IsRewrittenQuery => RewrittenQuery != null; + + /// + /// + /// + public bool TryPickRewrittenQuery( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.RewrittenQuerySpan? value) + { + value = RewrittenQuery; + return IsRewrittenQuery; + } /// /// /// @@ -282,12 +360,12 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? rephrase = null, - global::System.Func? search = null, - global::System.Func? rerank = null, - global::System.Func? generation = null, - global::System.Func? fcs = null, - global::System.Func? rewrittenQuery = null, + global::System.Func? rephrase = null, + global::System.Func? search = null, + global::System.Func? rerank = null, + global::System.Func? generation = null, + global::System.Func? fcs = null, + global::System.Func? rewrittenQuery = null, bool validate = true) { if (validate) @@ -327,12 +405,60 @@ public bool Validate() /// /// public void Match( - global::System.Action? rephrase = null, - global::System.Action? search = null, - global::System.Action? rerank = null, - global::System.Action? generation = null, - global::System.Action? fcs = null, - global::System.Action? rewrittenQuery = null, + global::System.Action? rephrase = null, + + global::System.Action? search = null, + + global::System.Action? rerank = null, + + global::System.Action? generation = null, + + global::System.Action? fcs = null, + + global::System.Action? rewrittenQuery = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsRephrase) + { + rephrase?.Invoke(Rephrase!); + } + else if (IsSearch) + { + search?.Invoke(Search!); + } + else if (IsRerank) + { + rerank?.Invoke(Rerank!); + } + else if (IsGeneration) + { + generation?.Invoke(Generation!); + } + else if (IsFcs) + { + fcs?.Invoke(Fcs!); + } + else if (IsRewrittenQuery) + { + rewrittenQuery?.Invoke(RewrittenQuery!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? rephrase = null, + global::System.Action? search = null, + global::System.Action? rerank = null, + global::System.Action? generation = null, + global::System.Action? fcs = null, + global::System.Action? rewrittenQuery = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.QueryStreamedResponse.g.cs b/src/libs/Vectara/Generated/Vectara.Models.QueryStreamedResponse.g.cs index 0c24ac60..f19b005e 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.QueryStreamedResponse.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.QueryStreamedResponse.g.cs @@ -31,6 +31,19 @@ namespace Vectara #endif public bool IsSearchResults => SearchResults != null; + /// + /// + /// + public bool TryPickSearchResults( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.StreamSearchResponse? value) + { + value = SearchResults; + return IsSearchResults; + } + /// /// The chunk response from the generation, which may be a partial generation. /// @@ -48,6 +61,19 @@ namespace Vectara #endif public bool IsGenerationChunk => GenerationChunk != null; + /// + /// + /// + public bool TryPickGenerationChunk( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.StreamGenerationChunk? value) + { + value = GenerationChunk; + return IsGenerationChunk; + } + /// /// The end of generation. There may still be more information such as the factual consistency score, but generation has stopped. /// @@ -65,6 +91,19 @@ namespace Vectara #endif public bool IsGenerationEnd => GenerationEnd != null; + /// + /// + /// + public bool TryPickGenerationEnd( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.StreamGenerationEnd? value) + { + value = GenerationEnd; + return IsGenerationEnd; + } + /// /// The end of a query response stream. /// @@ -82,6 +121,19 @@ namespace Vectara #endif public bool IsEnd => End != null; + /// + /// + /// + public bool TryPickEnd( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.StreamResponseEnd? value) + { + value = End; + return IsEnd; + } + /// /// Event containing the factual consistency score. /// @@ -99,6 +151,19 @@ namespace Vectara #endif public bool IsFactualConsistencyScore => FactualConsistencyScore != null; + /// + /// + /// + public bool TryPickFactualConsistencyScore( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.FactualConsistencyScore? value) + { + value = FactualConsistencyScore; + return IsFactualConsistencyScore; + } + /// /// Event containing information on how the generation was accomplished. /// @@ -116,6 +181,19 @@ namespace Vectara #endif public bool IsGenerationInfo => GenerationInfo != null; + /// + /// + /// + public bool TryPickGenerationInfo( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.GenerationInfo? value) + { + value = GenerationInfo; + return IsGenerationInfo; + } + /// /// Event signaling there was an error with the request. /// @@ -132,6 +210,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Error))] #endif public bool IsError => Error != null; + + /// + /// + /// + public bool TryPickError( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.StreamError? value) + { + value = Error; + return IsError; + } /// /// /// @@ -321,13 +412,13 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? searchResults = null, - global::System.Func? generationChunk = null, - global::System.Func? generationEnd = null, - global::System.Func? end = null, - global::System.Func? factualConsistencyScore = null, - global::System.Func? generationInfo = null, - global::System.Func? error = null, + global::System.Func? searchResults = null, + global::System.Func? generationChunk = null, + global::System.Func? generationEnd = null, + global::System.Func? end = null, + global::System.Func? factualConsistencyScore = null, + global::System.Func? generationInfo = null, + global::System.Func? error = null, bool validate = true) { if (validate) @@ -371,13 +462,67 @@ public bool Validate() /// /// public void Match( - global::System.Action? searchResults = null, - global::System.Action? generationChunk = null, - global::System.Action? generationEnd = null, - global::System.Action? end = null, - global::System.Action? factualConsistencyScore = null, - global::System.Action? generationInfo = null, - global::System.Action? error = null, + global::System.Action? searchResults = null, + + global::System.Action? generationChunk = null, + + global::System.Action? generationEnd = null, + + global::System.Action? end = null, + + global::System.Action? factualConsistencyScore = null, + + global::System.Action? generationInfo = null, + + global::System.Action? error = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsSearchResults) + { + searchResults?.Invoke(SearchResults!); + } + else if (IsGenerationChunk) + { + generationChunk?.Invoke(GenerationChunk!); + } + else if (IsGenerationEnd) + { + generationEnd?.Invoke(GenerationEnd!); + } + else if (IsEnd) + { + end?.Invoke(End!); + } + else if (IsFactualConsistencyScore) + { + factualConsistencyScore?.Invoke(FactualConsistencyScore!); + } + else if (IsGenerationInfo) + { + generationInfo?.Invoke(GenerationInfo!); + } + else if (IsError) + { + error?.Invoke(Error!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? searchResults = null, + global::System.Action? generationChunk = null, + global::System.Action? generationEnd = null, + global::System.Action? end = null, + global::System.Action? factualConsistencyScore = null, + global::System.Action? generationInfo = null, + global::System.Action? error = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.ReferenceInstruction.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ReferenceInstruction.g.cs index bf816893..c112b99a 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.ReferenceInstruction.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.ReferenceInstruction.g.cs @@ -26,6 +26,19 @@ namespace Vectara #endif public bool IsInstructionReference => InstructionReference != null; + /// + /// + /// + public bool TryPickInstructionReference( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.InstructionReference? value) + { + value = InstructionReference; + return IsInstructionReference; + } + /// /// /// @@ -42,6 +55,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ReferenceInstructionVariant2))] #endif public bool IsReferenceInstructionVariant2 => ReferenceInstructionVariant2 != null; + + /// + /// + /// + public bool TryPickReferenceInstructionVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.ReferenceInstructionVariant2? value) + { + value = ReferenceInstructionVariant2; + return IsReferenceInstructionVariant2; + } /// /// /// @@ -118,8 +144,8 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? instructionReference = null, - global::System.Func? referenceInstructionVariant2 = null, + global::System.Func? instructionReference = null, + global::System.Func? referenceInstructionVariant2 = null, bool validate = true) { if (validate) @@ -143,8 +169,32 @@ public bool Validate() /// /// public void Match( - global::System.Action? instructionReference = null, - global::System.Action? referenceInstructionVariant2 = null, + global::System.Action? instructionReference = null, + + global::System.Action? referenceInstructionVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsInstructionReference) + { + instructionReference?.Invoke(InstructionReference!); + } + else if (IsReferenceInstructionVariant2) + { + referenceInstructionVariant2?.Invoke(ReferenceInstructionVariant2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? instructionReference = null, + global::System.Action? referenceInstructionVariant2 = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.RemoteAuth.g.cs b/src/libs/Vectara/Generated/Vectara.Models.RemoteAuth.g.cs index c842e687..2d81d8da 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.RemoteAuth.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.RemoteAuth.g.cs @@ -31,6 +31,19 @@ namespace Vectara #endif public bool IsBearer => Bearer != null; + /// + /// + /// + public bool TryPickBearer( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.BearerAuth? value) + { + value = Bearer; + return IsBearer; + } + /// /// Custom header-based authentication /// @@ -48,6 +61,19 @@ namespace Vectara #endif public bool IsHeader => Header != null; + /// + /// + /// + public bool TryPickHeader( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.HeaderAuth? value) + { + value = Header; + return IsHeader; + } + /// /// OAuth 2.0 client credentials authentication. The platform acquires an access token from the token endpoint before connecting to the remote service. /// @@ -64,6 +90,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(OauthClientCredentials))] #endif public bool IsOauthClientCredentials => OauthClientCredentials != null; + + /// + /// + /// + public bool TryPickOauthClientCredentials( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.OAuthClientCredentialsAuth? value) + { + value = OauthClientCredentials; + return IsOauthClientCredentials; + } /// /// /// @@ -165,9 +204,9 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? bearer = null, - global::System.Func? header = null, - global::System.Func? oauthClientCredentials = null, + global::System.Func? bearer = null, + global::System.Func? header = null, + global::System.Func? oauthClientCredentials = null, bool validate = true) { if (validate) @@ -195,9 +234,39 @@ public bool Validate() /// /// public void Match( - global::System.Action? bearer = null, - global::System.Action? header = null, - global::System.Action? oauthClientCredentials = null, + global::System.Action? bearer = null, + + global::System.Action? header = null, + + global::System.Action? oauthClientCredentials = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsBearer) + { + bearer?.Invoke(Bearer!); + } + else if (IsHeader) + { + header?.Invoke(Header!); + } + else if (IsOauthClientCredentials) + { + oauthClientCredentials?.Invoke(OauthClientCredentials!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? bearer = null, + global::System.Action? header = null, + global::System.Action? oauthClientCredentials = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.S3SourceConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.Models.S3SourceConfiguration.g.cs index f60ff40e..05343d0c 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.S3SourceConfiguration.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.S3SourceConfiguration.g.cs @@ -26,6 +26,19 @@ namespace Vectara #endif public bool IsBase => Base != null; + /// + /// + /// + public bool TryPickBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.BaseS3SourceConfiguration? value) + { + value = Base; + return IsBase; + } + /// /// /// @@ -42,6 +55,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(S3SourceConfigurationVariant2))] #endif public bool IsS3SourceConfigurationVariant2 => S3SourceConfigurationVariant2 != null; + + /// + /// + /// + public bool TryPickS3SourceConfigurationVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out object? value) + { + value = S3SourceConfigurationVariant2; + return IsS3SourceConfigurationVariant2; + } /// /// /// @@ -100,8 +126,8 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? @base = null, - global::System.Func? s3SourceConfigurationVariant2 = null, + global::System.Func? @base = null, + global::System.Func? s3SourceConfigurationVariant2 = null, bool validate = true) { if (validate) @@ -125,8 +151,32 @@ public bool Validate() /// /// public void Match( - global::System.Action? @base = null, - global::System.Action? s3SourceConfigurationVariant2 = null, + global::System.Action? @base = null, + + global::System.Action? s3SourceConfigurationVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsBase) + { + @base?.Invoke(Base!); + } + else if (IsS3SourceConfigurationVariant2) + { + s3SourceConfigurationVariant2?.Invoke(S3SourceConfigurationVariant2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? @base = null, + global::System.Action? s3SourceConfigurationVariant2 = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.ScheduleConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ScheduleConfiguration.g.cs index 63a5dcdf..116bf984 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.ScheduleConfiguration.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.ScheduleConfiguration.g.cs @@ -26,6 +26,19 @@ namespace Vectara #endif public bool IsInterval => Interval != null; + /// + /// + /// + public bool TryPickInterval( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.IntervalScheduleConfiguration? value) + { + value = Interval; + return IsInterval; + } + /// /// Configuration for cron-based schedule execution. /// @@ -42,6 +55,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Cron))] #endif public bool IsCron => Cron != null; + + /// + /// + /// + public bool TryPickCron( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.CronScheduleConfiguration? value) + { + value = Cron; + return IsCron; + } /// /// /// @@ -118,8 +144,8 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? interval = null, - global::System.Func? cron = null, + global::System.Func? interval = null, + global::System.Func? cron = null, bool validate = true) { if (validate) @@ -143,8 +169,32 @@ public bool Validate() /// /// public void Match( - global::System.Action? interval = null, - global::System.Action? cron = null, + global::System.Action? interval = null, + + global::System.Action? cron = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsInterval) + { + interval?.Invoke(Interval!); + } + else if (IsCron) + { + cron?.Invoke(Cron!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? interval = null, + global::System.Action? cron = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.SearchCorporaParameters.g.cs b/src/libs/Vectara/Generated/Vectara.Models.SearchCorporaParameters.g.cs index 8de6a665..bdce5ae6 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.SearchCorporaParameters.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.SearchCorporaParameters.g.cs @@ -26,6 +26,19 @@ namespace Vectara #endif public bool IsSearchCorporaParametersVariant1 => SearchCorporaParametersVariant1 != null; + /// + /// + /// + public bool TryPickSearchCorporaParametersVariant1( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.SearchCorporaParametersVariant1? value) + { + value = SearchCorporaParametersVariant1; + return IsSearchCorporaParametersVariant1; + } + /// /// Search parameters to retrieve knowledge for the query.
/// Example: {"limit":50} @@ -43,6 +56,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(SearchParameters))] #endif public bool IsSearchParameters => SearchParameters != null; + + /// + /// + /// + public bool TryPickSearchParameters( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.SearchParameters? value) + { + value = SearchParameters; + return IsSearchParameters; + } /// /// /// @@ -119,8 +145,8 @@ public bool Validate() /// ///
public TResult? Match( - global::System.Func? searchCorporaParametersVariant1 = null, - global::System.Func? searchParameters = null, + global::System.Func? searchCorporaParametersVariant1 = null, + global::System.Func? searchParameters = null, bool validate = true) { if (validate) @@ -144,8 +170,32 @@ public bool Validate() /// /// public void Match( - global::System.Action? searchCorporaParametersVariant1 = null, - global::System.Action? searchParameters = null, + global::System.Action? searchCorporaParametersVariant1 = null, + + global::System.Action? searchParameters = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsSearchCorporaParametersVariant1) + { + searchCorporaParametersVariant1?.Invoke(SearchCorporaParametersVariant1!); + } + else if (IsSearchParameters) + { + searchParameters?.Invoke(SearchParameters!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? searchCorporaParametersVariant1 = null, + global::System.Action? searchParameters = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.SearchReranker.g.cs b/src/libs/Vectara/Generated/Vectara.Models.SearchReranker.g.cs index bf4250e2..679bc650 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.SearchReranker.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.SearchReranker.g.cs @@ -31,6 +31,19 @@ namespace Vectara #endif public bool IsCustomerReranker => CustomerReranker != null; + /// + /// + /// + public bool TryPickCustomerReranker( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.CustomerSpecificReranker? value) + { + value = CustomerReranker; + return IsCustomerReranker; + } + /// /// A reranker that uses user-defined functions to reorder search results. /// @@ -48,6 +61,19 @@ namespace Vectara #endif public bool IsUserfn => Userfn != null; + /// + /// + /// + public bool TryPickUserfn( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.UserFunctionReranker? value) + { + value = Userfn; + return IsUserfn; + } + /// /// A reranker that uses Maximal Marginal Relevance to balance relevance and diversity in search results. /// @@ -65,6 +91,19 @@ namespace Vectara #endif public bool IsMmr => Mmr != null; + /// + /// + /// + public bool TryPickMmr( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.MMRReranker? value) + { + value = Mmr; + return IsMmr; + } + /// /// A reranker that applies multiple rerankers in sequence to produce the final search results. /// @@ -82,6 +121,19 @@ namespace Vectara #endif public bool IsChain => Chain != null; + /// + /// + /// + public bool TryPickChain( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.ChainReranker? value) + { + value = Chain; + return IsChain; + } + /// /// A placeholder reranker that does not modify the original search results ordering. /// @@ -98,6 +150,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(None))] #endif public bool IsNone => None != null; + + /// + /// + /// + public bool TryPickNone( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.NoneReranker? value) + { + value = None; + return IsNone; + } /// /// /// @@ -243,11 +308,11 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? customerReranker = null, - global::System.Func? userfn = null, - global::System.Func? mmr = null, - global::System.Func? chain = null, - global::System.Func? none = null, + global::System.Func? customerReranker = null, + global::System.Func? userfn = null, + global::System.Func? mmr = null, + global::System.Func? chain = null, + global::System.Func? none = null, bool validate = true) { if (validate) @@ -283,11 +348,53 @@ public bool Validate() /// /// public void Match( - global::System.Action? customerReranker = null, - global::System.Action? userfn = null, - global::System.Action? mmr = null, - global::System.Action? chain = null, - global::System.Action? none = null, + global::System.Action? customerReranker = null, + + global::System.Action? userfn = null, + + global::System.Action? mmr = null, + + global::System.Action? chain = null, + + global::System.Action? none = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsCustomerReranker) + { + customerReranker?.Invoke(CustomerReranker!); + } + else if (IsUserfn) + { + userfn?.Invoke(Userfn!); + } + else if (IsMmr) + { + mmr?.Invoke(Mmr!); + } + else if (IsChain) + { + chain?.Invoke(Chain!); + } + else if (IsNone) + { + none?.Invoke(None!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? customerReranker = null, + global::System.Action? userfn = null, + global::System.Action? mmr = null, + global::System.Action? chain = null, + global::System.Action? none = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.SessionInterruptedEvent.g.cs b/src/libs/Vectara/Generated/Vectara.Models.SessionInterruptedEvent.g.cs index c32cdf5a..89a87bb1 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.SessionInterruptedEvent.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.SessionInterruptedEvent.g.cs @@ -27,6 +27,19 @@ namespace Vectara #endif public bool IsAgentBase => AgentBase != null; + /// + /// + /// + public bool TryPickAgentBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.AgentEventBase? value) + { + value = AgentBase; + return IsAgentBase; + } + /// /// /// @@ -43,6 +56,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(SessionInterruptedEventVariant2))] #endif public bool IsSessionInterruptedEventVariant2 => SessionInterruptedEventVariant2 != null; + + /// + /// + /// + public bool TryPickSessionInterruptedEventVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.SessionInterruptedEventVariant2? value) + { + value = SessionInterruptedEventVariant2; + return IsSessionInterruptedEventVariant2; + } /// /// /// @@ -119,8 +145,8 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? agentBase = null, - global::System.Func? sessionInterruptedEventVariant2 = null, + global::System.Func? agentBase = null, + global::System.Func? sessionInterruptedEventVariant2 = null, bool validate = true) { if (validate) @@ -144,8 +170,32 @@ public bool Validate() /// /// public void Match( - global::System.Action? agentBase = null, - global::System.Action? sessionInterruptedEventVariant2 = null, + global::System.Action? agentBase = null, + + global::System.Action? sessionInterruptedEventVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAgentBase) + { + agentBase?.Invoke(AgentBase!); + } + else if (IsSessionInterruptedEventVariant2) + { + sessionInterruptedEventVariant2?.Invoke(SessionInterruptedEventVariant2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? agentBase = null, + global::System.Action? sessionInterruptedEventVariant2 = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.SkillLoadEvent.g.cs b/src/libs/Vectara/Generated/Vectara.Models.SkillLoadEvent.g.cs index 447135ea..364f38dd 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.SkillLoadEvent.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.SkillLoadEvent.g.cs @@ -26,6 +26,19 @@ namespace Vectara #endif public bool IsAgentBase => AgentBase != null; + /// + /// + /// + public bool TryPickAgentBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.AgentEventBase? value) + { + value = AgentBase; + return IsAgentBase; + } + /// /// /// @@ -42,6 +55,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(SkillLoadEventVariant2))] #endif public bool IsSkillLoadEventVariant2 => SkillLoadEventVariant2 != null; + + /// + /// + /// + public bool TryPickSkillLoadEventVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.SkillLoadEventVariant2? value) + { + value = SkillLoadEventVariant2; + return IsSkillLoadEventVariant2; + } /// /// /// @@ -118,8 +144,8 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? agentBase = null, - global::System.Func? skillLoadEventVariant2 = null, + global::System.Func? agentBase = null, + global::System.Func? skillLoadEventVariant2 = null, bool validate = true) { if (validate) @@ -143,8 +169,32 @@ public bool Validate() /// /// public void Match( - global::System.Action? agentBase = null, - global::System.Action? skillLoadEventVariant2 = null, + global::System.Action? agentBase = null, + + global::System.Action? skillLoadEventVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAgentBase) + { + agentBase?.Invoke(AgentBase!); + } + else if (IsSkillLoadEventVariant2) + { + skillLoadEventVariant2?.Invoke(SkillLoadEventVariant2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? agentBase = null, + global::System.Action? skillLoadEventVariant2 = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.StepTransitionEvent.g.cs b/src/libs/Vectara/Generated/Vectara.Models.StepTransitionEvent.g.cs index 93f77c7b..ce957218 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.StepTransitionEvent.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.StepTransitionEvent.g.cs @@ -26,6 +26,19 @@ namespace Vectara #endif public bool IsAgentBase => AgentBase != null; + /// + /// + /// + public bool TryPickAgentBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.AgentEventBase? value) + { + value = AgentBase; + return IsAgentBase; + } + /// /// /// @@ -42,6 +55,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(StepTransitionEventVariant2))] #endif public bool IsStepTransitionEventVariant2 => StepTransitionEventVariant2 != null; + + /// + /// + /// + public bool TryPickStepTransitionEventVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.StepTransitionEventVariant2? value) + { + value = StepTransitionEventVariant2; + return IsStepTransitionEventVariant2; + } /// /// /// @@ -118,8 +144,8 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? agentBase = null, - global::System.Func? stepTransitionEventVariant2 = null, + global::System.Func? agentBase = null, + global::System.Func? stepTransitionEventVariant2 = null, bool validate = true) { if (validate) @@ -143,8 +169,32 @@ public bool Validate() /// /// public void Match( - global::System.Action? agentBase = null, - global::System.Action? stepTransitionEventVariant2 = null, + global::System.Action? agentBase = null, + + global::System.Action? stepTransitionEventVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAgentBase) + { + agentBase?.Invoke(AgentBase!); + } + else if (IsStepTransitionEventVariant2) + { + stepTransitionEventVariant2?.Invoke(StepTransitionEventVariant2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? agentBase = null, + global::System.Action? stepTransitionEventVariant2 = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.StepTransitionLimitExceededEvent.g.cs b/src/libs/Vectara/Generated/Vectara.Models.StepTransitionLimitExceededEvent.g.cs index 6fd36ba4..b4d45166 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.StepTransitionLimitExceededEvent.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.StepTransitionLimitExceededEvent.g.cs @@ -28,6 +28,19 @@ namespace Vectara #endif public bool IsAgentBase => AgentBase != null; + /// + /// + /// + public bool TryPickAgentBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.AgentEventBase? value) + { + value = AgentBase; + return IsAgentBase; + } + /// /// /// @@ -44,6 +57,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(StepTransitionLimitExceededEventVariant2))] #endif public bool IsStepTransitionLimitExceededEventVariant2 => StepTransitionLimitExceededEventVariant2 != null; + + /// + /// + /// + public bool TryPickStepTransitionLimitExceededEventVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.StepTransitionLimitExceededEventVariant2? value) + { + value = StepTransitionLimitExceededEventVariant2; + return IsStepTransitionLimitExceededEventVariant2; + } /// /// /// @@ -120,8 +146,8 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? agentBase = null, - global::System.Func? stepTransitionLimitExceededEventVariant2 = null, + global::System.Func? agentBase = null, + global::System.Func? stepTransitionLimitExceededEventVariant2 = null, bool validate = true) { if (validate) @@ -145,8 +171,32 @@ public bool Validate() /// /// public void Match( - global::System.Action? agentBase = null, - global::System.Action? stepTransitionLimitExceededEventVariant2 = null, + global::System.Action? agentBase = null, + + global::System.Action? stepTransitionLimitExceededEventVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAgentBase) + { + agentBase?.Invoke(AgentBase!); + } + else if (IsStepTransitionLimitExceededEventVariant2) + { + stepTransitionLimitExceededEventVariant2?.Invoke(StepTransitionLimitExceededEventVariant2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? agentBase = null, + global::System.Action? stepTransitionLimitExceededEventVariant2 = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.StepTransitionTraceSpan.g.cs b/src/libs/Vectara/Generated/Vectara.Models.StepTransitionTraceSpan.g.cs index 443487c7..261aab8b 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.StepTransitionTraceSpan.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.StepTransitionTraceSpan.g.cs @@ -26,6 +26,19 @@ namespace Vectara #endif public bool IsAgentBase => AgentBase != null; + /// + /// + /// + public bool TryPickAgentBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.AgentTraceSpanBase? value) + { + value = AgentBase; + return IsAgentBase; + } + /// /// /// @@ -42,6 +55,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(StepTransitionTraceSpanVariant2))] #endif public bool IsStepTransitionTraceSpanVariant2 => StepTransitionTraceSpanVariant2 != null; + + /// + /// + /// + public bool TryPickStepTransitionTraceSpanVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.StepTransitionTraceSpanVariant2? value) + { + value = StepTransitionTraceSpanVariant2; + return IsStepTransitionTraceSpanVariant2; + } /// /// /// @@ -118,8 +144,8 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? agentBase = null, - global::System.Func? stepTransitionTraceSpanVariant2 = null, + global::System.Func? agentBase = null, + global::System.Func? stepTransitionTraceSpanVariant2 = null, bool validate = true) { if (validate) @@ -143,8 +169,32 @@ public bool Validate() /// /// public void Match( - global::System.Action? agentBase = null, - global::System.Action? stepTransitionTraceSpanVariant2 = null, + global::System.Action? agentBase = null, + + global::System.Action? stepTransitionTraceSpanVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAgentBase) + { + agentBase?.Invoke(AgentBase!); + } + else if (IsStepTransitionTraceSpanVariant2) + { + stepTransitionTraceSpanVariant2?.Invoke(StepTransitionTraceSpanVariant2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? agentBase = null, + global::System.Action? stepTransitionTraceSpanVariant2 = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.StructuredOutputEvent.g.cs b/src/libs/Vectara/Generated/Vectara.Models.StructuredOutputEvent.g.cs index 68f1c16e..a3e6a199 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.StructuredOutputEvent.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.StructuredOutputEvent.g.cs @@ -32,6 +32,19 @@ namespace Vectara #endif public bool IsAgentBase => AgentBase != null; + /// + /// + /// + public bool TryPickAgentBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.AgentEventBase? value) + { + value = AgentBase; + return IsAgentBase; + } + /// /// /// @@ -48,6 +61,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(StructuredOutputEventVariant2))] #endif public bool IsStructuredOutputEventVariant2 => StructuredOutputEventVariant2 != null; + + /// + /// + /// + public bool TryPickStructuredOutputEventVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.StructuredOutputEventVariant2? value) + { + value = StructuredOutputEventVariant2; + return IsStructuredOutputEventVariant2; + } /// /// /// @@ -124,8 +150,8 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? agentBase = null, - global::System.Func? structuredOutputEventVariant2 = null, + global::System.Func? agentBase = null, + global::System.Func? structuredOutputEventVariant2 = null, bool validate = true) { if (validate) @@ -149,8 +175,32 @@ public bool Validate() /// /// public void Match( - global::System.Action? agentBase = null, - global::System.Action? structuredOutputEventVariant2 = null, + global::System.Action? agentBase = null, + + global::System.Action? structuredOutputEventVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAgentBase) + { + agentBase?.Invoke(AgentBase!); + } + else if (IsStructuredOutputEventVariant2) + { + structuredOutputEventVariant2?.Invoke(StructuredOutputEventVariant2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? agentBase = null, + global::System.Action? structuredOutputEventVariant2 = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.SubAgentTool.g.cs b/src/libs/Vectara/Generated/Vectara.Models.SubAgentTool.g.cs index 3ce47fc2..7c308a6a 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.SubAgentTool.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.SubAgentTool.g.cs @@ -27,6 +27,19 @@ namespace Vectara #endif public bool IsBase => Base != null; + /// + /// + /// + public bool TryPickBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.ToolBase? value) + { + value = Base; + return IsBase; + } + /// /// /// @@ -43,6 +56,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(SubAgentToolVariant2))] #endif public bool IsSubAgentToolVariant2 => SubAgentToolVariant2 != null; + + /// + /// + /// + public bool TryPickSubAgentToolVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.SubAgentToolVariant2? value) + { + value = SubAgentToolVariant2; + return IsSubAgentToolVariant2; + } /// /// /// @@ -119,8 +145,8 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? @base = null, - global::System.Func? subAgentToolVariant2 = null, + global::System.Func? @base = null, + global::System.Func? subAgentToolVariant2 = null, bool validate = true) { if (validate) @@ -144,8 +170,32 @@ public bool Validate() /// /// public void Match( - global::System.Action? @base = null, - global::System.Action? subAgentToolVariant2 = null, + global::System.Action? @base = null, + + global::System.Action? subAgentToolVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsBase) + { + @base?.Invoke(Base!); + } + else if (IsSubAgentToolVariant2) + { + subAgentToolVariant2?.Invoke(SubAgentToolVariant2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? @base = null, + global::System.Action? subAgentToolVariant2 = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.SummarizeDocumentStreamedResponse.g.cs b/src/libs/Vectara/Generated/Vectara.Models.SummarizeDocumentStreamedResponse.g.cs index c5ecf83c..e5579ca2 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.SummarizeDocumentStreamedResponse.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.SummarizeDocumentStreamedResponse.g.cs @@ -31,6 +31,19 @@ namespace Vectara #endif public bool IsGenerationChunk => GenerationChunk != null; + /// + /// + /// + public bool TryPickGenerationChunk( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.StreamGenerationChunk? value) + { + value = GenerationChunk; + return IsGenerationChunk; + } + /// /// Event containing information on how the generation was accomplished. /// @@ -48,6 +61,19 @@ namespace Vectara #endif public bool IsGenerationInfo => GenerationInfo != null; + /// + /// + /// + public bool TryPickGenerationInfo( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.GenerationInfo? value) + { + value = GenerationInfo; + return IsGenerationInfo; + } + /// /// The end of generation. There may still be more information such as the factual consistency score, but generation has stopped. /// @@ -65,6 +91,19 @@ namespace Vectara #endif public bool IsGenerationEnd => GenerationEnd != null; + /// + /// + /// + public bool TryPickGenerationEnd( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.StreamGenerationEnd? value) + { + value = GenerationEnd; + return IsGenerationEnd; + } + /// /// The end of a query response stream. /// @@ -82,6 +121,19 @@ namespace Vectara #endif public bool IsEnd => End != null; + /// + /// + /// + public bool TryPickEnd( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.StreamResponseEnd? value) + { + value = End; + return IsEnd; + } + /// /// Event signaling there was an error with the request. /// @@ -98,6 +150,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Error))] #endif public bool IsError => Error != null; + + /// + /// + /// + public bool TryPickError( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.StreamError? value) + { + value = Error; + return IsError; + } /// /// /// @@ -243,11 +308,11 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? generationChunk = null, - global::System.Func? generationInfo = null, - global::System.Func? generationEnd = null, - global::System.Func? end = null, - global::System.Func? error = null, + global::System.Func? generationChunk = null, + global::System.Func? generationInfo = null, + global::System.Func? generationEnd = null, + global::System.Func? end = null, + global::System.Func? error = null, bool validate = true) { if (validate) @@ -283,11 +348,53 @@ public bool Validate() /// /// public void Match( - global::System.Action? generationChunk = null, - global::System.Action? generationInfo = null, - global::System.Action? generationEnd = null, - global::System.Action? end = null, - global::System.Action? error = null, + global::System.Action? generationChunk = null, + + global::System.Action? generationInfo = null, + + global::System.Action? generationEnd = null, + + global::System.Action? end = null, + + global::System.Action? error = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsGenerationChunk) + { + generationChunk?.Invoke(GenerationChunk!); + } + else if (IsGenerationInfo) + { + generationInfo?.Invoke(GenerationInfo!); + } + else if (IsGenerationEnd) + { + generationEnd?.Invoke(GenerationEnd!); + } + else if (IsEnd) + { + end?.Invoke(End!); + } + else if (IsError) + { + error?.Invoke(Error!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? generationChunk = null, + global::System.Action? generationInfo = null, + global::System.Action? generationEnd = null, + global::System.Action? end = null, + global::System.Action? error = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.TestToolResponse.g.cs b/src/libs/Vectara/Generated/Vectara.Models.TestToolResponse.g.cs index c441434a..013ef6cc 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.TestToolResponse.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.TestToolResponse.g.cs @@ -31,6 +31,19 @@ namespace Vectara #endif public bool IsSuccess => Success != null; + /// + /// + /// + public bool TryPickSuccess( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.TestToolSuccessResponse? value) + { + value = Success; + return IsSuccess; + } + /// /// Error response from testing a Lambda tool. /// @@ -47,6 +60,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Error))] #endif public bool IsError => Error != null; + + /// + /// + /// + public bool TryPickError( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.TestToolErrorResponse? value) + { + value = Error; + return IsError; + } /// /// /// @@ -126,8 +152,8 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? success = null, - global::System.Func? error = null, + global::System.Func? success = null, + global::System.Func? error = null, bool validate = true) { if (validate) @@ -151,8 +177,32 @@ public bool Validate() /// /// public void Match( - global::System.Action? success = null, - global::System.Action? error = null, + global::System.Action? success = null, + + global::System.Action? error = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsSuccess) + { + success?.Invoke(Success!); + } + else if (IsError) + { + error?.Invoke(Error!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? success = null, + global::System.Action? error = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.ThinkingEvent.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ThinkingEvent.g.cs index eeeffbcd..08667f05 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.ThinkingEvent.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.ThinkingEvent.g.cs @@ -26,6 +26,19 @@ namespace Vectara #endif public bool IsAgentBase => AgentBase != null; + /// + /// + /// + public bool TryPickAgentBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.AgentEventBase? value) + { + value = AgentBase; + return IsAgentBase; + } + /// /// /// @@ -42,6 +55,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ThinkingEventVariant2))] #endif public bool IsThinkingEventVariant2 => ThinkingEventVariant2 != null; + + /// + /// + /// + public bool TryPickThinkingEventVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.ThinkingEventVariant2? value) + { + value = ThinkingEventVariant2; + return IsThinkingEventVariant2; + } /// /// /// @@ -118,8 +144,8 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? agentBase = null, - global::System.Func? thinkingEventVariant2 = null, + global::System.Func? agentBase = null, + global::System.Func? thinkingEventVariant2 = null, bool validate = true) { if (validate) @@ -143,8 +169,32 @@ public bool Validate() /// /// public void Match( - global::System.Action? agentBase = null, - global::System.Action? thinkingEventVariant2 = null, + global::System.Action? agentBase = null, + + global::System.Action? thinkingEventVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAgentBase) + { + agentBase?.Invoke(AgentBase!); + } + else if (IsThinkingEventVariant2) + { + thinkingEventVariant2?.Invoke(ThinkingEventVariant2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? agentBase = null, + global::System.Action? thinkingEventVariant2 = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.ThinkingTraceSpan.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ThinkingTraceSpan.g.cs index 946ec52f..67584e39 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.ThinkingTraceSpan.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.ThinkingTraceSpan.g.cs @@ -26,6 +26,19 @@ namespace Vectara #endif public bool IsAgentBase => AgentBase != null; + /// + /// + /// + public bool TryPickAgentBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.AgentTraceSpanBase? value) + { + value = AgentBase; + return IsAgentBase; + } + /// /// /// @@ -42,6 +55,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ThinkingTraceSpanVariant2))] #endif public bool IsThinkingTraceSpanVariant2 => ThinkingTraceSpanVariant2 != null; + + /// + /// + /// + public bool TryPickThinkingTraceSpanVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.ThinkingTraceSpanVariant2? value) + { + value = ThinkingTraceSpanVariant2; + return IsThinkingTraceSpanVariant2; + } /// /// /// @@ -118,8 +144,8 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? agentBase = null, - global::System.Func? thinkingTraceSpanVariant2 = null, + global::System.Func? agentBase = null, + global::System.Func? thinkingTraceSpanVariant2 = null, bool validate = true) { if (validate) @@ -143,8 +169,32 @@ public bool Validate() /// /// public void Match( - global::System.Action? agentBase = null, - global::System.Action? thinkingTraceSpanVariant2 = null, + global::System.Action? agentBase = null, + + global::System.Action? thinkingTraceSpanVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAgentBase) + { + agentBase?.Invoke(AgentBase!); + } + else if (IsThinkingTraceSpanVariant2) + { + thinkingTraceSpanVariant2?.Invoke(ThinkingTraceSpanVariant2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? agentBase = null, + global::System.Action? thinkingTraceSpanVariant2 = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.Tool.g.cs b/src/libs/Vectara/Generated/Vectara.Models.Tool.g.cs index a1becf4f..23b6683d 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.Tool.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.Tool.g.cs @@ -31,6 +31,19 @@ namespace Vectara #endif public bool IsDynamicVectara => DynamicVectara != null; + /// + /// + /// + public bool TryPickDynamicVectara( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.DynamicVectaraTool? value) + { + value = DynamicVectara; + return IsDynamicVectara; + } + /// /// An MCP (Model Context Protocol) tool that connects to external MCP servers for extended functionality. /// @@ -48,6 +61,19 @@ namespace Vectara #endif public bool IsMcp => Mcp != null; + /// + /// + /// + public bool TryPickMcp( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.McpTool? value) + { + value = Mcp; + return IsMcp; + } + /// /// A corpora search tool that searches through Vectara corpora to find relevant information. /// @@ -65,6 +91,19 @@ namespace Vectara #endif public bool IsCorporaSearch => CorporaSearch != null; + /// + /// + /// + public bool TryPickCorporaSearch( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.CorporaSearchTool? value) + { + value = CorporaSearch; + return IsCorporaSearch; + } + /// /// A web search tool that searches the internet for relevant information. /// @@ -82,6 +121,19 @@ namespace Vectara #endif public bool IsWebSearch => WebSearch != null; + /// + /// + /// + public bool TryPickWebSearch( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.WebSearchTool? value) + { + value = WebSearch; + return IsWebSearch; + } + /// /// A web get tool that fetches content from URLs using HTTP requests. /// @@ -99,6 +151,19 @@ namespace Vectara #endif public bool IsWebGet => WebGet != null; + /// + /// + /// + public bool TryPickWebGet( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.WebGetTool? value) + { + value = WebGet; + return IsWebGet; + } + /// /// A user-defined function that can be executed as a tool by agents.
/// Lambda tools run in a secure, sandboxed environment with resource limits.
@@ -118,6 +183,19 @@ namespace Vectara #endif public bool IsLambda => Lambda != null; + /// + /// + /// + public bool TryPickLambda( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.LambdaTool? value) + { + value = Lambda; + return IsLambda; + } + /// /// 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. @@ -136,6 +214,19 @@ namespace Vectara #endif public bool IsSubAgent => SubAgent != null; + /// + /// + /// + public bool TryPickSubAgent( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.SubAgentTool? value) + { + value = SubAgent; + return IsSubAgent; + } + /// /// A tool that creates artifacts from text or structured data content that can be stored and referenced later. /// @@ -153,6 +244,19 @@ namespace Vectara #endif public bool IsArtifactCreate => ArtifactCreate != null; + /// + /// + /// + public bool TryPickArtifactCreate( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.ArtifactCreateTool? value) + { + value = ArtifactCreate; + return IsArtifactCreate; + } + /// /// A tool that reads artifact content from the agent session workspace with flexible size and range options. /// @@ -170,6 +274,19 @@ namespace Vectara #endif public bool IsArtifactRead => ArtifactRead != null; + /// + /// + /// + public bool TryPickArtifactRead( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.ArtifactReadTool? value) + { + value = ArtifactRead; + return IsArtifactRead; + } + /// /// A tool that searches through an artifact's content using grep with support for all standard grep options. /// @@ -187,6 +304,19 @@ namespace Vectara #endif public bool IsArtifactGrep => ArtifactGrep != null; + /// + /// + /// + public bool TryPickArtifactGrep( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.ArtifactGrepTool? value) + { + value = ArtifactGrep; + return IsArtifactGrep; + } + /// /// A tool that loads image artifacts into the conversation context for viewing and analysis. /// @@ -204,6 +334,19 @@ namespace Vectara #endif public bool IsImageRead => ImageRead != null; + /// + /// + /// + public bool TryPickImageRead( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.ImageReadTool? value) + { + value = ImageRead; + return IsImageRead; + } + /// /// A tool that converts document artifacts (PDF, Word, PowerPoint, etc.) to various formats. /// @@ -221,6 +364,19 @@ namespace Vectara #endif public bool IsDocumentConversion => DocumentConversion != null; + /// + /// + /// + public bool TryPickDocumentConversion( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.DocumentConversionTool? value) + { + value = DocumentConversion; + return IsDocumentConversion; + } + /// /// A tool that fetches the full text content of a document from a corpus and stores it as an artifact. /// @@ -237,6 +393,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(GetDocumentText))] #endif public bool IsGetDocumentText => GetDocumentText != null; + + /// + /// + /// + public bool TryPickGetDocumentText( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.GetDocumentTextTool? value) + { + value = GetDocumentText; + return IsGetDocumentText; + } /// /// /// @@ -639,6 +808,96 @@ public bool Validate() ///
public void Match( global::System.Action? dynamicVectara = null, + + global::System.Action? mcp = null, + + global::System.Action? corporaSearch = null, + + global::System.Action? webSearch = null, + + global::System.Action? webGet = null, + + global::System.Action? lambda = null, + + global::System.Action? subAgent = null, + + global::System.Action? artifactCreate = null, + + global::System.Action? artifactRead = null, + + global::System.Action? artifactGrep = null, + + global::System.Action? imageRead = null, + + global::System.Action? documentConversion = null, + + global::System.Action? getDocumentText = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsDynamicVectara) + { + dynamicVectara?.Invoke(DynamicVectara!); + } + else if (IsMcp) + { + mcp?.Invoke(Mcp!); + } + else if (IsCorporaSearch) + { + corporaSearch?.Invoke(CorporaSearch!); + } + else if (IsWebSearch) + { + webSearch?.Invoke(WebSearch!); + } + else if (IsWebGet) + { + webGet?.Invoke(WebGet!); + } + else if (IsLambda) + { + lambda?.Invoke(Lambda!); + } + else if (IsSubAgent) + { + subAgent?.Invoke(SubAgent!); + } + else if (IsArtifactCreate) + { + artifactCreate?.Invoke(ArtifactCreate!); + } + else if (IsArtifactRead) + { + artifactRead?.Invoke(ArtifactRead!); + } + else if (IsArtifactGrep) + { + artifactGrep?.Invoke(ArtifactGrep!); + } + else if (IsImageRead) + { + imageRead?.Invoke(ImageRead!); + } + else if (IsDocumentConversion) + { + documentConversion?.Invoke(DocumentConversion!); + } + else if (IsGetDocumentText) + { + getDocumentText?.Invoke(GetDocumentText!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? dynamicVectara = null, global::System.Action? mcp = null, global::System.Action? corporaSearch = null, global::System.Action? webSearch = null, diff --git a/src/libs/Vectara/Generated/Vectara.Models.ToolInputEvent.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ToolInputEvent.g.cs index bcefb29c..cc555b4c 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.ToolInputEvent.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.ToolInputEvent.g.cs @@ -26,6 +26,19 @@ namespace Vectara #endif public bool IsAgentBase => AgentBase != null; + /// + /// + /// + public bool TryPickAgentBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.AgentEventBase? value) + { + value = AgentBase; + return IsAgentBase; + } + /// /// /// @@ -42,6 +55,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ToolInputEventVariant2))] #endif public bool IsToolInputEventVariant2 => ToolInputEventVariant2 != null; + + /// + /// + /// + public bool TryPickToolInputEventVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.ToolInputEventVariant2? value) + { + value = ToolInputEventVariant2; + return IsToolInputEventVariant2; + } /// /// /// @@ -118,8 +144,8 @@ public bool Validate() /// ///
public TResult? Match( - global::System.Func? agentBase = null, - global::System.Func? toolInputEventVariant2 = null, + global::System.Func? agentBase = null, + global::System.Func? toolInputEventVariant2 = null, bool validate = true) { if (validate) @@ -143,8 +169,32 @@ public bool Validate() /// /// public void Match( - global::System.Action? agentBase = null, - global::System.Action? toolInputEventVariant2 = null, + global::System.Action? agentBase = null, + + global::System.Action? toolInputEventVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAgentBase) + { + agentBase?.Invoke(AgentBase!); + } + else if (IsToolInputEventVariant2) + { + toolInputEventVariant2?.Invoke(ToolInputEventVariant2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? agentBase = null, + global::System.Action? toolInputEventVariant2 = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.ToolOutputEvent.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ToolOutputEvent.g.cs index 51fc2bb6..5191060c 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.ToolOutputEvent.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.ToolOutputEvent.g.cs @@ -26,6 +26,19 @@ namespace Vectara #endif public bool IsAgentBase => AgentBase != null; + /// + /// + /// + public bool TryPickAgentBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.AgentEventBase? value) + { + value = AgentBase; + return IsAgentBase; + } + /// /// /// @@ -42,6 +55,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ToolOutputEventVariant2))] #endif public bool IsToolOutputEventVariant2 => ToolOutputEventVariant2 != null; + + /// + /// + /// + public bool TryPickToolOutputEventVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.ToolOutputEventVariant2? value) + { + value = ToolOutputEventVariant2; + return IsToolOutputEventVariant2; + } /// /// /// @@ -118,8 +144,8 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? agentBase = null, - global::System.Func? toolOutputEventVariant2 = null, + global::System.Func? agentBase = null, + global::System.Func? toolOutputEventVariant2 = null, bool validate = true) { if (validate) @@ -143,8 +169,32 @@ public bool Validate() /// /// public void Match( - global::System.Action? agentBase = null, - global::System.Action? toolOutputEventVariant2 = null, + global::System.Action? agentBase = null, + + global::System.Action? toolOutputEventVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAgentBase) + { + agentBase?.Invoke(AgentBase!); + } + else if (IsToolOutputEventVariant2) + { + toolOutputEventVariant2?.Invoke(ToolOutputEventVariant2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? agentBase = null, + global::System.Action? toolOutputEventVariant2 = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.UpdateInstructionRequest.g.cs b/src/libs/Vectara/Generated/Vectara.Models.UpdateInstructionRequest.g.cs index 7a4ac84f..8fb4f9a7 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.UpdateInstructionRequest.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.UpdateInstructionRequest.g.cs @@ -30,6 +30,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Initial))] #endif public bool IsInitial => Initial != null; + + /// + /// + /// + public bool TryPickInitial( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.UpdateInitialInstructionRequest? value) + { + value = Initial; + return IsInitial; + } /// /// /// @@ -87,7 +100,7 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? initial = null, + global::System.Func? initial = null, bool validate = true) { if (validate) @@ -107,7 +120,25 @@ public bool Validate() /// /// public void Match( - global::System.Action? initial = null, + global::System.Action? initial = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsInitial) + { + initial?.Invoke(Initial!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? initial = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.UpdateLLMRequest.g.cs b/src/libs/Vectara/Generated/Vectara.Models.UpdateLLMRequest.g.cs index 1d412c24..1bfc0824 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.UpdateLLMRequest.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.UpdateLLMRequest.g.cs @@ -31,6 +31,19 @@ namespace Vectara #endif public bool IsOpenaiCompatible => OpenaiCompatible != null; + /// + /// + /// + public bool TryPickOpenaiCompatible( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.UpdateOpenAILLMRequest? value) + { + value = OpenaiCompatible; + return IsOpenaiCompatible; + } + /// /// Request to update an OpenAI Responses API Large Language Model connection. All fields are optional. /// @@ -48,6 +61,19 @@ namespace Vectara #endif public bool IsOpenaiResponses => OpenaiResponses != null; + /// + /// + /// + public bool TryPickOpenaiResponses( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.UpdateOpenAIResponsesLLMRequest? value) + { + value = OpenaiResponses; + return IsOpenaiResponses; + } + /// /// Request to update a Vertex AI Large Language Model connection. All fields are optional. /// @@ -65,6 +91,19 @@ namespace Vectara #endif public bool IsVertexAi => VertexAi != null; + /// + /// + /// + public bool TryPickVertexAi( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.UpdateVertexAILLMRequest? value) + { + value = VertexAi; + return IsVertexAi; + } + /// /// Request to update an Anthropic Large Language Model connection. All fields are optional. /// @@ -81,6 +120,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Anthropic))] #endif public bool IsAnthropic => Anthropic != null; + + /// + /// + /// + public bool TryPickAnthropic( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.UpdateAnthropicLLMRequest? value) + { + value = Anthropic; + return IsAnthropic; + } /// /// /// @@ -206,8 +258,8 @@ public bool Validate() public TResult? Match( global::System.Func? openaiCompatible = null, global::System.Func? openaiResponses = null, - global::System.Func? vertexAi = null, - global::System.Func? anthropic = null, + global::System.Func? vertexAi = null, + global::System.Func? anthropic = null, bool validate = true) { if (validate) @@ -240,9 +292,45 @@ public bool Validate() /// public void Match( global::System.Action? openaiCompatible = null, + + global::System.Action? openaiResponses = null, + + global::System.Action? vertexAi = null, + + global::System.Action? anthropic = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsOpenaiCompatible) + { + openaiCompatible?.Invoke(OpenaiCompatible!); + } + else if (IsOpenaiResponses) + { + openaiResponses?.Invoke(OpenaiResponses!); + } + else if (IsVertexAi) + { + vertexAi?.Invoke(VertexAi!); + } + else if (IsAnthropic) + { + anthropic?.Invoke(Anthropic!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? openaiCompatible = null, global::System.Action? openaiResponses = null, - global::System.Action? vertexAi = null, - global::System.Action? anthropic = null, + global::System.Action? vertexAi = null, + global::System.Action? anthropic = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.UpdateOpenAILLMRequest.g.cs b/src/libs/Vectara/Generated/Vectara.Models.UpdateOpenAILLMRequest.g.cs index 33cb8615..10a6b5ef 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.UpdateOpenAILLMRequest.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.UpdateOpenAILLMRequest.g.cs @@ -26,6 +26,19 @@ namespace Vectara #endif public bool IsBase => Base != null; + /// + /// + /// + public bool TryPickBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.OpenAILLMUpdateBase? value) + { + value = Base; + return IsBase; + } + /// /// /// @@ -42,6 +55,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(UpdateOpenAILLMRequestVariant2))] #endif public bool IsUpdateOpenAILLMRequestVariant2 => UpdateOpenAILLMRequestVariant2 != null; + + /// + /// + /// + public bool TryPickUpdateOpenAILLMRequestVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.UpdateOpenAILLMRequestVariant2? value) + { + value = UpdateOpenAILLMRequestVariant2; + return IsUpdateOpenAILLMRequestVariant2; + } /// /// /// @@ -118,8 +144,8 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? @base = null, - global::System.Func? updateOpenAILLMRequestVariant2 = null, + global::System.Func? @base = null, + global::System.Func? updateOpenAILLMRequestVariant2 = null, bool validate = true) { if (validate) @@ -143,8 +169,32 @@ public bool Validate() /// /// public void Match( - global::System.Action? @base = null, - global::System.Action? updateOpenAILLMRequestVariant2 = null, + global::System.Action? @base = null, + + global::System.Action? updateOpenAILLMRequestVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsBase) + { + @base?.Invoke(Base!); + } + else if (IsUpdateOpenAILLMRequestVariant2) + { + updateOpenAILLMRequestVariant2?.Invoke(UpdateOpenAILLMRequestVariant2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? @base = null, + global::System.Action? updateOpenAILLMRequestVariant2 = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.UpdateOpenAIResponsesLLMRequest.g.cs b/src/libs/Vectara/Generated/Vectara.Models.UpdateOpenAIResponsesLLMRequest.g.cs index 47571596..198273f8 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.UpdateOpenAIResponsesLLMRequest.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.UpdateOpenAIResponsesLLMRequest.g.cs @@ -26,6 +26,19 @@ namespace Vectara #endif public bool IsBase => Base != null; + /// + /// + /// + public bool TryPickBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.OpenAILLMUpdateBase? value) + { + value = Base; + return IsBase; + } + /// /// /// @@ -42,6 +55,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(UpdateOpenAIResponsesLLMRequestVariant2))] #endif public bool IsUpdateOpenAIResponsesLLMRequestVariant2 => UpdateOpenAIResponsesLLMRequestVariant2 != null; + + /// + /// + /// + public bool TryPickUpdateOpenAIResponsesLLMRequestVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.UpdateOpenAIResponsesLLMRequestVariant2? value) + { + value = UpdateOpenAIResponsesLLMRequestVariant2; + return IsUpdateOpenAIResponsesLLMRequestVariant2; + } /// /// /// @@ -118,8 +144,8 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? @base = null, - global::System.Func? updateOpenAIResponsesLLMRequestVariant2 = null, + global::System.Func? @base = null, + global::System.Func? updateOpenAIResponsesLLMRequestVariant2 = null, bool validate = true) { if (validate) @@ -143,8 +169,32 @@ public bool Validate() /// /// public void Match( - global::System.Action? @base = null, - global::System.Action? updateOpenAIResponsesLLMRequestVariant2 = null, + global::System.Action? @base = null, + + global::System.Action? updateOpenAIResponsesLLMRequestVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsBase) + { + @base?.Invoke(Base!); + } + else if (IsUpdateOpenAIResponsesLLMRequestVariant2) + { + updateOpenAIResponsesLLMRequestVariant2?.Invoke(UpdateOpenAIResponsesLLMRequestVariant2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? @base = null, + global::System.Action? updateOpenAIResponsesLLMRequestVariant2 = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.UpdatePipelineSource.g.cs b/src/libs/Vectara/Generated/Vectara.Models.UpdatePipelineSource.g.cs index 8e7b0c68..2b563259 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.UpdatePipelineSource.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.UpdatePipelineSource.g.cs @@ -30,6 +30,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(S3))] #endif public bool IsS3 => S3 != null; + + /// + /// + /// + public bool TryPickS3( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.UpdateS3SourceConfiguration? value) + { + value = S3; + return IsS3; + } /// /// /// @@ -121,6 +134,24 @@ public void Match( } } + /// + /// + /// + public void Switch( + global::System.Action? s3 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsS3) + { + s3?.Invoke(S3!); + } + } + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.UpdateS3SourceConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.Models.UpdateS3SourceConfiguration.g.cs index 5ca895e5..ce76f350 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.UpdateS3SourceConfiguration.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.UpdateS3SourceConfiguration.g.cs @@ -25,6 +25,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Base))] #endif public bool IsBase => Base != null; + + /// + /// + /// + public bool TryPickBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.BaseS3SourceConfiguration? value) + { + value = Base; + return IsBase; + } /// /// /// @@ -69,7 +82,7 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? @base = null, + global::System.Func? @base = null, bool validate = true) { if (validate) @@ -89,7 +102,25 @@ public bool Validate() /// /// public void Match( - global::System.Action? @base = null, + global::System.Action? @base = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsBase) + { + @base?.Invoke(Base!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? @base = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.UpdateToolRequest.g.cs b/src/libs/Vectara/Generated/Vectara.Models.UpdateToolRequest.g.cs index 6c4eded5..882ed5c5 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.UpdateToolRequest.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.UpdateToolRequest.g.cs @@ -31,6 +31,19 @@ namespace Vectara #endif public bool IsMcp => Mcp != null; + /// + /// + /// + public bool TryPickMcp( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.UpdateMcpToolRequest? value) + { + value = Mcp; + return IsMcp; + } + /// /// 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. @@ -48,6 +61,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Lambda))] #endif public bool IsLambda => Lambda != null; + + /// + /// + /// + public bool TryPickLambda( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.UpdateLambdaToolRequest? value) + { + value = Lambda; + return IsLambda; + } /// /// /// @@ -127,8 +153,8 @@ public bool Validate() /// ///
public TResult? Match( - global::System.Func? mcp = null, - global::System.Func? lambda = null, + global::System.Func? mcp = null, + global::System.Func? lambda = null, bool validate = true) { if (validate) @@ -152,8 +178,32 @@ public bool Validate() /// /// public void Match( - global::System.Action? mcp = null, - global::System.Action? lambda = null, + global::System.Action? mcp = null, + + global::System.Action? lambda = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsMcp) + { + mcp?.Invoke(Mcp!); + } + else if (IsLambda) + { + lambda?.Invoke(Lambda!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? mcp = null, + global::System.Action? lambda = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.VertexAiAuth.g.cs b/src/libs/Vectara/Generated/Vectara.Models.VertexAiAuth.g.cs index 46fa204c..048a2cd5 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.VertexAiAuth.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.VertexAiAuth.g.cs @@ -31,6 +31,19 @@ namespace Vectara #endif public bool IsApiKey => ApiKey != null; + /// + /// + /// + public bool TryPickApiKey( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.VertexAiApiKeyAuth? value) + { + value = ApiKey; + return IsApiKey; + } + /// /// Service account authentication for Vertex AI /// @@ -47,6 +60,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ServiceAccount))] #endif public bool IsServiceAccount => ServiceAccount != null; + + /// + /// + /// + public bool TryPickServiceAccount( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.VertexAiServiceAccountAuth? value) + { + value = ServiceAccount; + return IsServiceAccount; + } /// /// /// @@ -126,8 +152,8 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? apiKey = null, - global::System.Func? serviceAccount = null, + global::System.Func? apiKey = null, + global::System.Func? serviceAccount = null, bool validate = true) { if (validate) @@ -151,8 +177,32 @@ public bool Validate() /// /// public void Match( - global::System.Action? apiKey = null, - global::System.Action? serviceAccount = null, + global::System.Action? apiKey = null, + + global::System.Action? serviceAccount = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsApiKey) + { + apiKey?.Invoke(ApiKey!); + } + else if (IsServiceAccount) + { + serviceAccount?.Invoke(ServiceAccount!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? apiKey = null, + global::System.Action? serviceAccount = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.WebGetTool.g.cs b/src/libs/Vectara/Generated/Vectara.Models.WebGetTool.g.cs index 7cd1989d..2b1fe812 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.WebGetTool.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.WebGetTool.g.cs @@ -26,6 +26,19 @@ namespace Vectara #endif public bool IsBase => Base != null; + /// + /// + /// + public bool TryPickBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.ToolBase? value) + { + value = Base; + return IsBase; + } + /// /// /// @@ -42,6 +55,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(WebGetToolVariant2))] #endif public bool IsWebGetToolVariant2 => WebGetToolVariant2 != null; + + /// + /// + /// + public bool TryPickWebGetToolVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.WebGetToolVariant2? value) + { + value = WebGetToolVariant2; + return IsWebGetToolVariant2; + } /// /// /// @@ -118,8 +144,8 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? @base = null, - global::System.Func? webGetToolVariant2 = null, + global::System.Func? @base = null, + global::System.Func? webGetToolVariant2 = null, bool validate = true) { if (validate) @@ -143,8 +169,32 @@ public bool Validate() /// /// public void Match( - global::System.Action? @base = null, - global::System.Action? webGetToolVariant2 = null, + global::System.Action? @base = null, + + global::System.Action? webGetToolVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsBase) + { + @base?.Invoke(Base!); + } + else if (IsWebGetToolVariant2) + { + webGetToolVariant2?.Invoke(WebGetToolVariant2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? @base = null, + global::System.Action? webGetToolVariant2 = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.Models.WebSearchTool.g.cs b/src/libs/Vectara/Generated/Vectara.Models.WebSearchTool.g.cs index e1ac90d4..f0fd0245 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.WebSearchTool.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.WebSearchTool.g.cs @@ -26,6 +26,19 @@ namespace Vectara #endif public bool IsBase => Base != null; + /// + /// + /// + public bool TryPickBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.ToolBase? value) + { + value = Base; + return IsBase; + } + /// /// /// @@ -42,6 +55,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(WebSearchToolVariant2))] #endif public bool IsWebSearchToolVariant2 => WebSearchToolVariant2 != null; + + /// + /// + /// + public bool TryPickWebSearchToolVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.WebSearchToolVariant2? value) + { + value = WebSearchToolVariant2; + return IsWebSearchToolVariant2; + } /// /// /// @@ -118,8 +144,8 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? @base = null, - global::System.Func? webSearchToolVariant2 = null, + global::System.Func? @base = null, + global::System.Func? webSearchToolVariant2 = null, bool validate = true) { if (validate) @@ -143,8 +169,32 @@ public bool Validate() /// /// public void Match( - global::System.Action? @base = null, - global::System.Action? webSearchToolVariant2 = null, + global::System.Action? @base = null, + + global::System.Action? webSearchToolVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsBase) + { + @base?.Invoke(Base!); + } + else if (IsWebSearchToolVariant2) + { + webSearchToolVariant2?.Invoke(WebSearchToolVariant2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? @base = null, + global::System.Action? webSearchToolVariant2 = null, bool validate = true) { if (validate) diff --git a/src/libs/Vectara/Generated/Vectara.OneOf.2.g.cs b/src/libs/Vectara/Generated/Vectara.OneOf.2.g.cs index a48ae1fc..b0aea07c 100644 --- a/src/libs/Vectara/Generated/Vectara.OneOf.2.g.cs +++ b/src/libs/Vectara/Generated/Vectara.OneOf.2.g.cs @@ -25,6 +25,19 @@ namespace Vectara #endif public bool IsValue1 => Value1 != null; + /// + /// + /// + public bool TryPickValue1( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out T1? value) + { + value = Value1; + return IsValue1; + } + /// /// /// @@ -41,6 +54,19 @@ namespace Vectara [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] #endif public bool IsValue2 => Value2 != null; + + /// + /// + /// + public bool TryPickValue2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out T2? value) + { + value = Value2; + return IsValue2; + } /// /// /// @@ -143,6 +169,30 @@ public bool Validate() /// public void Match( global::System.Action? value1 = null, + + global::System.Action? value2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsValue1) + { + value1?.Invoke(Value1!); + } + else if (IsValue2) + { + value2?.Invoke(Value2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? value1 = null, global::System.Action? value2 = null, bool validate = true) { diff --git a/src/libs/Vectara/Generated/Vectara.VectaraClient.Constructors.ApiKeyInHeader.g.cs b/src/libs/Vectara/Generated/Vectara.VectaraClient.Constructors.ApiKeyInHeader.g.cs index 21075c2a..ad0a154f 100644 --- a/src/libs/Vectara/Generated/Vectara.VectaraClient.Constructors.ApiKeyInHeader.g.cs +++ b/src/libs/Vectara/Generated/Vectara.VectaraClient.Constructors.ApiKeyInHeader.g.cs @@ -26,5 +26,6 @@ partial void Authorizing( ref string apiKey); partial void Authorized( global::System.Net.Http.HttpClient client); + } } \ No newline at end of file