From da17d260c0e2a981b110e39544a1826d242d6bff Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 27 May 2026 04:17:14 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- .../Vectara.AgentSessionsClient.Create.g.cs | 6 +- .../Vectara.AgentsClient.Create.g.cs | 108 ++-- .../Vectara.CustomerMetricsClient.Get.g.cs | 20 +- .../Vectara.CustomerMetricsClient.List.g.cs | 20 +- .../Vectara.IAgentSessionsClient.Create.g.cs | 6 +- .../Vectara.IAgentsClient.Create.g.cs | 108 ++-- .../Vectara.ICustomerMetricsClient.Get.g.cs | 8 +- .../Vectara.ICustomerMetricsClient.List.g.cs | 4 + .../Vectara.IToolsClient.Create.g.cs | 4 +- .../Generated/Vectara.IVectaraClient.g.cs | 2 +- ...ara.JsonConverters.ArtifactCreateTool.g.cs | 1 + ...ctara.JsonConverters.ArtifactGrepTool.g.cs | 1 + ...ctara.JsonConverters.ArtifactReadTool.g.cs | 1 + ...tara.JsonConverters.CorporaSearchTool.g.cs | 1 + ...sonConverters.CounterMetricDescriptor.g.cs | 146 +++++ ...ra.JsonConverters.CounterMetricSeries.g.cs | 2 +- ...nverters.DistributionMetricDescriptor.g.cs | 147 +++++ ...onConverters.DistributionMetricSeries.g.cs | 2 +- ...JsonConverters.DocumentConversionTool.g.cs | 1 + ...ara.JsonConverters.DynamicVectaraTool.g.cs | 1 + ....JsonConverters.GaugeMetricDescriptor.g.cs | 146 +++++ ...tara.JsonConverters.GaugeMetricSeries.g.cs | 2 +- ...ra.JsonConverters.GetDocumentTextTool.g.cs | 1 + .../Vectara.JsonConverters.ImageReadTool.g.cs | 1 + ...InlineArtifactCreateToolConfiguration.g.cs | 1 + ...s.InlineArtifactGrepToolConfiguration.g.cs | 1 + ...s.InlineArtifactReadToolConfiguration.g.cs | 1 + ....InlineCorporaSearchToolConfiguration.g.cs | 1 + ...neDocumentConversionToolConfiguration.g.cs | 1 + ...InlineDynamicVectaraToolConfiguration.g.cs | 1 + ...nlineGetDocumentTextToolConfiguration.g.cs | 1 + ...ters.InlineImageReadToolConfiguration.g.cs | 1 + ...verters.InlineLambdaToolConfiguration.g.cs | 1 + ...Converters.InlineMcpToolConfiguration.g.cs | 1 + ...rters.InlineSubAgentToolConfiguration.g.cs | 1 + ...verters.InlineWebGetToolConfiguration.g.cs | 1 + ...ters.InlineWebSearchToolConfiguration.g.cs | 1 + .../Vectara.JsonConverters.LambdaTool.g.cs | 1 + .../Vectara.JsonConverters.McpTool.g.cs | 1 + ...ctara.JsonConverters.MetricDescriptor.g.cs | 102 ++++ ...rs.MetricDescriptorDiscriminatorKind.g.cs} | 14 +- ...cDescriptorDiscriminatorKindNullable.g.cs} | 14 +- ...onverters.PercentilesMetricDescriptor.g.cs | 147 +++++ ...sonConverters.PercentilesMetricSeries.g.cs | 2 +- .../Vectara.JsonConverters.SubAgentTool.g.cs | 1 + .../Vectara.JsonConverters.WebGetTool.g.cs | 1 + .../Vectara.JsonConverters.WebSearchTool.g.cs | 1 + .../Vectara.JsonSerializerContext.g.cs | 57 +- .../Vectara.JsonSerializerContextTypes.g.cs | 284 ++++++---- ...ara.Models.AgentToolConfigurationBase.g.cs | 54 +- ...ara.Models.ArtifactGrepToolParameters.g.cs | 2 +- ...ara.Models.ArtifactReadToolParameters.g.cs | 2 +- ...ra.Models.CorporaSearchToolParameters.g.cs | 2 +- ...a.Models.CounterMetricDescriptor.Json.g.cs | 92 ++++ ...ectara.Models.CounterMetricDescriptor.g.cs | 295 ++++++++++ ....CounterMetricDescriptorVariant2.Json.g.cs | 92 ++++ ...odels.CounterMetricDescriptorVariant2.g.cs | 48 ++ ...ra.Models.CounterMetricSeriesVariant2.g.cs | 5 +- ...Models.DistributionBinDescriptor.Json.g.cs | 92 ++++ ...tara.Models.DistributionBinDescriptor.g.cs | 70 +++ ...els.DistributionMetricDescriptor.Json.g.cs | 92 ++++ ...a.Models.DistributionMetricDescriptor.g.cs | 295 ++++++++++ ...ributionMetricDescriptorVariant2.Json.g.cs | 92 ++++ ....DistributionMetricDescriptorVariant2.g.cs | 60 ++ ...ectara.Models.DistributionMetricPoint.g.cs | 20 +- ...ctara.Models.DistributionMetricSeries.g.cs | 2 +- ...dels.DistributionMetricSeriesVariant2.g.cs | 5 +- ...dels.DocumentConversionToolParameters.g.cs | 2 +- ...ara.Models.GaugeMetricDescriptor.Json.g.cs | 92 ++++ .../Vectara.Models.GaugeMetricDescriptor.g.cs | 295 ++++++++++ ...ls.GaugeMetricDescriptorVariant2.Json.g.cs | 92 ++++ ....Models.GaugeMetricDescriptorVariant2.g.cs | 48 ++ ...tara.Models.GaugeMetricSeriesVariant2.g.cs | 5 +- ...tara.Models.GetDocumentTextParameters.g.cs | 2 +- .../Vectara.Models.HistogramBin.g.cs | 41 +- ...ectara.Models.ImageReadToolParameters.g.cs | 2 +- ...ArtifactGrepToolConfigurationVariant2.g.cs | 4 +- ...ArtifactReadToolConfigurationVariant2.g.cs | 4 +- ...orporaSearchToolConfigurationVariant2.g.cs | 4 +- ...ntConversionToolConfigurationVariant2.g.cs | 4 +- ...namicVectaraToolConfigurationVariant2.g.cs | 4 +- ...ConfigurationVariant2ArgumentOverride.g.cs | 2 +- ...DocumentTextToolConfigurationVariant2.g.cs | 4 +- ...ineImageReadToolConfigurationVariant2.g.cs | 4 +- ...ls.InlineMcpToolConfigurationVariant2.g.cs | 4 +- ...ConfigurationVariant2ArgumentOverride.g.cs | 2 +- ...lineSubAgentToolConfigurationVariant2.g.cs | 4 +- .../Vectara.Models.MetricDescriptor.Json.g.cs | 6 +- .../Vectara.Models.MetricDescriptor.g.cs | 503 ++++++++++++++--- ...tara.Models.MetricDescriptorBase.Json.g.cs | 92 ++++ .../Vectara.Models.MetricDescriptorBase.g.cs | 123 +++++ ...ls.MetricDescriptorDiscriminator.Json.g.cs | 92 ++++ ....Models.MetricDescriptorDiscriminator.g.cs | 45 ++ ...els.MetricDescriptorDiscriminatorKind.g.cs | 63 +++ .../Generated/Vectara.Models.MetricKind.g.cs | 67 --- .../Vectara.Models.MetricSeries.g.cs | 2 +- .../Vectara.Models.MetricSeriesBase.g.cs | 14 +- .../Vectara.Models.PercentileEntry.Json.g.cs | 92 ++++ .../Vectara.Models.PercentileEntry.g.cs | 59 ++ ...els.PercentilesMetricDescriptor.Json.g.cs} | 22 +- ...ra.Models.PercentilesMetricDescriptor.g.cs | 295 ++++++++++ ...centilesMetricDescriptorVariant2.Json.g.cs | 92 ++++ ...s.PercentilesMetricDescriptorVariant2.g.cs | 63 +++ ...Vectara.Models.PercentilesMetricPoint.g.cs | 24 +- ...els.PercentilesMetricPointPercentiles.g.cs | 19 - ...odels.PercentilesMetricSeriesVariant2.g.cs | 5 +- .../Vectara.Models.ScalarMetricPoint.g.cs | 20 +- .../Vectara.Models.SubAgentConfiguration.g.cs | 4 +- .../Vectara.Models.SubAgentSessionMode.g.cs | 4 +- ...Vectara.Models.SubAgentToolParameters.g.cs | 2 +- .../Generated/Vectara.Models.ToolBase.g.cs | 60 +- ...odels.ToolBaseDefaultArgumentOverride.g.cs | 2 +- .../Vectara.Models.UpdateAgentStep.g.cs | 4 +- .../Vectara.Models.UpdateFirstAgentStep.g.cs | 4 +- .../Generated/Vectara.Models.WebGetAuth.g.cs | 2 +- .../Vectara.Models.WebGetNoAuth.g.cs | 2 +- .../Generated/Vectara.ToolsClient.Create.g.cs | 4 +- .../Generated/Vectara.VectaraClient.g.cs | 2 +- src/libs/Vectara/openapi.yaml | 513 ++++++++++++------ 119 files changed, 4830 insertions(+), 787 deletions(-) create mode 100644 src/libs/Vectara/Generated/Vectara.JsonConverters.CounterMetricDescriptor.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.JsonConverters.DistributionMetricDescriptor.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.JsonConverters.GaugeMetricDescriptor.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.JsonConverters.MetricDescriptor.g.cs rename src/libs/Vectara/Generated/{Vectara.JsonConverters.MetricKind.g.cs => Vectara.JsonConverters.MetricDescriptorDiscriminatorKind.g.cs} (65%) rename src/libs/Vectara/Generated/{Vectara.JsonConverters.MetricKindNullable.g.cs => Vectara.JsonConverters.MetricDescriptorDiscriminatorKindNullable.g.cs} (67%) create mode 100644 src/libs/Vectara/Generated/Vectara.JsonConverters.PercentilesMetricDescriptor.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.CounterMetricDescriptor.Json.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.CounterMetricDescriptor.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.CounterMetricDescriptorVariant2.Json.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.CounterMetricDescriptorVariant2.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.DistributionBinDescriptor.Json.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.DistributionBinDescriptor.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.DistributionMetricDescriptor.Json.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.DistributionMetricDescriptor.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.DistributionMetricDescriptorVariant2.Json.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.DistributionMetricDescriptorVariant2.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.GaugeMetricDescriptor.Json.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.GaugeMetricDescriptor.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.GaugeMetricDescriptorVariant2.Json.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.GaugeMetricDescriptorVariant2.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.MetricDescriptorBase.Json.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.MetricDescriptorBase.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.MetricDescriptorDiscriminator.Json.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.MetricDescriptorDiscriminator.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.MetricDescriptorDiscriminatorKind.g.cs delete mode 100644 src/libs/Vectara/Generated/Vectara.Models.MetricKind.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.PercentileEntry.Json.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.PercentileEntry.g.cs rename src/libs/Vectara/Generated/{Vectara.Models.PercentilesMetricPointPercentiles.Json.g.cs => Vectara.Models.PercentilesMetricDescriptor.Json.g.cs} (86%) create mode 100644 src/libs/Vectara/Generated/Vectara.Models.PercentilesMetricDescriptor.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.PercentilesMetricDescriptorVariant2.Json.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.PercentilesMetricDescriptorVariant2.g.cs delete mode 100644 src/libs/Vectara/Generated/Vectara.Models.PercentilesMetricPointPercentiles.g.cs diff --git a/src/libs/Vectara/Generated/Vectara.AgentSessionsClient.Create.g.cs b/src/libs/Vectara/Generated/Vectara.AgentSessionsClient.Create.g.cs index 79bd0006..5667c5d7 100644 --- a/src/libs/Vectara/Generated/Vectara.AgentSessionsClient.Create.g.cs +++ b/src/libs/Vectara/Generated/Vectara.AgentSessionsClient.Create.g.cs @@ -65,7 +65,7 @@ partial void ProcessCreateResponseContent( /// /// Create agent session
- /// Create a new session for interacting with an agent. A session is the conversation container that maintains state across all messages, events, tool use, and agent responses.
+ /// Create a new session for interacting with an agent. A session maintains state across all events, tool use, and agent responses produced during the interaction.
/// This endpoint initializes the session and enables you to configure its initial properties, including optional metadata. Metadata can influence agent behavior, personalize responses, or apply access controls. Instructions and tools can also reference metadata using `${\session.metadata.field}` or `$\ref` syntax.
/// A session also serves as the workspace for artifacts, enabling file uploads and multi-step workflows. For more information, see [Working with artifacts in sessions](https://docs.vectara.com/docs/agent-os/sessions#working-with-artifacts-in-sessions).
/// ## Example request
@@ -117,7 +117,7 @@ partial void ProcessCreateResponseContent( } /// /// Create agent session
- /// Create a new session for interacting with an agent. A session is the conversation container that maintains state across all messages, events, tool use, and agent responses.
+ /// Create a new session for interacting with an agent. A session maintains state across all events, tool use, and agent responses produced during the interaction.
/// This endpoint initializes the session and enables you to configure its initial properties, including optional metadata. Metadata can influence agent behavior, personalize responses, or apply access controls. Instructions and tools can also reference metadata using `${\session.metadata.field}` or `$\ref` syntax.
/// A session also serves as the workspace for artifacts, enabling file uploads and multi-step workflows. For more information, see [Working with artifacts in sessions](https://docs.vectara.com/docs/agent-os/sessions#working-with-artifacts-in-sessions).
/// ## Example request
@@ -642,7 +642,7 @@ partial void ProcessCreateResponseContent( } /// /// Create agent session
- /// Create a new session for interacting with an agent. A session is the conversation container that maintains state across all messages, events, tool use, and agent responses.
+ /// Create a new session for interacting with an agent. A session maintains state across all events, tool use, and agent responses produced during the interaction.
/// This endpoint initializes the session and enables you to configure its initial properties, including optional metadata. Metadata can influence agent behavior, personalize responses, or apply access controls. Instructions and tools can also reference metadata using `${\session.metadata.field}` or `$\ref` syntax.
/// A session also serves as the workspace for artifacts, enabling file uploads and multi-step workflows. For more information, see [Working with artifacts in sessions](https://docs.vectara.com/docs/agent-os/sessions#working-with-artifacts-in-sessions).
/// ## Example request
diff --git a/src/libs/Vectara/Generated/Vectara.AgentsClient.Create.g.cs b/src/libs/Vectara/Generated/Vectara.AgentsClient.Create.g.cs index 7bb2c746..fb7641cc 100644 --- a/src/libs/Vectara/Generated/Vectara.AgentsClient.Create.g.cs +++ b/src/libs/Vectara/Generated/Vectara.AgentsClient.Create.g.cs @@ -63,30 +63,20 @@ partial void ProcessCreateResponseContent( /// /// Create agent
- /// Create a new agent. An agent is compromised as 3 main things of functionality:
- /// 1. The **instructions** an agent follows. Known as a system in prompt in other platforms.
- /// 2. The **steps** an agent follows when receiving an input.
- /// 3. The **tools** an agent can use to resolve those steps and instructions.
- /// Instructions are tied to each step, and should be precisely crafted so that the agent can perform the desired actions when given an input.
- /// :::tip Creating more precise instructions
- /// Be specific to exactly what you want the agent to do. For emphasis, use CAPS if you want the agent to follow a specific format. Negative prompts also help with precision such as saying **DO NOT DO THIS**.
- /// :::
- /// To use an agent, create a new session (called thread or chat in other platforms), and send new inputs to the agent to get responses.
- /// :::note
- /// Only a single step is supported with no follow up steps. So the `first_step` will be only the only step. We will add multiple steps and step types to execute complex workflows, but many agents can work well with a single step.
- /// :::
+ /// Creates an agent. An agent is defined by three things: the **instructions** it follows, the **steps** it executes when it receives an input, and the **tools** it can call. Instructions are attached to each step and determine the agent's behavior on that step.
+ /// Only a single step is currently supported. Set `first_step` to that step; additional step types will be added later.
+ /// To invoke an agent, create a session and send events to it. Each event produces a response from the agent.
/// ## LLM configuration
- /// Agents use LLMs for reasoning and response generation. You can configure the following:
- /// - **Model**: Choose from available models like GPT-4o.
- /// - **Parameters**: Adjust temperature, max tokens, and other model-specific settings.
- /// - **Cost optimization**: Balance performance with token usage.
- /// - **Retry configuration**: Configure automatic retry behavior for transient failures.
- /// ## Using retries to improve user experience
- /// When agents interact with LLMs, transient failures like network interruptions can disrupt communication between the agent and the LLM. You can configure your agent to resume disrupted communication to ensure a smooth user experience.
- /// - `max_retries`: After an error, the agent will retry its request to the LLM this many times.
- /// - `initial_backoff_ms`: This is how many milliseconds the agent will wait before retrying, to give the cause of the error time to resolve.
- /// - `backoff_factor`: Every time the agent retries, it can multiply the last retry delay by this number, increasing the wait between retries. This is like giving a toddler a longer and longer timeout if it continues to misbehave.
- /// - `max_backoff_ms`: The maximum time you want the agent to wait between retries, so the backoff_factor does not create an unreasonably long delay for your users. + /// Each agent is bound to one LLM, configured under `llm`:
+ /// - `llm_name`: the LLM resource to use (see `GET /v2/llms`).
+ /// - model parameters such as temperature and max tokens.
+ /// - retry configuration applied to LLM calls.
+ /// ## Retry configuration
+ /// The agent retries failed LLM calls using exponential backoff:
+ /// - `max_retries`: maximum number of retries after the initial call.
+ /// - `initial_backoff_ms`: delay in milliseconds before the first retry.
+ /// - `backoff_factor`: multiplier applied to the delay after each retry.
+ /// - `max_backoff_ms`: upper bound on the delay between retries. ///
/// /// @@ -115,30 +105,20 @@ partial void ProcessCreateResponseContent( } /// /// Create agent
- /// Create a new agent. An agent is compromised as 3 main things of functionality:
- /// 1. The **instructions** an agent follows. Known as a system in prompt in other platforms.
- /// 2. The **steps** an agent follows when receiving an input.
- /// 3. The **tools** an agent can use to resolve those steps and instructions.
- /// Instructions are tied to each step, and should be precisely crafted so that the agent can perform the desired actions when given an input.
- /// :::tip Creating more precise instructions
- /// Be specific to exactly what you want the agent to do. For emphasis, use CAPS if you want the agent to follow a specific format. Negative prompts also help with precision such as saying **DO NOT DO THIS**.
- /// :::
- /// To use an agent, create a new session (called thread or chat in other platforms), and send new inputs to the agent to get responses.
- /// :::note
- /// Only a single step is supported with no follow up steps. So the `first_step` will be only the only step. We will add multiple steps and step types to execute complex workflows, but many agents can work well with a single step.
- /// :::
+ /// Creates an agent. An agent is defined by three things: the **instructions** it follows, the **steps** it executes when it receives an input, and the **tools** it can call. Instructions are attached to each step and determine the agent's behavior on that step.
+ /// Only a single step is currently supported. Set `first_step` to that step; additional step types will be added later.
+ /// To invoke an agent, create a session and send events to it. Each event produces a response from the agent.
/// ## LLM configuration
- /// Agents use LLMs for reasoning and response generation. You can configure the following:
- /// - **Model**: Choose from available models like GPT-4o.
- /// - **Parameters**: Adjust temperature, max tokens, and other model-specific settings.
- /// - **Cost optimization**: Balance performance with token usage.
- /// - **Retry configuration**: Configure automatic retry behavior for transient failures.
- /// ## Using retries to improve user experience
- /// When agents interact with LLMs, transient failures like network interruptions can disrupt communication between the agent and the LLM. You can configure your agent to resume disrupted communication to ensure a smooth user experience.
- /// - `max_retries`: After an error, the agent will retry its request to the LLM this many times.
- /// - `initial_backoff_ms`: This is how many milliseconds the agent will wait before retrying, to give the cause of the error time to resolve.
- /// - `backoff_factor`: Every time the agent retries, it can multiply the last retry delay by this number, increasing the wait between retries. This is like giving a toddler a longer and longer timeout if it continues to misbehave.
- /// - `max_backoff_ms`: The maximum time you want the agent to wait between retries, so the backoff_factor does not create an unreasonably long delay for your users. + /// Each agent is bound to one LLM, configured under `llm`:
+ /// - `llm_name`: the LLM resource to use (see `GET /v2/llms`).
+ /// - model parameters such as temperature and max tokens.
+ /// - retry configuration applied to LLM calls.
+ /// ## Retry configuration
+ /// The agent retries failed LLM calls using exponential backoff:
+ /// - `max_retries`: maximum number of retries after the initial call.
+ /// - `initial_backoff_ms`: delay in milliseconds before the first retry.
+ /// - `backoff_factor`: multiplier applied to the delay after each retry.
+ /// - `max_backoff_ms`: upper bound on the delay between retries. ///
/// /// @@ -602,30 +582,20 @@ partial void ProcessCreateResponseContent( } /// /// Create agent
- /// Create a new agent. An agent is compromised as 3 main things of functionality:
- /// 1. The **instructions** an agent follows. Known as a system in prompt in other platforms.
- /// 2. The **steps** an agent follows when receiving an input.
- /// 3. The **tools** an agent can use to resolve those steps and instructions.
- /// Instructions are tied to each step, and should be precisely crafted so that the agent can perform the desired actions when given an input.
- /// :::tip Creating more precise instructions
- /// Be specific to exactly what you want the agent to do. For emphasis, use CAPS if you want the agent to follow a specific format. Negative prompts also help with precision such as saying **DO NOT DO THIS**.
- /// :::
- /// To use an agent, create a new session (called thread or chat in other platforms), and send new inputs to the agent to get responses.
- /// :::note
- /// Only a single step is supported with no follow up steps. So the `first_step` will be only the only step. We will add multiple steps and step types to execute complex workflows, but many agents can work well with a single step.
- /// :::
+ /// Creates an agent. An agent is defined by three things: the **instructions** it follows, the **steps** it executes when it receives an input, and the **tools** it can call. Instructions are attached to each step and determine the agent's behavior on that step.
+ /// Only a single step is currently supported. Set `first_step` to that step; additional step types will be added later.
+ /// To invoke an agent, create a session and send events to it. Each event produces a response from the agent.
/// ## LLM configuration
- /// Agents use LLMs for reasoning and response generation. You can configure the following:
- /// - **Model**: Choose from available models like GPT-4o.
- /// - **Parameters**: Adjust temperature, max tokens, and other model-specific settings.
- /// - **Cost optimization**: Balance performance with token usage.
- /// - **Retry configuration**: Configure automatic retry behavior for transient failures.
- /// ## Using retries to improve user experience
- /// When agents interact with LLMs, transient failures like network interruptions can disrupt communication between the agent and the LLM. You can configure your agent to resume disrupted communication to ensure a smooth user experience.
- /// - `max_retries`: After an error, the agent will retry its request to the LLM this many times.
- /// - `initial_backoff_ms`: This is how many milliseconds the agent will wait before retrying, to give the cause of the error time to resolve.
- /// - `backoff_factor`: Every time the agent retries, it can multiply the last retry delay by this number, increasing the wait between retries. This is like giving a toddler a longer and longer timeout if it continues to misbehave.
- /// - `max_backoff_ms`: The maximum time you want the agent to wait between retries, so the backoff_factor does not create an unreasonably long delay for your users. + /// Each agent is bound to one LLM, configured under `llm`:
+ /// - `llm_name`: the LLM resource to use (see `GET /v2/llms`).
+ /// - model parameters such as temperature and max tokens.
+ /// - retry configuration applied to LLM calls.
+ /// ## Retry configuration
+ /// The agent retries failed LLM calls using exponential backoff:
+ /// - `max_retries`: maximum number of retries after the initial call.
+ /// - `initial_backoff_ms`: delay in milliseconds before the first retry.
+ /// - `backoff_factor`: multiplier applied to the delay after each retry.
+ /// - `max_backoff_ms`: upper bound on the delay between retries. ///
/// /// diff --git a/src/libs/Vectara/Generated/Vectara.CustomerMetricsClient.Get.g.cs b/src/libs/Vectara/Generated/Vectara.CustomerMetricsClient.Get.g.cs index 97f427d9..34baa0ee 100644 --- a/src/libs/Vectara/Generated/Vectara.CustomerMetricsClient.Get.g.cs +++ b/src/libs/Vectara/Generated/Vectara.CustomerMetricsClient.Get.g.cs @@ -49,7 +49,7 @@ partial void PrepareGetArguments( global::System.Collections.Generic.Dictionary>? labels, ref global::System.DateTime start, ref global::System.DateTime end, - ref int? maxBuckets); + ref int? maxBins); partial void PrepareGetRequest( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpRequestMessage httpRequestMessage, @@ -59,7 +59,7 @@ partial void PrepareGetRequest( global::System.Collections.Generic.Dictionary>? labels, global::System.DateTime start, global::System.DateTime end, - int? maxBuckets); + int? maxBins); partial void ProcessGetResponse( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpResponseMessage httpResponseMessage); @@ -79,7 +79,7 @@ partial void ProcessGetResponseContent( /// /// /// - /// + /// /// Default Value: 60 /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. @@ -92,7 +92,7 @@ partial void ProcessGetResponseContent( int? requestTimeout = default, int? requestTimeoutMillis = default, global::System.Collections.Generic.Dictionary>? labels = default, - int? maxBuckets = default, + int? maxBins = default, global::Vectara.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) { @@ -103,7 +103,7 @@ partial void ProcessGetResponseContent( requestTimeout: requestTimeout, requestTimeoutMillis: requestTimeoutMillis, labels: labels, - maxBuckets: maxBuckets, + maxBins: maxBins, requestOptions: requestOptions, cancellationToken: cancellationToken ).ConfigureAwait(false); @@ -120,7 +120,7 @@ partial void ProcessGetResponseContent( /// /// /// - /// + /// /// Default Value: 60 /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. @@ -133,7 +133,7 @@ partial void ProcessGetResponseContent( int? requestTimeout = default, int? requestTimeoutMillis = default, global::System.Collections.Generic.Dictionary>? labels = default, - int? maxBuckets = default, + int? maxBins = default, global::Vectara.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) { @@ -147,7 +147,7 @@ partial void ProcessGetResponseContent( labels: labels, start: ref start, end: ref end, - maxBuckets: ref maxBuckets); + maxBins: ref maxBins); var __authorizations = global::Vectara.EndPointSecurityResolver.ResolveAuthorizations( @@ -179,7 +179,7 @@ partial void ProcessGetResponseContent( .AddOptionalParameter("labels", labels?.ToString()) .AddRequiredParameter("start", start.ToString("yyyy-MM-ddTHH:mm:ssZ")) .AddRequiredParameter("end", end.ToString("yyyy-MM-ddTHH:mm:ssZ")) - .AddOptionalParameter("max_buckets", maxBuckets?.ToString()) + .AddOptionalParameter("max_bins", maxBins?.ToString()) ; var __path = __pathBuilder.ToString(); __path = global::Vectara.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -237,7 +237,7 @@ partial void ProcessGetResponseContent( labels: labels, start: start!, end: end!, - maxBuckets: maxBuckets); + maxBins: maxBins); return __httpRequest; } diff --git a/src/libs/Vectara/Generated/Vectara.CustomerMetricsClient.List.g.cs b/src/libs/Vectara/Generated/Vectara.CustomerMetricsClient.List.g.cs index df28a71e..40cfce6b 100644 --- a/src/libs/Vectara/Generated/Vectara.CustomerMetricsClient.List.g.cs +++ b/src/libs/Vectara/Generated/Vectara.CustomerMetricsClient.List.g.cs @@ -44,12 +44,14 @@ public partial class CustomerMetricsClient partial void PrepareListArguments( global::System.Net.Http.HttpClient httpClient, ref int? requestTimeout, - ref int? requestTimeoutMillis); + ref int? requestTimeoutMillis, + global::System.Collections.Generic.IList? category); partial void PrepareListRequest( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpRequestMessage httpRequestMessage, int? requestTimeout, - int? requestTimeoutMillis); + int? requestTimeoutMillis, + global::System.Collections.Generic.IList? category); partial void ProcessListResponse( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpResponseMessage httpResponseMessage); @@ -65,18 +67,21 @@ partial void ProcessListResponseContent( ///
/// /// + /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task ListAsync( int? requestTimeout = default, int? requestTimeoutMillis = default, + global::System.Collections.Generic.IList? category = default, global::Vectara.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) { var __response = await ListAsResponseAsync( requestTimeout: requestTimeout, requestTimeoutMillis: requestTimeoutMillis, + category: category, requestOptions: requestOptions, cancellationToken: cancellationToken ).ConfigureAwait(false); @@ -89,12 +94,14 @@ partial void ProcessListResponseContent( ///
/// /// + /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task> ListAsResponseAsync( int? requestTimeout = default, int? requestTimeoutMillis = default, + global::System.Collections.Generic.IList? category = default, global::Vectara.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) { @@ -103,7 +110,8 @@ partial void ProcessListResponseContent( PrepareListArguments( httpClient: HttpClient, requestTimeout: ref requestTimeout, - requestTimeoutMillis: ref requestTimeoutMillis); + requestTimeoutMillis: ref requestTimeoutMillis, + category: category); var __authorizations = global::Vectara.EndPointSecurityResolver.ResolveAuthorizations( @@ -131,6 +139,9 @@ partial void ProcessListResponseContent( var __pathBuilder = new global::Vectara.PathBuilder( path: "/v2/metrics", baseUri: HttpClient.BaseAddress); + __pathBuilder + .AddOptionalParameter("category", category, delimiter: ",", explode: true) + ; var __path = __pathBuilder.ToString(); __path = global::Vectara.AutoSDKRequestOptionsSupport.AppendQueryParameters( path: __path, @@ -182,7 +193,8 @@ partial void ProcessListResponseContent( httpClient: HttpClient, httpRequestMessage: __httpRequest, requestTimeout: requestTimeout, - requestTimeoutMillis: requestTimeoutMillis); + requestTimeoutMillis: requestTimeoutMillis, + category: category); return __httpRequest; } diff --git a/src/libs/Vectara/Generated/Vectara.IAgentSessionsClient.Create.g.cs b/src/libs/Vectara/Generated/Vectara.IAgentSessionsClient.Create.g.cs index 47950c5d..ba494eb9 100644 --- a/src/libs/Vectara/Generated/Vectara.IAgentSessionsClient.Create.g.cs +++ b/src/libs/Vectara/Generated/Vectara.IAgentSessionsClient.Create.g.cs @@ -6,7 +6,7 @@ public partial interface IAgentSessionsClient { /// /// Create agent session
- /// Create a new session for interacting with an agent. A session is the conversation container that maintains state across all messages, events, tool use, and agent responses.
+ /// Create a new session for interacting with an agent. A session maintains state across all events, tool use, and agent responses produced during the interaction.
/// This endpoint initializes the session and enables you to configure its initial properties, including optional metadata. Metadata can influence agent behavior, personalize responses, or apply access controls. Instructions and tools can also reference metadata using `${\session.metadata.field}` or `$\ref` syntax.
/// A session also serves as the workspace for artifacts, enabling file uploads and multi-step workflows. For more information, see [Working with artifacts in sessions](https://docs.vectara.com/docs/agent-os/sessions#working-with-artifacts-in-sessions).
/// ## Example request
@@ -45,7 +45,7 @@ public partial interface IAgentSessionsClient global::System.Threading.CancellationToken cancellationToken = default); /// /// Create agent session
- /// Create a new session for interacting with an agent. A session is the conversation container that maintains state across all messages, events, tool use, and agent responses.
+ /// Create a new session for interacting with an agent. A session maintains state across all events, tool use, and agent responses produced during the interaction.
/// This endpoint initializes the session and enables you to configure its initial properties, including optional metadata. Metadata can influence agent behavior, personalize responses, or apply access controls. Instructions and tools can also reference metadata using `${\session.metadata.field}` or `$\ref` syntax.
/// A session also serves as the workspace for artifacts, enabling file uploads and multi-step workflows. For more information, see [Working with artifacts in sessions](https://docs.vectara.com/docs/agent-os/sessions#working-with-artifacts-in-sessions).
/// ## Example request
@@ -84,7 +84,7 @@ public partial interface IAgentSessionsClient global::System.Threading.CancellationToken cancellationToken = default); /// /// Create agent session
- /// Create a new session for interacting with an agent. A session is the conversation container that maintains state across all messages, events, tool use, and agent responses.
+ /// Create a new session for interacting with an agent. A session maintains state across all events, tool use, and agent responses produced during the interaction.
/// This endpoint initializes the session and enables you to configure its initial properties, including optional metadata. Metadata can influence agent behavior, personalize responses, or apply access controls. Instructions and tools can also reference metadata using `${\session.metadata.field}` or `$\ref` syntax.
/// A session also serves as the workspace for artifacts, enabling file uploads and multi-step workflows. For more information, see [Working with artifacts in sessions](https://docs.vectara.com/docs/agent-os/sessions#working-with-artifacts-in-sessions).
/// ## Example request
diff --git a/src/libs/Vectara/Generated/Vectara.IAgentsClient.Create.g.cs b/src/libs/Vectara/Generated/Vectara.IAgentsClient.Create.g.cs index 3098470d..dca5db1d 100644 --- a/src/libs/Vectara/Generated/Vectara.IAgentsClient.Create.g.cs +++ b/src/libs/Vectara/Generated/Vectara.IAgentsClient.Create.g.cs @@ -6,30 +6,20 @@ public partial interface IAgentsClient { /// /// Create agent
- /// Create a new agent. An agent is compromised as 3 main things of functionality:
- /// 1. The **instructions** an agent follows. Known as a system in prompt in other platforms.
- /// 2. The **steps** an agent follows when receiving an input.
- /// 3. The **tools** an agent can use to resolve those steps and instructions.
- /// Instructions are tied to each step, and should be precisely crafted so that the agent can perform the desired actions when given an input.
- /// :::tip Creating more precise instructions
- /// Be specific to exactly what you want the agent to do. For emphasis, use CAPS if you want the agent to follow a specific format. Negative prompts also help with precision such as saying **DO NOT DO THIS**.
- /// :::
- /// To use an agent, create a new session (called thread or chat in other platforms), and send new inputs to the agent to get responses.
- /// :::note
- /// Only a single step is supported with no follow up steps. So the `first_step` will be only the only step. We will add multiple steps and step types to execute complex workflows, but many agents can work well with a single step.
- /// :::
+ /// Creates an agent. An agent is defined by three things: the **instructions** it follows, the **steps** it executes when it receives an input, and the **tools** it can call. Instructions are attached to each step and determine the agent's behavior on that step.
+ /// Only a single step is currently supported. Set `first_step` to that step; additional step types will be added later.
+ /// To invoke an agent, create a session and send events to it. Each event produces a response from the agent.
/// ## LLM configuration
- /// Agents use LLMs for reasoning and response generation. You can configure the following:
- /// - **Model**: Choose from available models like GPT-4o.
- /// - **Parameters**: Adjust temperature, max tokens, and other model-specific settings.
- /// - **Cost optimization**: Balance performance with token usage.
- /// - **Retry configuration**: Configure automatic retry behavior for transient failures.
- /// ## Using retries to improve user experience
- /// When agents interact with LLMs, transient failures like network interruptions can disrupt communication between the agent and the LLM. You can configure your agent to resume disrupted communication to ensure a smooth user experience.
- /// - `max_retries`: After an error, the agent will retry its request to the LLM this many times.
- /// - `initial_backoff_ms`: This is how many milliseconds the agent will wait before retrying, to give the cause of the error time to resolve.
- /// - `backoff_factor`: Every time the agent retries, it can multiply the last retry delay by this number, increasing the wait between retries. This is like giving a toddler a longer and longer timeout if it continues to misbehave.
- /// - `max_backoff_ms`: The maximum time you want the agent to wait between retries, so the backoff_factor does not create an unreasonably long delay for your users. + /// Each agent is bound to one LLM, configured under `llm`:
+ /// - `llm_name`: the LLM resource to use (see `GET /v2/llms`).
+ /// - model parameters such as temperature and max tokens.
+ /// - retry configuration applied to LLM calls.
+ /// ## Retry configuration
+ /// The agent retries failed LLM calls using exponential backoff:
+ /// - `max_retries`: maximum number of retries after the initial call.
+ /// - `initial_backoff_ms`: delay in milliseconds before the first retry.
+ /// - `backoff_factor`: multiplier applied to the delay after each retry.
+ /// - `max_backoff_ms`: upper bound on the delay between retries. ///
/// /// @@ -46,30 +36,20 @@ public partial interface IAgentsClient global::System.Threading.CancellationToken cancellationToken = default); /// /// Create agent
- /// Create a new agent. An agent is compromised as 3 main things of functionality:
- /// 1. The **instructions** an agent follows. Known as a system in prompt in other platforms.
- /// 2. The **steps** an agent follows when receiving an input.
- /// 3. The **tools** an agent can use to resolve those steps and instructions.
- /// Instructions are tied to each step, and should be precisely crafted so that the agent can perform the desired actions when given an input.
- /// :::tip Creating more precise instructions
- /// Be specific to exactly what you want the agent to do. For emphasis, use CAPS if you want the agent to follow a specific format. Negative prompts also help with precision such as saying **DO NOT DO THIS**.
- /// :::
- /// To use an agent, create a new session (called thread or chat in other platforms), and send new inputs to the agent to get responses.
- /// :::note
- /// Only a single step is supported with no follow up steps. So the `first_step` will be only the only step. We will add multiple steps and step types to execute complex workflows, but many agents can work well with a single step.
- /// :::
+ /// Creates an agent. An agent is defined by three things: the **instructions** it follows, the **steps** it executes when it receives an input, and the **tools** it can call. Instructions are attached to each step and determine the agent's behavior on that step.
+ /// Only a single step is currently supported. Set `first_step` to that step; additional step types will be added later.
+ /// To invoke an agent, create a session and send events to it. Each event produces a response from the agent.
/// ## LLM configuration
- /// Agents use LLMs for reasoning and response generation. You can configure the following:
- /// - **Model**: Choose from available models like GPT-4o.
- /// - **Parameters**: Adjust temperature, max tokens, and other model-specific settings.
- /// - **Cost optimization**: Balance performance with token usage.
- /// - **Retry configuration**: Configure automatic retry behavior for transient failures.
- /// ## Using retries to improve user experience
- /// When agents interact with LLMs, transient failures like network interruptions can disrupt communication between the agent and the LLM. You can configure your agent to resume disrupted communication to ensure a smooth user experience.
- /// - `max_retries`: After an error, the agent will retry its request to the LLM this many times.
- /// - `initial_backoff_ms`: This is how many milliseconds the agent will wait before retrying, to give the cause of the error time to resolve.
- /// - `backoff_factor`: Every time the agent retries, it can multiply the last retry delay by this number, increasing the wait between retries. This is like giving a toddler a longer and longer timeout if it continues to misbehave.
- /// - `max_backoff_ms`: The maximum time you want the agent to wait between retries, so the backoff_factor does not create an unreasonably long delay for your users. + /// Each agent is bound to one LLM, configured under `llm`:
+ /// - `llm_name`: the LLM resource to use (see `GET /v2/llms`).
+ /// - model parameters such as temperature and max tokens.
+ /// - retry configuration applied to LLM calls.
+ /// ## Retry configuration
+ /// The agent retries failed LLM calls using exponential backoff:
+ /// - `max_retries`: maximum number of retries after the initial call.
+ /// - `initial_backoff_ms`: delay in milliseconds before the first retry.
+ /// - `backoff_factor`: multiplier applied to the delay after each retry.
+ /// - `max_backoff_ms`: upper bound on the delay between retries. ///
/// /// @@ -86,30 +66,20 @@ public partial interface IAgentsClient global::System.Threading.CancellationToken cancellationToken = default); /// /// Create agent
- /// Create a new agent. An agent is compromised as 3 main things of functionality:
- /// 1. The **instructions** an agent follows. Known as a system in prompt in other platforms.
- /// 2. The **steps** an agent follows when receiving an input.
- /// 3. The **tools** an agent can use to resolve those steps and instructions.
- /// Instructions are tied to each step, and should be precisely crafted so that the agent can perform the desired actions when given an input.
- /// :::tip Creating more precise instructions
- /// Be specific to exactly what you want the agent to do. For emphasis, use CAPS if you want the agent to follow a specific format. Negative prompts also help with precision such as saying **DO NOT DO THIS**.
- /// :::
- /// To use an agent, create a new session (called thread or chat in other platforms), and send new inputs to the agent to get responses.
- /// :::note
- /// Only a single step is supported with no follow up steps. So the `first_step` will be only the only step. We will add multiple steps and step types to execute complex workflows, but many agents can work well with a single step.
- /// :::
+ /// Creates an agent. An agent is defined by three things: the **instructions** it follows, the **steps** it executes when it receives an input, and the **tools** it can call. Instructions are attached to each step and determine the agent's behavior on that step.
+ /// Only a single step is currently supported. Set `first_step` to that step; additional step types will be added later.
+ /// To invoke an agent, create a session and send events to it. Each event produces a response from the agent.
/// ## LLM configuration
- /// Agents use LLMs for reasoning and response generation. You can configure the following:
- /// - **Model**: Choose from available models like GPT-4o.
- /// - **Parameters**: Adjust temperature, max tokens, and other model-specific settings.
- /// - **Cost optimization**: Balance performance with token usage.
- /// - **Retry configuration**: Configure automatic retry behavior for transient failures.
- /// ## Using retries to improve user experience
- /// When agents interact with LLMs, transient failures like network interruptions can disrupt communication between the agent and the LLM. You can configure your agent to resume disrupted communication to ensure a smooth user experience.
- /// - `max_retries`: After an error, the agent will retry its request to the LLM this many times.
- /// - `initial_backoff_ms`: This is how many milliseconds the agent will wait before retrying, to give the cause of the error time to resolve.
- /// - `backoff_factor`: Every time the agent retries, it can multiply the last retry delay by this number, increasing the wait between retries. This is like giving a toddler a longer and longer timeout if it continues to misbehave.
- /// - `max_backoff_ms`: The maximum time you want the agent to wait between retries, so the backoff_factor does not create an unreasonably long delay for your users. + /// Each agent is bound to one LLM, configured under `llm`:
+ /// - `llm_name`: the LLM resource to use (see `GET /v2/llms`).
+ /// - model parameters such as temperature and max tokens.
+ /// - retry configuration applied to LLM calls.
+ /// ## Retry configuration
+ /// The agent retries failed LLM calls using exponential backoff:
+ /// - `max_retries`: maximum number of retries after the initial call.
+ /// - `initial_backoff_ms`: delay in milliseconds before the first retry.
+ /// - `backoff_factor`: multiplier applied to the delay after each retry.
+ /// - `max_backoff_ms`: upper bound on the delay between retries. ///
/// /// diff --git a/src/libs/Vectara/Generated/Vectara.ICustomerMetricsClient.Get.g.cs b/src/libs/Vectara/Generated/Vectara.ICustomerMetricsClient.Get.g.cs index 17d728bd..30c26a6f 100644 --- a/src/libs/Vectara/Generated/Vectara.ICustomerMetricsClient.Get.g.cs +++ b/src/libs/Vectara/Generated/Vectara.ICustomerMetricsClient.Get.g.cs @@ -14,7 +14,7 @@ public partial interface ICustomerMetricsClient /// /// /// - /// + /// /// Default Value: 60 /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. @@ -27,7 +27,7 @@ public partial interface ICustomerMetricsClient int? requestTimeout = default, int? requestTimeoutMillis = default, global::System.Collections.Generic.Dictionary>? labels = default, - int? maxBuckets = default, + int? maxBins = default, global::Vectara.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); /// @@ -40,7 +40,7 @@ public partial interface ICustomerMetricsClient /// /// /// - /// + /// /// Default Value: 60 /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. @@ -53,7 +53,7 @@ public partial interface ICustomerMetricsClient int? requestTimeout = default, int? requestTimeoutMillis = default, global::System.Collections.Generic.Dictionary>? labels = default, - int? maxBuckets = default, + int? maxBins = default, global::Vectara.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); } diff --git a/src/libs/Vectara/Generated/Vectara.ICustomerMetricsClient.List.g.cs b/src/libs/Vectara/Generated/Vectara.ICustomerMetricsClient.List.g.cs index 5f4889c1..2f4e99b1 100644 --- a/src/libs/Vectara/Generated/Vectara.ICustomerMetricsClient.List.g.cs +++ b/src/libs/Vectara/Generated/Vectara.ICustomerMetricsClient.List.g.cs @@ -10,12 +10,14 @@ public partial interface ICustomerMetricsClient /// /// /// + /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// global::System.Threading.Tasks.Task ListAsync( int? requestTimeout = default, int? requestTimeoutMillis = default, + global::System.Collections.Generic.IList? category = default, global::Vectara.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); /// @@ -24,12 +26,14 @@ public partial interface ICustomerMetricsClient /// /// /// + /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// global::System.Threading.Tasks.Task> ListAsResponseAsync( int? requestTimeout = default, int? requestTimeoutMillis = default, + global::System.Collections.Generic.IList? category = default, global::Vectara.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); } diff --git a/src/libs/Vectara/Generated/Vectara.IToolsClient.Create.g.cs b/src/libs/Vectara/Generated/Vectara.IToolsClient.Create.g.cs index 83cb6589..fdd60509 100644 --- a/src/libs/Vectara/Generated/Vectara.IToolsClient.Create.g.cs +++ b/src/libs/Vectara/Generated/Vectara.IToolsClient.Create.g.cs @@ -6,7 +6,7 @@ public partial interface IToolsClient { /// /// Create tool
- /// Create a new tool that agents can use during conversation. Tools give agents capabilities to interact with external systems, process data, query corpora, or run custom logic. Agents select and invoke tools dynamically based on their instructions and the conversational context.
+ /// Create a new tool that agents can call. Tools give agents capabilities to interact with external systems, process data, query corpora, or run custom logic. Agents select and invoke tools dynamically based on their instructions and the current session.
/// Vectara provides several built-in tools, but you can also create your own. This endpoint currently supports creating **Lambda tools**, which run user-defined Python functions in a secure sandbox.
/// Each tool is defined by:
/// - A unique tool ID
@@ -34,7 +34,7 @@ public partial interface IToolsClient global::System.Threading.CancellationToken cancellationToken = default); /// /// Create tool
- /// Create a new tool that agents can use during conversation. Tools give agents capabilities to interact with external systems, process data, query corpora, or run custom logic. Agents select and invoke tools dynamically based on their instructions and the conversational context.
+ /// Create a new tool that agents can call. Tools give agents capabilities to interact with external systems, process data, query corpora, or run custom logic. Agents select and invoke tools dynamically based on their instructions and the current session.
/// Vectara provides several built-in tools, but you can also create your own. This endpoint currently supports creating **Lambda tools**, which run user-defined Python functions in a secure sandbox.
/// Each tool is defined by:
/// - A unique tool ID
diff --git a/src/libs/Vectara/Generated/Vectara.IVectaraClient.g.cs b/src/libs/Vectara/Generated/Vectara.IVectaraClient.g.cs index 92158ef7..6e6f48fd 100644 --- a/src/libs/Vectara/Generated/Vectara.IVectaraClient.g.cs +++ b/src/libs/Vectara/Generated/Vectara.IVectaraClient.g.cs @@ -7,7 +7,7 @@ namespace Vectara /// The Vectara Platform to context engineer Enterprise Agents. The REST API gives you server-side control with enterprise-grade RBAC, multi-tenancy, and full observability. Build agents that combine Vectara's multimodal retrieval with tool use, structured instructions, and managed sessions — all through simple REST endpoints.
/// All endpoints live at `https://api.vectara.io/v2/<resource>` using lowercase, hyphenated paths (e.g. `/corpora/:corpus_key/documents`).
/// ## API conventions
- /// We follow standard REST conventions: `GET` to read, `POST` to create, `PATCH` to update, `PUT` to replace, and `DELETE` to remove. Actions that don't map to CRUD verbs use a separate `POST /<resource>/<action>` path (e.g. `POST /corpora/:corpus_key/reset`).
+ /// We follow standard REST conventions: `GET` to read, `POST` to create, `PUT` to replace, and `DELETE` to remove. A small number of endpoints use `PATCH` for partial update; most updates use `PUT`. Actions that don't map to CRUD verbs use a separate `POST /<resource>/<action>` path (e.g. `POST /corpora/:corpus_key/reset`).
/// **Backward compatibility** — New fields may be added to any response at any time. Fields are never removed, only deprecated. Clients should ignore unknown fields. We aim for strong backward compatibility, though the agentic AI space is evolving rapidly and agent-related APIs may see more frequent additions.
/// ## Authentication methods
/// Every API request must be authenticated using one of these methods:
diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.ArtifactCreateTool.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.ArtifactCreateTool.g.cs index 0c6d998f..aef20df1 100644 --- a/src/libs/Vectara/Generated/Vectara.JsonConverters.ArtifactCreateTool.g.cs +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.ArtifactCreateTool.g.cs @@ -31,6 +31,7 @@ public class ArtifactCreateToolJsonConverter : global::System.Text.Json.Serializ if (__jsonProps.Contains("category")) __score0++; if (__jsonProps.Contains("created_at")) __score0++; if (__jsonProps.Contains("default_argument_override")) __score0++; + if (__jsonProps.Contains("default_input_transform")) __score0++; if (__jsonProps.Contains("default_output_transform")) __score0++; if (__jsonProps.Contains("description")) __score0++; if (__jsonProps.Contains("description_template")) __score0++; diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.ArtifactGrepTool.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.ArtifactGrepTool.g.cs index 6b388216..09d8861e 100644 --- a/src/libs/Vectara/Generated/Vectara.JsonConverters.ArtifactGrepTool.g.cs +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.ArtifactGrepTool.g.cs @@ -31,6 +31,7 @@ public class ArtifactGrepToolJsonConverter : global::System.Text.Json.Serializat if (__jsonProps.Contains("category")) __score0++; if (__jsonProps.Contains("created_at")) __score0++; if (__jsonProps.Contains("default_argument_override")) __score0++; + if (__jsonProps.Contains("default_input_transform")) __score0++; if (__jsonProps.Contains("default_output_transform")) __score0++; if (__jsonProps.Contains("description")) __score0++; if (__jsonProps.Contains("description_template")) __score0++; diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.ArtifactReadTool.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.ArtifactReadTool.g.cs index 2695d5d7..e5541b7c 100644 --- a/src/libs/Vectara/Generated/Vectara.JsonConverters.ArtifactReadTool.g.cs +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.ArtifactReadTool.g.cs @@ -31,6 +31,7 @@ public class ArtifactReadToolJsonConverter : global::System.Text.Json.Serializat if (__jsonProps.Contains("category")) __score0++; if (__jsonProps.Contains("created_at")) __score0++; if (__jsonProps.Contains("default_argument_override")) __score0++; + if (__jsonProps.Contains("default_input_transform")) __score0++; if (__jsonProps.Contains("default_output_transform")) __score0++; if (__jsonProps.Contains("description")) __score0++; if (__jsonProps.Contains("description_template")) __score0++; diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.CorporaSearchTool.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.CorporaSearchTool.g.cs index 422f2a54..c308d256 100644 --- a/src/libs/Vectara/Generated/Vectara.JsonConverters.CorporaSearchTool.g.cs +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.CorporaSearchTool.g.cs @@ -31,6 +31,7 @@ public class CorporaSearchToolJsonConverter : global::System.Text.Json.Serializa if (__jsonProps.Contains("category")) __score0++; if (__jsonProps.Contains("created_at")) __score0++; if (__jsonProps.Contains("default_argument_override")) __score0++; + if (__jsonProps.Contains("default_input_transform")) __score0++; if (__jsonProps.Contains("default_output_transform")) __score0++; if (__jsonProps.Contains("description")) __score0++; if (__jsonProps.Contains("description_template")) __score0++; diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.CounterMetricDescriptor.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.CounterMetricDescriptor.g.cs new file mode 100644 index 00000000..8be57cc4 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.CounterMetricDescriptor.g.cs @@ -0,0 +1,146 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace Vectara.JsonConverters +{ + /// + public class CounterMetricDescriptorJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Vectara.CounterMetricDescriptor Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader); + var __rawJson = __jsonDocument.RootElement.GetRawText(); + var __jsonProps = new global::System.Collections.Generic.HashSet(); + if (__jsonDocument.RootElement.ValueKind == global::System.Text.Json.JsonValueKind.Object) + { + foreach (var __jsonProp in __jsonDocument.RootElement.EnumerateObject()) + { + __jsonProps.Add(__jsonProp.Name); + + } + } + + var __score0 = 0; + if (__jsonProps.Contains("category")) __score0++; + if (__jsonProps.Contains("description")) __score0++; + if (__jsonProps.Contains("display_name")) __score0++; + if (__jsonProps.Contains("labels")) __score0++; + if (__jsonProps.Contains("name")) __score0++; + if (__jsonProps.Contains("unit")) __score0++; + var __score1 = 0; + if (__jsonProps.Contains("kind")) __score1++; + var __bestScore = 0; + var __bestIndex = -1; + if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; } + if (__score1 > __bestScore) { __bestScore = __score1; __bestIndex = 1; } + + global::Vectara.MetricDescriptorBase? @base = default; + global::Vectara.CounterMetricDescriptorVariant2? counterMetricDescriptorVariant2 = default; + if (__bestIndex >= 0) + { + if (__bestIndex == 0) + { + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.MetricDescriptorBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.MetricDescriptorBase).Name}"); + @base = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + else if (__bestIndex == 1) + { + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.CounterMetricDescriptorVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.CounterMetricDescriptorVariant2).Name}"); + counterMetricDescriptorVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + } + + if (@base == null && counterMetricDescriptorVariant2 == null) + { + try + { + + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.MetricDescriptorBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.MetricDescriptorBase).Name}"); + @base = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + + if (@base == null && counterMetricDescriptorVariant2 == null) + { + try + { + + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.CounterMetricDescriptorVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.CounterMetricDescriptorVariant2).Name}"); + counterMetricDescriptorVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + + var __value = new global::Vectara.CounterMetricDescriptor( + @base, + + counterMetricDescriptorVariant2 + ); + + return __value; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Vectara.CounterMetricDescriptor value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + if (value.IsBase) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.MetricDescriptorBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.MetricDescriptorBase).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Base!, typeInfo); + } + else if (value.IsCounterMetricDescriptorVariant2) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.CounterMetricDescriptorVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.CounterMetricDescriptorVariant2).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.CounterMetricDescriptorVariant2!, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.CounterMetricSeries.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.CounterMetricSeries.g.cs index 43565b0a..0d6652de 100644 --- a/src/libs/Vectara/Generated/Vectara.JsonConverters.CounterMetricSeries.g.cs +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.CounterMetricSeries.g.cs @@ -28,7 +28,7 @@ public class CounterMetricSeriesJsonConverter : global::System.Text.Json.Seriali } var __score0 = 0; - if (__jsonProps.Contains("bucket_size_seconds")) __score0++; + if (__jsonProps.Contains("bin_size_seconds")) __score0++; if (__jsonProps.Contains("labels")) __score0++; if (__jsonProps.Contains("metric_name")) __score0++; var __score1 = 0; diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.DistributionMetricDescriptor.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.DistributionMetricDescriptor.g.cs new file mode 100644 index 00000000..b1189d47 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.DistributionMetricDescriptor.g.cs @@ -0,0 +1,147 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace Vectara.JsonConverters +{ + /// + public class DistributionMetricDescriptorJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Vectara.DistributionMetricDescriptor Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader); + var __rawJson = __jsonDocument.RootElement.GetRawText(); + var __jsonProps = new global::System.Collections.Generic.HashSet(); + if (__jsonDocument.RootElement.ValueKind == global::System.Text.Json.JsonValueKind.Object) + { + foreach (var __jsonProp in __jsonDocument.RootElement.EnumerateObject()) + { + __jsonProps.Add(__jsonProp.Name); + + } + } + + var __score0 = 0; + if (__jsonProps.Contains("category")) __score0++; + if (__jsonProps.Contains("description")) __score0++; + if (__jsonProps.Contains("display_name")) __score0++; + if (__jsonProps.Contains("labels")) __score0++; + if (__jsonProps.Contains("name")) __score0++; + if (__jsonProps.Contains("unit")) __score0++; + var __score1 = 0; + if (__jsonProps.Contains("bins")) __score1++; + if (__jsonProps.Contains("kind")) __score1++; + var __bestScore = 0; + var __bestIndex = -1; + if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; } + if (__score1 > __bestScore) { __bestScore = __score1; __bestIndex = 1; } + + global::Vectara.MetricDescriptorBase? @base = default; + global::Vectara.DistributionMetricDescriptorVariant2? distributionMetricDescriptorVariant2 = default; + if (__bestIndex >= 0) + { + if (__bestIndex == 0) + { + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.MetricDescriptorBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.MetricDescriptorBase).Name}"); + @base = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + else if (__bestIndex == 1) + { + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.DistributionMetricDescriptorVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.DistributionMetricDescriptorVariant2).Name}"); + distributionMetricDescriptorVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + } + + if (@base == null && distributionMetricDescriptorVariant2 == null) + { + try + { + + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.MetricDescriptorBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.MetricDescriptorBase).Name}"); + @base = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + + if (@base == null && distributionMetricDescriptorVariant2 == null) + { + try + { + + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.DistributionMetricDescriptorVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.DistributionMetricDescriptorVariant2).Name}"); + distributionMetricDescriptorVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + + var __value = new global::Vectara.DistributionMetricDescriptor( + @base, + + distributionMetricDescriptorVariant2 + ); + + return __value; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Vectara.DistributionMetricDescriptor value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + if (value.IsBase) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.MetricDescriptorBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.MetricDescriptorBase).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Base!, typeInfo); + } + else if (value.IsDistributionMetricDescriptorVariant2) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.DistributionMetricDescriptorVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.DistributionMetricDescriptorVariant2).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.DistributionMetricDescriptorVariant2!, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.DistributionMetricSeries.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.DistributionMetricSeries.g.cs index 6166ecda..e981a3d9 100644 --- a/src/libs/Vectara/Generated/Vectara.JsonConverters.DistributionMetricSeries.g.cs +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.DistributionMetricSeries.g.cs @@ -28,7 +28,7 @@ public class DistributionMetricSeriesJsonConverter : global::System.Text.Json.Se } var __score0 = 0; - if (__jsonProps.Contains("bucket_size_seconds")) __score0++; + if (__jsonProps.Contains("bin_size_seconds")) __score0++; if (__jsonProps.Contains("labels")) __score0++; if (__jsonProps.Contains("metric_name")) __score0++; var __score1 = 0; diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.DocumentConversionTool.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.DocumentConversionTool.g.cs index c3e79f92..58dc942c 100644 --- a/src/libs/Vectara/Generated/Vectara.JsonConverters.DocumentConversionTool.g.cs +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.DocumentConversionTool.g.cs @@ -31,6 +31,7 @@ public class DocumentConversionToolJsonConverter : global::System.Text.Json.Seri if (__jsonProps.Contains("category")) __score0++; if (__jsonProps.Contains("created_at")) __score0++; if (__jsonProps.Contains("default_argument_override")) __score0++; + if (__jsonProps.Contains("default_input_transform")) __score0++; if (__jsonProps.Contains("default_output_transform")) __score0++; if (__jsonProps.Contains("description")) __score0++; if (__jsonProps.Contains("description_template")) __score0++; diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.DynamicVectaraTool.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.DynamicVectaraTool.g.cs index 4571f9e6..407bc0e3 100644 --- a/src/libs/Vectara/Generated/Vectara.JsonConverters.DynamicVectaraTool.g.cs +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.DynamicVectaraTool.g.cs @@ -31,6 +31,7 @@ public class DynamicVectaraToolJsonConverter : global::System.Text.Json.Serializ if (__jsonProps.Contains("category")) __score0++; if (__jsonProps.Contains("created_at")) __score0++; if (__jsonProps.Contains("default_argument_override")) __score0++; + if (__jsonProps.Contains("default_input_transform")) __score0++; if (__jsonProps.Contains("default_output_transform")) __score0++; if (__jsonProps.Contains("description")) __score0++; if (__jsonProps.Contains("description_template")) __score0++; diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.GaugeMetricDescriptor.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.GaugeMetricDescriptor.g.cs new file mode 100644 index 00000000..f29c9c04 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.GaugeMetricDescriptor.g.cs @@ -0,0 +1,146 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace Vectara.JsonConverters +{ + /// + public class GaugeMetricDescriptorJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Vectara.GaugeMetricDescriptor Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader); + var __rawJson = __jsonDocument.RootElement.GetRawText(); + var __jsonProps = new global::System.Collections.Generic.HashSet(); + if (__jsonDocument.RootElement.ValueKind == global::System.Text.Json.JsonValueKind.Object) + { + foreach (var __jsonProp in __jsonDocument.RootElement.EnumerateObject()) + { + __jsonProps.Add(__jsonProp.Name); + + } + } + + var __score0 = 0; + if (__jsonProps.Contains("category")) __score0++; + if (__jsonProps.Contains("description")) __score0++; + if (__jsonProps.Contains("display_name")) __score0++; + if (__jsonProps.Contains("labels")) __score0++; + if (__jsonProps.Contains("name")) __score0++; + if (__jsonProps.Contains("unit")) __score0++; + var __score1 = 0; + if (__jsonProps.Contains("kind")) __score1++; + var __bestScore = 0; + var __bestIndex = -1; + if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; } + if (__score1 > __bestScore) { __bestScore = __score1; __bestIndex = 1; } + + global::Vectara.MetricDescriptorBase? @base = default; + global::Vectara.GaugeMetricDescriptorVariant2? gaugeMetricDescriptorVariant2 = default; + if (__bestIndex >= 0) + { + if (__bestIndex == 0) + { + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.MetricDescriptorBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.MetricDescriptorBase).Name}"); + @base = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + else if (__bestIndex == 1) + { + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.GaugeMetricDescriptorVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.GaugeMetricDescriptorVariant2).Name}"); + gaugeMetricDescriptorVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + } + + if (@base == null && gaugeMetricDescriptorVariant2 == null) + { + try + { + + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.MetricDescriptorBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.MetricDescriptorBase).Name}"); + @base = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + + if (@base == null && gaugeMetricDescriptorVariant2 == null) + { + try + { + + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.GaugeMetricDescriptorVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.GaugeMetricDescriptorVariant2).Name}"); + gaugeMetricDescriptorVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + + var __value = new global::Vectara.GaugeMetricDescriptor( + @base, + + gaugeMetricDescriptorVariant2 + ); + + return __value; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Vectara.GaugeMetricDescriptor value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + if (value.IsBase) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.MetricDescriptorBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.MetricDescriptorBase).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Base!, typeInfo); + } + else if (value.IsGaugeMetricDescriptorVariant2) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.GaugeMetricDescriptorVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.GaugeMetricDescriptorVariant2).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.GaugeMetricDescriptorVariant2!, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.GaugeMetricSeries.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.GaugeMetricSeries.g.cs index 3f9e49bc..07ff5693 100644 --- a/src/libs/Vectara/Generated/Vectara.JsonConverters.GaugeMetricSeries.g.cs +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.GaugeMetricSeries.g.cs @@ -28,7 +28,7 @@ public class GaugeMetricSeriesJsonConverter : global::System.Text.Json.Serializa } var __score0 = 0; - if (__jsonProps.Contains("bucket_size_seconds")) __score0++; + if (__jsonProps.Contains("bin_size_seconds")) __score0++; if (__jsonProps.Contains("labels")) __score0++; if (__jsonProps.Contains("metric_name")) __score0++; var __score1 = 0; diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.GetDocumentTextTool.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.GetDocumentTextTool.g.cs index 282ed7aa..5cfb0c21 100644 --- a/src/libs/Vectara/Generated/Vectara.JsonConverters.GetDocumentTextTool.g.cs +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.GetDocumentTextTool.g.cs @@ -31,6 +31,7 @@ public class GetDocumentTextToolJsonConverter : global::System.Text.Json.Seriali if (__jsonProps.Contains("category")) __score0++; if (__jsonProps.Contains("created_at")) __score0++; if (__jsonProps.Contains("default_argument_override")) __score0++; + if (__jsonProps.Contains("default_input_transform")) __score0++; if (__jsonProps.Contains("default_output_transform")) __score0++; if (__jsonProps.Contains("description")) __score0++; if (__jsonProps.Contains("description_template")) __score0++; diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.ImageReadTool.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.ImageReadTool.g.cs index b775abe6..9c6c50e5 100644 --- a/src/libs/Vectara/Generated/Vectara.JsonConverters.ImageReadTool.g.cs +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.ImageReadTool.g.cs @@ -31,6 +31,7 @@ public class ImageReadToolJsonConverter : global::System.Text.Json.Serialization if (__jsonProps.Contains("category")) __score0++; if (__jsonProps.Contains("created_at")) __score0++; if (__jsonProps.Contains("default_argument_override")) __score0++; + if (__jsonProps.Contains("default_input_transform")) __score0++; if (__jsonProps.Contains("default_output_transform")) __score0++; if (__jsonProps.Contains("description")) __score0++; if (__jsonProps.Contains("description_template")) __score0++; diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineArtifactCreateToolConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineArtifactCreateToolConfiguration.g.cs index 0b9d50c6..d5ef2364 100644 --- a/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineArtifactCreateToolConfiguration.g.cs +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineArtifactCreateToolConfiguration.g.cs @@ -30,6 +30,7 @@ public class InlineArtifactCreateToolConfigurationJsonConverter : global::System var __score0 = 0; if (__jsonProps.Contains("description")) __score0++; if (__jsonProps.Contains("description_template")) __score0++; + if (__jsonProps.Contains("input_transform")) __score0++; if (__jsonProps.Contains("output_transform")) __score0++; var __score1 = 0; if (__jsonProps.Contains("type")) __score1++; diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineArtifactGrepToolConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineArtifactGrepToolConfiguration.g.cs index 235a1caf..98104bdd 100644 --- a/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineArtifactGrepToolConfiguration.g.cs +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineArtifactGrepToolConfiguration.g.cs @@ -37,6 +37,7 @@ public class InlineArtifactGrepToolConfigurationJsonConverter : global::System.T var __score0 = 0; if (__jsonProps.Contains("description")) __score0++; if (__jsonProps.Contains("description_template")) __score0++; + if (__jsonProps.Contains("input_transform")) __score0++; if (__jsonProps.Contains("output_transform")) __score0++; var __score1 = 0; if (__jsonProps.Contains("argument_override")) __score1++; diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineArtifactReadToolConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineArtifactReadToolConfiguration.g.cs index 2cc8f8f9..9d862298 100644 --- a/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineArtifactReadToolConfiguration.g.cs +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineArtifactReadToolConfiguration.g.cs @@ -37,6 +37,7 @@ public class InlineArtifactReadToolConfigurationJsonConverter : global::System.T var __score0 = 0; if (__jsonProps.Contains("description")) __score0++; if (__jsonProps.Contains("description_template")) __score0++; + if (__jsonProps.Contains("input_transform")) __score0++; if (__jsonProps.Contains("output_transform")) __score0++; var __score1 = 0; if (__jsonProps.Contains("argument_override")) __score1++; diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineCorporaSearchToolConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineCorporaSearchToolConfiguration.g.cs index 8aa3e61f..310b4948 100644 --- a/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineCorporaSearchToolConfiguration.g.cs +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineCorporaSearchToolConfiguration.g.cs @@ -37,6 +37,7 @@ public class InlineCorporaSearchToolConfigurationJsonConverter : global::System. var __score0 = 0; if (__jsonProps.Contains("description")) __score0++; if (__jsonProps.Contains("description_template")) __score0++; + if (__jsonProps.Contains("input_transform")) __score0++; if (__jsonProps.Contains("output_transform")) __score0++; var __score1 = 0; if (__jsonProps.Contains("argument_override")) __score1++; diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineDocumentConversionToolConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineDocumentConversionToolConfiguration.g.cs index 70dcb844..2aa7af31 100644 --- a/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineDocumentConversionToolConfiguration.g.cs +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineDocumentConversionToolConfiguration.g.cs @@ -37,6 +37,7 @@ public class InlineDocumentConversionToolConfigurationJsonConverter : global::Sy var __score0 = 0; if (__jsonProps.Contains("description")) __score0++; if (__jsonProps.Contains("description_template")) __score0++; + if (__jsonProps.Contains("input_transform")) __score0++; if (__jsonProps.Contains("output_transform")) __score0++; var __score1 = 0; if (__jsonProps.Contains("argument_override")) __score1++; diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineDynamicVectaraToolConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineDynamicVectaraToolConfiguration.g.cs index ce26b493..35b68972 100644 --- a/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineDynamicVectaraToolConfiguration.g.cs +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineDynamicVectaraToolConfiguration.g.cs @@ -30,6 +30,7 @@ public class InlineDynamicVectaraToolConfigurationJsonConverter : global::System var __score0 = 0; if (__jsonProps.Contains("description")) __score0++; if (__jsonProps.Contains("description_template")) __score0++; + if (__jsonProps.Contains("input_transform")) __score0++; if (__jsonProps.Contains("output_transform")) __score0++; var __score1 = 0; if (__jsonProps.Contains("argument_override")) __score1++; diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineGetDocumentTextToolConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineGetDocumentTextToolConfiguration.g.cs index 89ee0e57..53dba270 100644 --- a/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineGetDocumentTextToolConfiguration.g.cs +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineGetDocumentTextToolConfiguration.g.cs @@ -37,6 +37,7 @@ public class InlineGetDocumentTextToolConfigurationJsonConverter : global::Syste var __score0 = 0; if (__jsonProps.Contains("description")) __score0++; if (__jsonProps.Contains("description_template")) __score0++; + if (__jsonProps.Contains("input_transform")) __score0++; if (__jsonProps.Contains("output_transform")) __score0++; var __score1 = 0; if (__jsonProps.Contains("argument_override")) __score1++; diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineImageReadToolConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineImageReadToolConfiguration.g.cs index 9b11cc18..8608dc93 100644 --- a/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineImageReadToolConfiguration.g.cs +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineImageReadToolConfiguration.g.cs @@ -37,6 +37,7 @@ public class InlineImageReadToolConfigurationJsonConverter : global::System.Text var __score0 = 0; if (__jsonProps.Contains("description")) __score0++; if (__jsonProps.Contains("description_template")) __score0++; + if (__jsonProps.Contains("input_transform")) __score0++; if (__jsonProps.Contains("output_transform")) __score0++; var __score1 = 0; if (__jsonProps.Contains("argument_override")) __score1++; diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineLambdaToolConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineLambdaToolConfiguration.g.cs index c54d3320..01c918b9 100644 --- a/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineLambdaToolConfiguration.g.cs +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineLambdaToolConfiguration.g.cs @@ -30,6 +30,7 @@ public class InlineLambdaToolConfigurationJsonConverter : global::System.Text.Js var __score0 = 0; if (__jsonProps.Contains("description")) __score0++; if (__jsonProps.Contains("description_template")) __score0++; + if (__jsonProps.Contains("input_transform")) __score0++; if (__jsonProps.Contains("output_transform")) __score0++; var __score1 = 0; if (__jsonProps.Contains("argument_override")) __score1++; diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineMcpToolConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineMcpToolConfiguration.g.cs index a3f6ac00..4993a8af 100644 --- a/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineMcpToolConfiguration.g.cs +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineMcpToolConfiguration.g.cs @@ -30,6 +30,7 @@ public class InlineMcpToolConfigurationJsonConverter : global::System.Text.Json. var __score0 = 0; if (__jsonProps.Contains("description")) __score0++; if (__jsonProps.Contains("description_template")) __score0++; + if (__jsonProps.Contains("input_transform")) __score0++; if (__jsonProps.Contains("output_transform")) __score0++; var __score1 = 0; if (__jsonProps.Contains("argument_override")) __score1++; diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineSubAgentToolConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineSubAgentToolConfiguration.g.cs index e965fe52..d242490d 100644 --- a/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineSubAgentToolConfiguration.g.cs +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineSubAgentToolConfiguration.g.cs @@ -37,6 +37,7 @@ public class InlineSubAgentToolConfigurationJsonConverter : global::System.Text. var __score0 = 0; if (__jsonProps.Contains("description")) __score0++; if (__jsonProps.Contains("description_template")) __score0++; + if (__jsonProps.Contains("input_transform")) __score0++; if (__jsonProps.Contains("output_transform")) __score0++; var __score1 = 0; if (__jsonProps.Contains("argument_override")) __score1++; diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineWebGetToolConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineWebGetToolConfiguration.g.cs index b5a98b32..d7106ab4 100644 --- a/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineWebGetToolConfiguration.g.cs +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineWebGetToolConfiguration.g.cs @@ -37,6 +37,7 @@ public class InlineWebGetToolConfigurationJsonConverter : global::System.Text.Js var __score0 = 0; if (__jsonProps.Contains("description")) __score0++; if (__jsonProps.Contains("description_template")) __score0++; + if (__jsonProps.Contains("input_transform")) __score0++; if (__jsonProps.Contains("output_transform")) __score0++; var __score1 = 0; if (__jsonProps.Contains("argument_override")) __score1++; diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineWebSearchToolConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineWebSearchToolConfiguration.g.cs index 15611e9b..051b095b 100644 --- a/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineWebSearchToolConfiguration.g.cs +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineWebSearchToolConfiguration.g.cs @@ -37,6 +37,7 @@ public class InlineWebSearchToolConfigurationJsonConverter : global::System.Text var __score0 = 0; if (__jsonProps.Contains("description")) __score0++; if (__jsonProps.Contains("description_template")) __score0++; + if (__jsonProps.Contains("input_transform")) __score0++; if (__jsonProps.Contains("output_transform")) __score0++; var __score1 = 0; if (__jsonProps.Contains("argument_override")) __score1++; diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.LambdaTool.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.LambdaTool.g.cs index c5cd46f5..96791674 100644 --- a/src/libs/Vectara/Generated/Vectara.JsonConverters.LambdaTool.g.cs +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.LambdaTool.g.cs @@ -38,6 +38,7 @@ public class LambdaToolJsonConverter : global::System.Text.Json.Serialization.Js if (__jsonProps.Contains("category")) __score0++; if (__jsonProps.Contains("created_at")) __score0++; if (__jsonProps.Contains("default_argument_override")) __score0++; + if (__jsonProps.Contains("default_input_transform")) __score0++; if (__jsonProps.Contains("default_output_transform")) __score0++; if (__jsonProps.Contains("description")) __score0++; if (__jsonProps.Contains("description_template")) __score0++; diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.McpTool.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.McpTool.g.cs index c1ec740d..70b7b4b4 100644 --- a/src/libs/Vectara/Generated/Vectara.JsonConverters.McpTool.g.cs +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.McpTool.g.cs @@ -38,6 +38,7 @@ public class McpToolJsonConverter : global::System.Text.Json.Serialization.JsonC if (__jsonProps.Contains("category")) __score0++; if (__jsonProps.Contains("created_at")) __score0++; if (__jsonProps.Contains("default_argument_override")) __score0++; + if (__jsonProps.Contains("default_input_transform")) __score0++; if (__jsonProps.Contains("default_output_transform")) __score0++; if (__jsonProps.Contains("description")) __score0++; if (__jsonProps.Contains("description_template")) __score0++; diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.MetricDescriptor.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.MetricDescriptor.g.cs new file mode 100644 index 00000000..850d599d --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.MetricDescriptor.g.cs @@ -0,0 +1,102 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace Vectara.JsonConverters +{ + /// + public class MetricDescriptorJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Vectara.MetricDescriptor Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + + var readerCopy = reader; + var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.MetricDescriptorDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Vectara.MetricDescriptorDiscriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); + + global::Vectara.CounterMetricDescriptor? counter = default; + if (discriminator?.Kind == global::Vectara.MetricDescriptorDiscriminatorKind.Counter) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.CounterMetricDescriptor), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Vectara.CounterMetricDescriptor)}"); + counter = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::Vectara.GaugeMetricDescriptor? gauge = default; + if (discriminator?.Kind == global::Vectara.MetricDescriptorDiscriminatorKind.Gauge) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.GaugeMetricDescriptor), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Vectara.GaugeMetricDescriptor)}"); + gauge = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::Vectara.PercentilesMetricDescriptor? percentiles = default; + if (discriminator?.Kind == global::Vectara.MetricDescriptorDiscriminatorKind.Percentiles) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.PercentilesMetricDescriptor), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Vectara.PercentilesMetricDescriptor)}"); + percentiles = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::Vectara.DistributionMetricDescriptor? distribution = default; + if (discriminator?.Kind == global::Vectara.MetricDescriptorDiscriminatorKind.Distribution) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.DistributionMetricDescriptor), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Vectara.DistributionMetricDescriptor)}"); + distribution = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + var __value = new global::Vectara.MetricDescriptor( + discriminator?.Kind, + counter, + + gauge, + + percentiles, + + distribution + ); + + return __value; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Vectara.MetricDescriptor value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + if (value.IsCounter) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.CounterMetricDescriptor), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.CounterMetricDescriptor).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Counter!.Value, typeInfo); + } + else if (value.IsGauge) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.GaugeMetricDescriptor), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.GaugeMetricDescriptor).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Gauge!.Value, typeInfo); + } + else if (value.IsPercentiles) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.PercentilesMetricDescriptor), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.PercentilesMetricDescriptor).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Percentiles!.Value, typeInfo); + } + else if (value.IsDistribution) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.DistributionMetricDescriptor), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.DistributionMetricDescriptor).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Distribution!.Value, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.MetricKind.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.MetricDescriptorDiscriminatorKind.g.cs similarity index 65% rename from src/libs/Vectara/Generated/Vectara.JsonConverters.MetricKind.g.cs rename to src/libs/Vectara/Generated/Vectara.JsonConverters.MetricDescriptorDiscriminatorKind.g.cs index 25f0e711..ee123716 100644 --- a/src/libs/Vectara/Generated/Vectara.JsonConverters.MetricKind.g.cs +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.MetricDescriptorDiscriminatorKind.g.cs @@ -3,10 +3,10 @@ namespace Vectara.JsonConverters { /// - public sealed class MetricKindJsonConverter : global::System.Text.Json.Serialization.JsonConverter + public sealed class MetricDescriptorDiscriminatorKindJsonConverter : global::System.Text.Json.Serialization.JsonConverter { /// - public override global::Vectara.MetricKind Read( + public override global::Vectara.MetricDescriptorDiscriminatorKind Read( ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) @@ -18,7 +18,7 @@ public sealed class MetricKindJsonConverter : global::System.Text.Json.Serializa var stringValue = reader.GetString(); if (stringValue != null) { - return global::Vectara.MetricKindExtensions.ToEnum(stringValue) ?? default; + return global::Vectara.MetricDescriptorDiscriminatorKindExtensions.ToEnum(stringValue) ?? default; } break; @@ -26,11 +26,11 @@ public sealed class MetricKindJsonConverter : global::System.Text.Json.Serializa case global::System.Text.Json.JsonTokenType.Number: { var numValue = reader.GetInt32(); - return (global::Vectara.MetricKind)numValue; + return (global::Vectara.MetricDescriptorDiscriminatorKind)numValue; } case global::System.Text.Json.JsonTokenType.Null: { - return default(global::Vectara.MetricKind); + return default(global::Vectara.MetricDescriptorDiscriminatorKind); } default: throw new global::System.ArgumentOutOfRangeException(nameof(reader)); @@ -42,12 +42,12 @@ public sealed class MetricKindJsonConverter : global::System.Text.Json.Serializa /// public override void Write( global::System.Text.Json.Utf8JsonWriter writer, - global::Vectara.MetricKind value, + global::Vectara.MetricDescriptorDiscriminatorKind value, global::System.Text.Json.JsonSerializerOptions options) { writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - writer.WriteStringValue(global::Vectara.MetricKindExtensions.ToValueString(value)); + writer.WriteStringValue(global::Vectara.MetricDescriptorDiscriminatorKindExtensions.ToValueString(value)); } } } diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.MetricKindNullable.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.MetricDescriptorDiscriminatorKindNullable.g.cs similarity index 67% rename from src/libs/Vectara/Generated/Vectara.JsonConverters.MetricKindNullable.g.cs rename to src/libs/Vectara/Generated/Vectara.JsonConverters.MetricDescriptorDiscriminatorKindNullable.g.cs index 610c5ee8..89e282c1 100644 --- a/src/libs/Vectara/Generated/Vectara.JsonConverters.MetricKindNullable.g.cs +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.MetricDescriptorDiscriminatorKindNullable.g.cs @@ -3,10 +3,10 @@ namespace Vectara.JsonConverters { /// - public sealed class MetricKindNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + public sealed class MetricDescriptorDiscriminatorKindNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter { /// - public override global::Vectara.MetricKind? Read( + public override global::Vectara.MetricDescriptorDiscriminatorKind? Read( ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) @@ -18,7 +18,7 @@ public sealed class MetricKindNullableJsonConverter : global::System.Text.Json.S var stringValue = reader.GetString(); if (stringValue != null) { - return global::Vectara.MetricKindExtensions.ToEnum(stringValue); + return global::Vectara.MetricDescriptorDiscriminatorKindExtensions.ToEnum(stringValue); } break; @@ -26,11 +26,11 @@ public sealed class MetricKindNullableJsonConverter : global::System.Text.Json.S case global::System.Text.Json.JsonTokenType.Number: { var numValue = reader.GetInt32(); - return (global::Vectara.MetricKind)numValue; + return (global::Vectara.MetricDescriptorDiscriminatorKind)numValue; } case global::System.Text.Json.JsonTokenType.Null: { - return default(global::Vectara.MetricKind?); + return default(global::Vectara.MetricDescriptorDiscriminatorKind?); } default: throw new global::System.ArgumentOutOfRangeException(nameof(reader)); @@ -42,7 +42,7 @@ public sealed class MetricKindNullableJsonConverter : global::System.Text.Json.S /// public override void Write( global::System.Text.Json.Utf8JsonWriter writer, - global::Vectara.MetricKind? value, + global::Vectara.MetricDescriptorDiscriminatorKind? value, global::System.Text.Json.JsonSerializerOptions options) { writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); @@ -53,7 +53,7 @@ public override void Write( } else { - writer.WriteStringValue(global::Vectara.MetricKindExtensions.ToValueString(value.Value)); + writer.WriteStringValue(global::Vectara.MetricDescriptorDiscriminatorKindExtensions.ToValueString(value.Value)); } } } diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.PercentilesMetricDescriptor.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.PercentilesMetricDescriptor.g.cs new file mode 100644 index 00000000..7ff95d41 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.PercentilesMetricDescriptor.g.cs @@ -0,0 +1,147 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace Vectara.JsonConverters +{ + /// + public class PercentilesMetricDescriptorJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Vectara.PercentilesMetricDescriptor Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader); + var __rawJson = __jsonDocument.RootElement.GetRawText(); + var __jsonProps = new global::System.Collections.Generic.HashSet(); + if (__jsonDocument.RootElement.ValueKind == global::System.Text.Json.JsonValueKind.Object) + { + foreach (var __jsonProp in __jsonDocument.RootElement.EnumerateObject()) + { + __jsonProps.Add(__jsonProp.Name); + + } + } + + var __score0 = 0; + if (__jsonProps.Contains("category")) __score0++; + if (__jsonProps.Contains("description")) __score0++; + if (__jsonProps.Contains("display_name")) __score0++; + if (__jsonProps.Contains("labels")) __score0++; + if (__jsonProps.Contains("name")) __score0++; + if (__jsonProps.Contains("unit")) __score0++; + var __score1 = 0; + if (__jsonProps.Contains("kind")) __score1++; + if (__jsonProps.Contains("percentiles")) __score1++; + var __bestScore = 0; + var __bestIndex = -1; + if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; } + if (__score1 > __bestScore) { __bestScore = __score1; __bestIndex = 1; } + + global::Vectara.MetricDescriptorBase? @base = default; + global::Vectara.PercentilesMetricDescriptorVariant2? percentilesMetricDescriptorVariant2 = default; + if (__bestIndex >= 0) + { + if (__bestIndex == 0) + { + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.MetricDescriptorBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.MetricDescriptorBase).Name}"); + @base = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + else if (__bestIndex == 1) + { + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.PercentilesMetricDescriptorVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.PercentilesMetricDescriptorVariant2).Name}"); + percentilesMetricDescriptorVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + } + + if (@base == null && percentilesMetricDescriptorVariant2 == null) + { + try + { + + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.MetricDescriptorBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.MetricDescriptorBase).Name}"); + @base = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + + if (@base == null && percentilesMetricDescriptorVariant2 == null) + { + try + { + + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.PercentilesMetricDescriptorVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.PercentilesMetricDescriptorVariant2).Name}"); + percentilesMetricDescriptorVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + + var __value = new global::Vectara.PercentilesMetricDescriptor( + @base, + + percentilesMetricDescriptorVariant2 + ); + + return __value; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Vectara.PercentilesMetricDescriptor value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + if (value.IsBase) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.MetricDescriptorBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.MetricDescriptorBase).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Base!, typeInfo); + } + else if (value.IsPercentilesMetricDescriptorVariant2) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.PercentilesMetricDescriptorVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.PercentilesMetricDescriptorVariant2).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PercentilesMetricDescriptorVariant2!, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.PercentilesMetricSeries.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.PercentilesMetricSeries.g.cs index f5076b18..b95e5972 100644 --- a/src/libs/Vectara/Generated/Vectara.JsonConverters.PercentilesMetricSeries.g.cs +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.PercentilesMetricSeries.g.cs @@ -28,7 +28,7 @@ public class PercentilesMetricSeriesJsonConverter : global::System.Text.Json.Ser } var __score0 = 0; - if (__jsonProps.Contains("bucket_size_seconds")) __score0++; + if (__jsonProps.Contains("bin_size_seconds")) __score0++; if (__jsonProps.Contains("labels")) __score0++; if (__jsonProps.Contains("metric_name")) __score0++; var __score1 = 0; diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.SubAgentTool.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.SubAgentTool.g.cs index 0689a7e2..abeeb6e7 100644 --- a/src/libs/Vectara/Generated/Vectara.JsonConverters.SubAgentTool.g.cs +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.SubAgentTool.g.cs @@ -31,6 +31,7 @@ public class SubAgentToolJsonConverter : global::System.Text.Json.Serialization. if (__jsonProps.Contains("category")) __score0++; if (__jsonProps.Contains("created_at")) __score0++; if (__jsonProps.Contains("default_argument_override")) __score0++; + if (__jsonProps.Contains("default_input_transform")) __score0++; if (__jsonProps.Contains("default_output_transform")) __score0++; if (__jsonProps.Contains("description")) __score0++; if (__jsonProps.Contains("description_template")) __score0++; diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.WebGetTool.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.WebGetTool.g.cs index 1ecbf11d..33ebd591 100644 --- a/src/libs/Vectara/Generated/Vectara.JsonConverters.WebGetTool.g.cs +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.WebGetTool.g.cs @@ -31,6 +31,7 @@ public class WebGetToolJsonConverter : global::System.Text.Json.Serialization.Js if (__jsonProps.Contains("category")) __score0++; if (__jsonProps.Contains("created_at")) __score0++; if (__jsonProps.Contains("default_argument_override")) __score0++; + if (__jsonProps.Contains("default_input_transform")) __score0++; if (__jsonProps.Contains("default_output_transform")) __score0++; if (__jsonProps.Contains("description")) __score0++; if (__jsonProps.Contains("description_template")) __score0++; diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.WebSearchTool.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.WebSearchTool.g.cs index 82b8b74d..80af2f74 100644 --- a/src/libs/Vectara/Generated/Vectara.JsonConverters.WebSearchTool.g.cs +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.WebSearchTool.g.cs @@ -31,6 +31,7 @@ public class WebSearchToolJsonConverter : global::System.Text.Json.Serialization if (__jsonProps.Contains("category")) __score0++; if (__jsonProps.Contains("created_at")) __score0++; if (__jsonProps.Contains("default_argument_override")) __score0++; + if (__jsonProps.Contains("default_input_transform")) __score0++; if (__jsonProps.Contains("default_output_transform")) __score0++; if (__jsonProps.Contains("description")) __score0++; if (__jsonProps.Contains("description_template")) __score0++; diff --git a/src/libs/Vectara/Generated/Vectara.JsonSerializerContext.g.cs b/src/libs/Vectara/Generated/Vectara.JsonSerializerContext.g.cs index 3ed6b18d..54a063fc 100644 --- a/src/libs/Vectara/Generated/Vectara.JsonSerializerContext.g.cs +++ b/src/libs/Vectara/Generated/Vectara.JsonSerializerContext.g.cs @@ -405,9 +405,9 @@ namespace Vectara typeof(global::Vectara.JsonConverters.PipelineRunEventDiscriminatorTypeNullableJsonConverter), - typeof(global::Vectara.JsonConverters.MetricKindJsonConverter), + typeof(global::Vectara.JsonConverters.MetricDescriptorDiscriminatorKindJsonConverter), - typeof(global::Vectara.JsonConverters.MetricKindNullableJsonConverter), + typeof(global::Vectara.JsonConverters.MetricDescriptorDiscriminatorKindNullableJsonConverter), typeof(global::Vectara.JsonConverters.MetricSeriesDiscriminatorKindJsonConverter), @@ -695,6 +695,16 @@ namespace Vectara typeof(global::Vectara.JsonConverters.PipelineRunEventJsonConverter), + typeof(global::Vectara.JsonConverters.CounterMetricDescriptorJsonConverter), + + typeof(global::Vectara.JsonConverters.GaugeMetricDescriptorJsonConverter), + + typeof(global::Vectara.JsonConverters.PercentilesMetricDescriptorJsonConverter), + + typeof(global::Vectara.JsonConverters.DistributionMetricDescriptorJsonConverter), + + typeof(global::Vectara.JsonConverters.MetricDescriptorJsonConverter), + typeof(global::Vectara.JsonConverters.CounterMetricSeriesJsonConverter), typeof(global::Vectara.JsonConverters.GaugeMetricSeriesJsonConverter), @@ -1670,9 +1680,9 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex typeof(global::Vectara.JsonConverters.PipelineRunEventDiscriminatorTypeNullableJsonConverter), - typeof(global::Vectara.JsonConverters.MetricKindJsonConverter), + typeof(global::Vectara.JsonConverters.MetricDescriptorDiscriminatorKindJsonConverter), - typeof(global::Vectara.JsonConverters.MetricKindNullableJsonConverter), + typeof(global::Vectara.JsonConverters.MetricDescriptorDiscriminatorKindNullableJsonConverter), typeof(global::Vectara.JsonConverters.MetricSeriesDiscriminatorKindJsonConverter), @@ -1960,6 +1970,16 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex typeof(global::Vectara.JsonConverters.PipelineRunEventJsonConverter), + typeof(global::Vectara.JsonConverters.CounterMetricDescriptorJsonConverter), + + typeof(global::Vectara.JsonConverters.GaugeMetricDescriptorJsonConverter), + + typeof(global::Vectara.JsonConverters.PercentilesMetricDescriptorJsonConverter), + + typeof(global::Vectara.JsonConverters.DistributionMetricDescriptorJsonConverter), + + typeof(global::Vectara.JsonConverters.MetricDescriptorJsonConverter), + typeof(global::Vectara.JsonConverters.CounterMetricSeriesJsonConverter), typeof(global::Vectara.JsonConverters.GaugeMetricSeriesJsonConverter), @@ -2229,8 +2249,22 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.PipelineRunEventDiscriminatorType), TypeInfoPropertyName = "PipelineRunEventDiscriminatorType2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.ListPipelineRunEventsResponse))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.MetricKind), TypeInfoPropertyName = "MetricKind2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.MetricDescriptor))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.MetricDescriptorBase))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.CounterMetricDescriptor), TypeInfoPropertyName = "CounterMetricDescriptor2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.CounterMetricDescriptorVariant2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.GaugeMetricDescriptor), TypeInfoPropertyName = "GaugeMetricDescriptor2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.GaugeMetricDescriptorVariant2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.PercentileEntry))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.PercentilesMetricDescriptor), TypeInfoPropertyName = "PercentilesMetricDescriptor2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.PercentilesMetricDescriptorVariant2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.DistributionBinDescriptor))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.DistributionMetricDescriptor), TypeInfoPropertyName = "DistributionMetricDescriptor2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.DistributionMetricDescriptorVariant2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.MetricDescriptor), TypeInfoPropertyName = "MetricDescriptor2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.MetricDescriptorDiscriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.MetricDescriptorDiscriminatorKind), TypeInfoPropertyName = "MetricDescriptorDiscriminatorKind2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.ListMetricsResponse))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.MetricSeriesBase))] @@ -2396,6 +2430,8 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] @@ -2646,8 +2682,8 @@ private SourceGenerationContext(global::System.Text.Json.JsonSerializerOptions o options.Converters.Add(new global::Vectara.JsonConverters.RecordProcessingEventStatusNullableJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.PipelineRunEventDiscriminatorTypeJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.PipelineRunEventDiscriminatorTypeNullableJsonConverter()); - options.Converters.Add(new global::Vectara.JsonConverters.MetricKindJsonConverter()); - options.Converters.Add(new global::Vectara.JsonConverters.MetricKindNullableJsonConverter()); + options.Converters.Add(new global::Vectara.JsonConverters.MetricDescriptorDiscriminatorKindJsonConverter()); + options.Converters.Add(new global::Vectara.JsonConverters.MetricDescriptorDiscriminatorKindNullableJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.MetricSeriesDiscriminatorKindJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.MetricSeriesDiscriminatorKindNullableJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.AgentTraceStatusJsonConverter()); @@ -2791,6 +2827,11 @@ private SourceGenerationContext(global::System.Text.Json.JsonSerializerOptions o options.Converters.Add(new global::Vectara.JsonConverters.RecordProcessingEventJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.WatermarkAdvancedEventJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.PipelineRunEventJsonConverter()); + options.Converters.Add(new global::Vectara.JsonConverters.CounterMetricDescriptorJsonConverter()); + options.Converters.Add(new global::Vectara.JsonConverters.GaugeMetricDescriptorJsonConverter()); + options.Converters.Add(new global::Vectara.JsonConverters.PercentilesMetricDescriptorJsonConverter()); + options.Converters.Add(new global::Vectara.JsonConverters.DistributionMetricDescriptorJsonConverter()); + options.Converters.Add(new global::Vectara.JsonConverters.MetricDescriptorJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.CounterMetricSeriesJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.GaugeMetricSeriesJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.PercentilesMetricSeriesJsonConverter()); diff --git a/src/libs/Vectara/Generated/Vectara.JsonSerializerContextTypes.g.cs b/src/libs/Vectara/Generated/Vectara.JsonSerializerContextTypes.g.cs index 20d27d28..378e5344 100644 --- a/src/libs/Vectara/Generated/Vectara.JsonSerializerContextTypes.g.cs +++ b/src/libs/Vectara/Generated/Vectara.JsonSerializerContextTypes.g.cs @@ -2804,395 +2804,451 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::Vectara.MetricKind? Type694 { get; set; } + public global::Vectara.MetricDescriptorBase? Type694 { get; set; } /// /// /// - public global::Vectara.MetricDescriptor? Type695 { get; set; } + public global::Vectara.CounterMetricDescriptor? Type695 { get; set; } /// /// /// - public global::Vectara.ListMetricsResponse? Type696 { get; set; } + public global::Vectara.CounterMetricDescriptorVariant2? Type696 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type697 { get; set; } + public global::Vectara.GaugeMetricDescriptor? Type697 { get; set; } /// /// /// - public global::Vectara.MetricSeriesBase? Type698 { get; set; } + public global::Vectara.GaugeMetricDescriptorVariant2? Type698 { get; set; } /// /// /// - public global::Vectara.ScalarMetricPoint? Type699 { get; set; } + public global::Vectara.PercentileEntry? Type699 { get; set; } /// /// /// - public global::Vectara.CounterMetricSeries? Type700 { get; set; } + public global::Vectara.PercentilesMetricDescriptor? Type700 { get; set; } /// /// /// - public global::Vectara.CounterMetricSeriesVariant2? Type701 { get; set; } + public global::Vectara.PercentilesMetricDescriptorVariant2? Type701 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type702 { get; set; } + public global::System.Collections.Generic.IList? Type702 { get; set; } /// /// /// - public global::Vectara.GaugeMetricSeries? Type703 { get; set; } + public global::Vectara.DistributionBinDescriptor? Type703 { get; set; } /// /// /// - public global::Vectara.GaugeMetricSeriesVariant2? Type704 { get; set; } + public global::Vectara.DistributionMetricDescriptor? Type704 { get; set; } /// /// /// - public global::Vectara.PercentilesMetricPoint? Type705 { get; set; } + public global::Vectara.DistributionMetricDescriptorVariant2? Type705 { get; set; } /// /// /// - public global::Vectara.PercentilesMetricSeries? Type706 { get; set; } + public global::System.Collections.Generic.IList? Type706 { get; set; } /// /// /// - public global::Vectara.PercentilesMetricSeriesVariant2? Type707 { get; set; } + public global::Vectara.MetricDescriptor? Type707 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type708 { get; set; } + public global::Vectara.MetricDescriptorDiscriminator? Type708 { get; set; } /// /// /// - public global::Vectara.HistogramBin? Type709 { get; set; } + public global::Vectara.MetricDescriptorDiscriminatorKind? Type709 { get; set; } /// /// /// - public global::Vectara.DistributionMetricPoint? Type710 { get; set; } + public global::Vectara.ListMetricsResponse? Type710 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type711 { get; set; } + public global::System.Collections.Generic.IList? Type711 { get; set; } /// /// /// - public global::Vectara.DistributionMetricSeries? Type712 { get; set; } + public global::Vectara.MetricSeriesBase? Type712 { get; set; } /// /// /// - public global::Vectara.DistributionMetricSeriesVariant2? Type713 { get; set; } + public global::Vectara.ScalarMetricPoint? Type713 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type714 { get; set; } + public global::Vectara.CounterMetricSeries? Type714 { get; set; } /// /// /// - public global::Vectara.MetricSeries? Type715 { get; set; } + public global::Vectara.CounterMetricSeriesVariant2? Type715 { get; set; } /// /// /// - public global::Vectara.MetricSeriesDiscriminator? Type716 { get; set; } + public global::System.Collections.Generic.IList? Type716 { get; set; } /// /// /// - public global::Vectara.MetricSeriesDiscriminatorKind? Type717 { get; set; } + public global::Vectara.GaugeMetricSeries? Type717 { get; set; } /// /// /// - public global::Vectara.AgentTrace? Type718 { get; set; } + public global::Vectara.GaugeMetricSeriesVariant2? Type718 { get; set; } /// /// /// - public global::Vectara.AgentTraceStatus? Type719 { get; set; } + public global::Vectara.PercentilesMetricPoint? Type719 { get; set; } /// /// /// - public global::Vectara.ListAgentTracesResponse? Type720 { get; set; } + public global::Vectara.PercentilesMetricSeries? Type720 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type721 { get; set; } + public global::Vectara.PercentilesMetricSeriesVariant2? Type721 { get; set; } /// /// /// - public global::Vectara.AgentTraceSpanStatus? Type722 { get; set; } + public global::System.Collections.Generic.IList? Type722 { get; set; } /// /// /// - public global::Vectara.AgentTraceSpanBase? Type723 { get; set; } + public global::Vectara.HistogramBin? Type723 { get; set; } /// /// /// - public global::Vectara.AgentTraceInputFile? Type724 { get; set; } + public global::Vectara.DistributionMetricPoint? Type724 { get; set; } /// /// /// - public global::Vectara.InvokeAgentSpanAttributes? Type725 { get; set; } + public global::System.Collections.Generic.IList? Type725 { get; set; } /// /// /// - public global::Vectara.InvokeAgentSpanAttributesOutputType? Type726 { get; set; } + public global::Vectara.DistributionMetricSeries? Type726 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type727 { get; set; } + public global::Vectara.DistributionMetricSeriesVariant2? Type727 { get; set; } /// /// /// - public global::Vectara.InvokeAgentSpanContent? Type728 { get; set; } + public global::System.Collections.Generic.IList? Type728 { get; set; } /// /// /// - public global::Vectara.InvokeAgentTraceSpan? Type729 { get; set; } + public global::Vectara.MetricSeries? Type729 { get; set; } /// /// /// - public global::Vectara.InvokeAgentTraceSpanVariant2? Type730 { get; set; } + public global::Vectara.MetricSeriesDiscriminator? Type730 { get; set; } /// /// /// - public global::Vectara.ChatSpanAttributes? Type731 { get; set; } + public global::Vectara.MetricSeriesDiscriminatorKind? Type731 { get; set; } /// /// /// - public global::Vectara.ChatTraceSpan? Type732 { get; set; } + public global::Vectara.AgentTrace? Type732 { get; set; } /// /// /// - public global::Vectara.ChatTraceSpanVariant2? Type733 { get; set; } + public global::Vectara.AgentTraceStatus? Type733 { get; set; } /// /// /// - public global::Vectara.ExecuteToolSpanAttributes? Type734 { get; set; } + public global::Vectara.ListAgentTracesResponse? Type734 { get; set; } /// /// /// - public global::Vectara.ExecuteToolSpanContent? Type735 { get; set; } + public global::System.Collections.Generic.IList? Type735 { get; set; } /// /// /// - public global::Vectara.ExecuteToolTraceSpan? Type736 { get; set; } + public global::Vectara.AgentTraceSpanStatus? Type736 { get; set; } /// /// /// - public global::Vectara.ExecuteToolTraceSpanVariant2? Type737 { get; set; } + public global::Vectara.AgentTraceSpanBase? Type737 { get; set; } /// /// /// - public global::Vectara.ThinkingSpanContent? Type738 { get; set; } + public global::Vectara.AgentTraceInputFile? Type738 { get; set; } /// /// /// - public global::Vectara.ThinkingTraceSpan? Type739 { get; set; } + public global::Vectara.InvokeAgentSpanAttributes? Type739 { get; set; } /// /// /// - public global::Vectara.ThinkingTraceSpanVariant2? Type740 { get; set; } + public global::Vectara.InvokeAgentSpanAttributesOutputType? Type740 { get; set; } /// /// /// - public global::Vectara.OutputSpanContent? Type741 { get; set; } + public global::System.Collections.Generic.IList? Type741 { get; set; } /// /// /// - public global::Vectara.OutputTraceSpan? Type742 { get; set; } + public global::Vectara.InvokeAgentSpanContent? Type742 { get; set; } /// /// /// - public global::Vectara.OutputTraceSpanVariant2? Type743 { get; set; } + public global::Vectara.InvokeAgentTraceSpan? Type743 { get; set; } /// /// /// - public global::Vectara.GuardrailSpanAttributes? Type744 { get; set; } + public global::Vectara.InvokeAgentTraceSpanVariant2? Type744 { get; set; } /// /// /// - public global::Vectara.GuardrailSpanContent? Type745 { get; set; } + public global::Vectara.ChatSpanAttributes? Type745 { get; set; } /// /// /// - public global::Vectara.GuardrailTraceSpan? Type746 { get; set; } + public global::Vectara.ChatTraceSpan? Type746 { get; set; } /// /// /// - public global::Vectara.GuardrailTraceSpanVariant2? Type747 { get; set; } + public global::Vectara.ChatTraceSpanVariant2? Type747 { get; set; } /// /// /// - public global::Vectara.StepTransitionSpanAttributes? Type748 { get; set; } + public global::Vectara.ExecuteToolSpanAttributes? Type748 { get; set; } /// /// /// - public global::Vectara.StepTransitionTraceSpan? Type749 { get; set; } + public global::Vectara.ExecuteToolSpanContent? Type749 { get; set; } /// /// /// - public global::Vectara.StepTransitionTraceSpanVariant2? Type750 { get; set; } + public global::Vectara.ExecuteToolTraceSpan? Type750 { get; set; } /// /// /// - public global::Vectara.ImageReadSpanAttributes? Type751 { get; set; } + public global::Vectara.ExecuteToolTraceSpanVariant2? Type751 { get; set; } /// /// /// - public global::Vectara.ImageReadTraceSpan? Type752 { get; set; } + public global::Vectara.ThinkingSpanContent? Type752 { get; set; } /// /// /// - public global::Vectara.ImageReadTraceSpanVariant2? Type753 { get; set; } + public global::Vectara.ThinkingTraceSpan? Type753 { get; set; } /// /// /// - public global::Vectara.CompactionSpanAttributes? Type754 { get; set; } + public global::Vectara.ThinkingTraceSpanVariant2? Type754 { get; set; } /// /// /// - public global::Vectara.CompactionTraceSpan? Type755 { get; set; } + public global::Vectara.OutputSpanContent? Type755 { get; set; } /// /// /// - public global::Vectara.CompactionTraceSpanVariant2? Type756 { get; set; } + public global::Vectara.OutputTraceSpan? Type756 { get; set; } /// /// /// - public global::Vectara.AgentTraceSpan? Type757 { get; set; } + public global::Vectara.OutputTraceSpanVariant2? Type757 { get; set; } /// /// /// - public global::Vectara.AgentTraceSpanDiscriminator? Type758 { get; set; } + public global::Vectara.GuardrailSpanAttributes? Type758 { get; set; } /// /// /// - public global::Vectara.AgentTraceSpanDiscriminatorOperation? Type759 { get; set; } + public global::Vectara.GuardrailSpanContent? Type759 { get; set; } /// /// /// - public global::Vectara.ListAgentTraceSpansResponse? Type760 { get; set; } + public global::Vectara.GuardrailTraceSpan? Type760 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type761 { get; set; } + public global::Vectara.GuardrailTraceSpanVariant2? Type761 { get; set; } /// /// /// - public global::Vectara.Glossary? Type762 { get; set; } + public global::Vectara.StepTransitionSpanAttributes? Type762 { get; set; } /// /// /// - public global::Vectara.ListGlossariesResponse? Type763 { get; set; } + public global::Vectara.StepTransitionTraceSpan? Type763 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type764 { get; set; } + public global::Vectara.StepTransitionTraceSpanVariant2? Type764 { get; set; } /// /// /// - public global::Vectara.CreateGlossaryRequest? Type765 { get; set; } + public global::Vectara.ImageReadSpanAttributes? Type765 { get; set; } /// /// /// - public global::Vectara.UpdateGlossaryRequest? Type766 { get; set; } + public global::Vectara.ImageReadTraceSpan? Type766 { get; set; } /// /// /// - public global::Vectara.GlossaryEntry? Type767 { get; set; } + public global::Vectara.ImageReadTraceSpanVariant2? Type767 { get; set; } /// /// /// - public global::Vectara.GlossaryEntriesResponse? Type768 { get; set; } + public global::Vectara.CompactionSpanAttributes? Type768 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type769 { get; set; } + public global::Vectara.CompactionTraceSpan? Type769 { get; set; } /// /// /// - public global::Vectara.UpsertGlossaryEntriesRequest? Type770 { get; set; } + public global::Vectara.CompactionTraceSpanVariant2? Type770 { get; set; } /// /// /// - public global::Vectara.DeleteGlossaryEntriesRequest? Type771 { get; set; } + public global::Vectara.AgentTraceSpan? Type771 { get; set; } /// /// /// - public global::Vectara.GetOAuthTokenRequest? Type772 { get; set; } + public global::Vectara.AgentTraceSpanDiscriminator? Type772 { get; set; } /// /// /// - public global::Vectara.CreateCorpusDocumentWaitFor? Type773 { get; set; } + public global::Vectara.AgentTraceSpanDiscriminatorOperation? Type773 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type774 { get; set; } + public global::Vectara.ListAgentTraceSpansResponse? Type774 { get; set; } /// /// /// - public global::Vectara.ListToolServersType? Type775 { get; set; } + public global::System.Collections.Generic.IList? Type775 { get; set; } /// /// /// - public global::Vectara.ListToolsType? Type776 { get; set; } + public global::Vectara.Glossary? Type776 { get; set; } /// /// /// - public global::Vectara.ListInstructionsType? Type777 { get; set; } + public global::Vectara.ListGlossariesResponse? Type777 { get; set; } /// /// /// - public global::Vectara.ListSessionArtifactsSortBy? Type778 { get; set; } + public global::System.Collections.Generic.IList? Type778 { get; set; } /// /// /// - public global::Vectara.ListSessionArtifactsOrderBy? Type779 { get; set; } + public global::Vectara.CreateGlossaryRequest? Type779 { get; set; } /// /// /// - public global::Vectara.ListAgentConnectorsType? Type780 { get; set; } + public global::Vectara.UpdateGlossaryRequest? Type780 { get; set; } /// /// /// - public global::Vectara.ListPipelinesSourceType? Type781 { get; set; } + public global::Vectara.GlossaryEntry? Type781 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type782 { get; set; } + public global::Vectara.GlossaryEntriesResponse? Type782 { get; set; } /// /// /// - public global::Vectara.ListTracesStatus? Type783 { get; set; } + public global::System.Collections.Generic.IList? Type783 { get; set; } /// /// /// - public global::Vectara.ListTracesErrorType? Type784 { get; set; } + public global::Vectara.UpsertGlossaryEntriesRequest? Type784 { get; set; } /// /// /// - public global::Vectara.ListTracesOperation? Type785 { get; set; } + public global::Vectara.DeleteGlossaryEntriesRequest? Type785 { get; set; } /// /// /// - public global::Vectara.ListTracesToolErrorType? Type786 { get; set; } + public global::Vectara.GetOAuthTokenRequest? Type786 { get; set; } /// /// /// - public global::Vectara.ListTraceSpansOperation? Type787 { get; set; } + public global::Vectara.CreateCorpusDocumentWaitFor? Type787 { get; set; } /// /// /// - public global::Vectara.AllOf? Type788 { get; set; } + public global::System.Collections.Generic.IList? Type788 { get; set; } /// /// /// - public global::Vectara.CreateUserResponse2? Type789 { get; set; } + public global::Vectara.ListToolServersType? Type789 { get; set; } /// /// /// - public global::Vectara.ResetUserPasswordResponse? Type790 { get; set; } + public global::Vectara.ListToolsType? Type790 { get; set; } /// /// /// - public global::Vectara.GetTokenResponse? Type791 { get; set; } + public global::Vectara.ListInstructionsType? Type791 { get; set; } + /// + /// + /// + public global::Vectara.ListSessionArtifactsSortBy? Type792 { get; set; } + /// + /// + /// + public global::Vectara.ListSessionArtifactsOrderBy? Type793 { get; set; } + /// + /// + /// + public global::Vectara.ListAgentConnectorsType? Type794 { get; set; } + /// + /// + /// + public global::Vectara.ListPipelinesSourceType? Type795 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type796 { get; set; } + /// + /// + /// + public global::Vectara.ListTracesStatus? Type797 { get; set; } + /// + /// + /// + public global::Vectara.ListTracesErrorType? Type798 { get; set; } + /// + /// + /// + public global::Vectara.ListTracesOperation? Type799 { get; set; } + /// + /// + /// + public global::Vectara.ListTracesToolErrorType? Type800 { get; set; } + /// + /// + /// + public global::Vectara.ListTraceSpansOperation? Type801 { get; set; } + /// + /// + /// + public global::Vectara.AllOf? Type802 { get; set; } + /// + /// + /// + public global::Vectara.CreateUserResponse2? Type803 { get; set; } + /// + /// + /// + public global::Vectara.ResetUserPasswordResponse? Type804 { get; set; } + /// + /// + /// + public global::Vectara.GetTokenResponse? Type805 { get; set; } /// /// @@ -3473,50 +3529,58 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::System.Collections.Generic.List? ListType69 { get; set; } + public global::System.Collections.Generic.List? ListType69 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType70 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType71 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType70 { get; set; } + public global::System.Collections.Generic.List? ListType72 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType71 { get; set; } + public global::System.Collections.Generic.List? ListType73 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType72 { get; set; } + public global::System.Collections.Generic.List? ListType74 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType73 { get; set; } + public global::System.Collections.Generic.List? ListType75 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType74 { get; set; } + public global::System.Collections.Generic.List? ListType76 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType75 { get; set; } + public global::System.Collections.Generic.List? ListType77 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType76 { get; set; } + public global::System.Collections.Generic.List? ListType78 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType77 { get; set; } + public global::System.Collections.Generic.List? ListType79 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType78 { get; set; } + public global::System.Collections.Generic.List? ListType80 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType79 { get; set; } + public global::System.Collections.Generic.List? ListType81 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType80 { get; set; } + public global::System.Collections.Generic.List? ListType82 { get; set; } } } \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.AgentToolConfigurationBase.g.cs b/src/libs/Vectara/Generated/Vectara.Models.AgentToolConfigurationBase.g.cs index c2db92e8..3bf8d653 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.AgentToolConfigurationBase.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.AgentToolConfigurationBase.g.cs @@ -30,11 +30,11 @@ public sealed partial class AgentToolConfigurationBase public string? DescriptionTemplate { get; set; } /// - /// An optional jq expression applied to the tool's JSON output before it is returned to the LLM.
+ /// An optional jq expression applied to the tool's JSON output before it is returned to the agent.
/// Use this to project, filter, or summarize tool output to keep responses concise and on-topic.
/// The expression operates on the tool's response JSON and the result replaces the original output.
- /// If the expression fails to compile or evaluate at runtime, the tool call is reported to the LLM as
- /// an error so the agent can react.
+ /// If the expression fails to compile or evaluate at runtime, the tool call is reported to the agent
+ /// as an error so the agent can react.
/// Examples:
/// - `.results | map({title, url})` — keep only title/url for each result
/// - `.items[0:5]` — first 5 items
@@ -45,6 +45,27 @@ public sealed partial class AgentToolConfigurationBase [global::System.Text.Json.Serialization.JsonPropertyName("output_transform")] public string? OutputTransform { get; set; } + /// + /// An optional jq expression applied to the tool's input after argument overrides have been merged
+ /// with the agent's arguments and before the tool is invoked. Use this to inject server-side
+ /// context (session metadata, agent secrets) into the tool input, or to reshape the agent's
+ /// arguments.
+ /// The expression receives the standard runtime context — the same `agent`, `session`, `tools`,
+ /// and `currentDate` values exposed to `argument_override` `$ref`s (see `ArgumentOverrideDescription`),
+ /// plus an `args` field containing the merged tool input. The output of the expression replaces
+ /// `args` as the tool input. The pre-transform `args` is what appears in audit events (with
+ /// secrets masked); the post-transform value goes only to the tool. If the expression fails to
+ /// compile or evaluate, the tool call is reported to the agent as an error.
+ /// Examples:
+ /// - `.args + { auth: ("Bearer " + .agent.secrets.token) }` — inject a bearer header
+ /// - `.args | .corpus_key = .session.metadata.corpus_key` — pull a corpus key from session metadata
+ /// - `.args | .query = (.args.query + " " + .session.metadata.query_suffix)` — augment the agent's query
+ /// Example: .args + { auth: ("Bearer " + .agent.secrets.token) } + ///
+ /// .args + { auth: ("Bearer " + .agent.secrets.token) } + [global::System.Text.Json.Serialization.JsonPropertyName("input_transform")] + public string? InputTransform { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -69,28 +90,47 @@ public sealed partial class AgentToolConfigurationBase /// Example: "Search tool configured for agent $agent.name on $currentDate" /// /// - /// An optional jq expression applied to the tool's JSON output before it is returned to the LLM.
+ /// An optional jq expression applied to the tool's JSON output before it is returned to the agent.
/// Use this to project, filter, or summarize tool output to keep responses concise and on-topic.
/// The expression operates on the tool's response JSON and the result replaces the original output.
- /// If the expression fails to compile or evaluate at runtime, the tool call is reported to the LLM as
- /// an error so the agent can react.
+ /// If the expression fails to compile or evaluate at runtime, the tool call is reported to the agent
+ /// as an error so the agent can react.
/// Examples:
/// - `.results | map({title, url})` — keep only title/url for each result
/// - `.items[0:5]` — first 5 items
/// - `del(.debug)` — drop a noisy field
/// Example: .results | map({title, url}) /// + /// + /// An optional jq expression applied to the tool's input after argument overrides have been merged
+ /// with the agent's arguments and before the tool is invoked. Use this to inject server-side
+ /// context (session metadata, agent secrets) into the tool input, or to reshape the agent's
+ /// arguments.
+ /// The expression receives the standard runtime context — the same `agent`, `session`, `tools`,
+ /// and `currentDate` values exposed to `argument_override` `$ref`s (see `ArgumentOverrideDescription`),
+ /// plus an `args` field containing the merged tool input. The output of the expression replaces
+ /// `args` as the tool input. The pre-transform `args` is what appears in audit events (with
+ /// secrets masked); the post-transform value goes only to the tool. If the expression fails to
+ /// compile or evaluate, the tool call is reported to the agent as an error.
+ /// Examples:
+ /// - `.args + { auth: ("Bearer " + .agent.secrets.token) }` — inject a bearer header
+ /// - `.args | .corpus_key = .session.metadata.corpus_key` — pull a corpus key from session metadata
+ /// - `.args | .query = (.args.query + " " + .session.metadata.query_suffix)` — augment the agent's query
+ /// Example: .args + { auth: ("Bearer " + .agent.secrets.token) } + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public AgentToolConfigurationBase( string? description, string? descriptionTemplate, - string? outputTransform) + string? outputTransform, + string? inputTransform) { this.Description = description; this.DescriptionTemplate = descriptionTemplate; this.OutputTransform = outputTransform; + this.InputTransform = inputTransform; } /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.ArtifactGrepToolParameters.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ArtifactGrepToolParameters.g.cs index c99333f4..d7b2df10 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.ArtifactGrepToolParameters.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.ArtifactGrepToolParameters.g.cs @@ -4,7 +4,7 @@ namespace Vectara { /// - /// Configurable parameters for the artifact grep tool. If not overridden, they will be required by the LLM to fill in. + /// Configurable parameters for the artifact grep tool. If not overridden, they will be required by the agent to fill in. /// public sealed partial class ArtifactGrepToolParameters { diff --git a/src/libs/Vectara/Generated/Vectara.Models.ArtifactReadToolParameters.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ArtifactReadToolParameters.g.cs index 9c202011..2e61573d 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.ArtifactReadToolParameters.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.ArtifactReadToolParameters.g.cs @@ -4,7 +4,7 @@ namespace Vectara { /// - /// Configurable parameters for the artifact read tool. If not overridden, they will be required by the LLM to fill in. + /// Configurable parameters for the artifact read tool. If not overridden, they will be required by the agent to fill in. /// public sealed partial class ArtifactReadToolParameters { diff --git a/src/libs/Vectara/Generated/Vectara.Models.CorporaSearchToolParameters.g.cs b/src/libs/Vectara/Generated/Vectara.Models.CorporaSearchToolParameters.g.cs index 9d1ea9d2..2592ca65 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.CorporaSearchToolParameters.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.CorporaSearchToolParameters.g.cs @@ -4,7 +4,7 @@ namespace Vectara { /// - /// LLM-exposed parameters for the corpora search tool that can be filled in during execution. + /// Agent-exposed parameters for the corpora search tool that can be filled in during execution. /// public sealed partial class CorporaSearchToolParameters { diff --git a/src/libs/Vectara/Generated/Vectara.Models.CounterMetricDescriptor.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.CounterMetricDescriptor.Json.g.cs new file mode 100644 index 00000000..bfab1aec --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.CounterMetricDescriptor.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public readonly partial struct CounterMetricDescriptor + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Vectara.CounterMetricDescriptor? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.CounterMetricDescriptor), + jsonSerializerContext) as global::Vectara.CounterMetricDescriptor?; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Vectara.CounterMetricDescriptor? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Vectara.CounterMetricDescriptor), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.CounterMetricDescriptor?; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.CounterMetricDescriptor.g.cs b/src/libs/Vectara/Generated/Vectara.Models.CounterMetricDescriptor.g.cs new file mode 100644 index 00000000..9a27562f --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.CounterMetricDescriptor.g.cs @@ -0,0 +1,295 @@ +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace Vectara +{ + /// + /// Descriptor for a counter metric. + /// + public readonly partial struct CounterMetricDescriptor : global::System.IEquatable + { + /// + /// Common metadata fields shared by every metric descriptor regardless of kind. + /// +#if NET6_0_OR_GREATER + public global::Vectara.MetricDescriptorBase? Base { get; init; } +#else + public global::Vectara.MetricDescriptorBase? Base { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Base))] +#endif + public bool IsBase => Base != null; + + /// + /// + /// + public bool TryPickBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.MetricDescriptorBase? value) + { + value = Base; + return IsBase; + } + + /// + /// + /// + public global::Vectara.MetricDescriptorBase PickBase() => IsBase + ? Base! + : throw new global::System.InvalidOperationException($"Expected union variant 'Base' but the value was {ToString()}."); + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::Vectara.CounterMetricDescriptorVariant2? CounterMetricDescriptorVariant2 { get; init; } +#else + public global::Vectara.CounterMetricDescriptorVariant2? CounterMetricDescriptorVariant2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CounterMetricDescriptorVariant2))] +#endif + public bool IsCounterMetricDescriptorVariant2 => CounterMetricDescriptorVariant2 != null; + + /// + /// + /// + public bool TryPickCounterMetricDescriptorVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.CounterMetricDescriptorVariant2? value) + { + value = CounterMetricDescriptorVariant2; + return IsCounterMetricDescriptorVariant2; + } + + /// + /// + /// + public global::Vectara.CounterMetricDescriptorVariant2 PickCounterMetricDescriptorVariant2() => IsCounterMetricDescriptorVariant2 + ? CounterMetricDescriptorVariant2! + : throw new global::System.InvalidOperationException($"Expected union variant 'CounterMetricDescriptorVariant2' but the value was {ToString()}."); + /// + /// + /// + public static implicit operator CounterMetricDescriptor(global::Vectara.MetricDescriptorBase value) => new CounterMetricDescriptor((global::Vectara.MetricDescriptorBase?)value); + + /// + /// + /// + public static implicit operator global::Vectara.MetricDescriptorBase?(CounterMetricDescriptor @this) => @this.Base; + + /// + /// + /// + public CounterMetricDescriptor(global::Vectara.MetricDescriptorBase? value) + { + Base = value; + } + + /// + /// + /// + public static CounterMetricDescriptor FromBase(global::Vectara.MetricDescriptorBase? value) => new CounterMetricDescriptor(value); + + /// + /// + /// + public static implicit operator CounterMetricDescriptor(global::Vectara.CounterMetricDescriptorVariant2 value) => new CounterMetricDescriptor((global::Vectara.CounterMetricDescriptorVariant2?)value); + + /// + /// + /// + public static implicit operator global::Vectara.CounterMetricDescriptorVariant2?(CounterMetricDescriptor @this) => @this.CounterMetricDescriptorVariant2; + + /// + /// + /// + public CounterMetricDescriptor(global::Vectara.CounterMetricDescriptorVariant2? value) + { + CounterMetricDescriptorVariant2 = value; + } + + /// + /// + /// + public static CounterMetricDescriptor FromCounterMetricDescriptorVariant2(global::Vectara.CounterMetricDescriptorVariant2? value) => new CounterMetricDescriptor(value); + + /// + /// + /// + public CounterMetricDescriptor( + global::Vectara.MetricDescriptorBase? @base, + global::Vectara.CounterMetricDescriptorVariant2? counterMetricDescriptorVariant2 + ) + { + Base = @base; + CounterMetricDescriptorVariant2 = counterMetricDescriptorVariant2; + } + + /// + /// + /// + public object? Object => + CounterMetricDescriptorVariant2 as object ?? + Base as object + ; + + /// + /// + /// + public override string? ToString() => + Base?.ToString() ?? + CounterMetricDescriptorVariant2?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsBase && IsCounterMetricDescriptorVariant2; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? @base = null, + global::System.Func? counterMetricDescriptorVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsBase && @base != null) + { + return @base(Base!); + } + else if (IsCounterMetricDescriptorVariant2 && counterMetricDescriptorVariant2 != null) + { + return counterMetricDescriptorVariant2(CounterMetricDescriptorVariant2!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? @base = null, + + global::System.Action? counterMetricDescriptorVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsBase) + { + @base?.Invoke(Base!); + } + else if (IsCounterMetricDescriptorVariant2) + { + counterMetricDescriptorVariant2?.Invoke(CounterMetricDescriptorVariant2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? @base = null, + global::System.Action? counterMetricDescriptorVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsBase) + { + @base?.Invoke(Base!); + } + else if (IsCounterMetricDescriptorVariant2) + { + counterMetricDescriptorVariant2?.Invoke(CounterMetricDescriptorVariant2!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Base, + typeof(global::Vectara.MetricDescriptorBase), + CounterMetricDescriptorVariant2, + typeof(global::Vectara.CounterMetricDescriptorVariant2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + + return global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(CounterMetricDescriptor other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Base, other.Base) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(CounterMetricDescriptorVariant2, other.CounterMetricDescriptorVariant2) + ; + } + + /// + /// + /// + public static bool operator ==(CounterMetricDescriptor obj1, CounterMetricDescriptor obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(CounterMetricDescriptor obj1, CounterMetricDescriptor obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is CounterMetricDescriptor o && Equals(o); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.CounterMetricDescriptorVariant2.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.CounterMetricDescriptorVariant2.Json.g.cs new file mode 100644 index 00000000..5e046634 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.CounterMetricDescriptorVariant2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public sealed partial class CounterMetricDescriptorVariant2 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Vectara.CounterMetricDescriptorVariant2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.CounterMetricDescriptorVariant2), + jsonSerializerContext) as global::Vectara.CounterMetricDescriptorVariant2; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Vectara.CounterMetricDescriptorVariant2? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Vectara.CounterMetricDescriptorVariant2), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.CounterMetricDescriptorVariant2; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.CounterMetricDescriptorVariant2.g.cs b/src/libs/Vectara/Generated/Vectara.Models.CounterMetricDescriptorVariant2.g.cs new file mode 100644 index 00000000..8564c9bb --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.CounterMetricDescriptorVariant2.g.cs @@ -0,0 +1,48 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// + /// + public sealed partial class CounterMetricDescriptorVariant2 + { + /// + /// Example: counter + /// + /// counter + [global::System.Text.Json.Serialization.JsonPropertyName("kind")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Kind { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Example: counter + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CounterMetricDescriptorVariant2( + string kind) + { + this.Kind = kind ?? throw new global::System.ArgumentNullException(nameof(kind)); + } + + /// + /// Initializes a new instance of the class. + /// + public CounterMetricDescriptorVariant2() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.CounterMetricSeriesVariant2.g.cs b/src/libs/Vectara/Generated/Vectara.Models.CounterMetricSeriesVariant2.g.cs index 5215664d..ffcf20e5 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.CounterMetricSeriesVariant2.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.CounterMetricSeriesVariant2.g.cs @@ -9,14 +9,12 @@ namespace Vectara public sealed partial class CounterMetricSeriesVariant2 { /// - /// Default Value: counter
/// Example: counter ///
- /// "counter" /// counter [global::System.Text.Json.Serialization.JsonPropertyName("kind")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Kind { get; set; } = "counter"; + public required string Kind { get; set; } /// /// @@ -35,7 +33,6 @@ public sealed partial class CounterMetricSeriesVariant2 /// Initializes a new instance of the class. /// /// - /// Default Value: counter
/// Example: counter /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.DistributionBinDescriptor.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.DistributionBinDescriptor.Json.g.cs new file mode 100644 index 00000000..0311291c --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.DistributionBinDescriptor.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public sealed partial class DistributionBinDescriptor + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Vectara.DistributionBinDescriptor? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.DistributionBinDescriptor), + jsonSerializerContext) as global::Vectara.DistributionBinDescriptor; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Vectara.DistributionBinDescriptor? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Vectara.DistributionBinDescriptor), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.DistributionBinDescriptor; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.DistributionBinDescriptor.g.cs b/src/libs/Vectara/Generated/Vectara.Models.DistributionBinDescriptor.g.cs new file mode 100644 index 00000000..13511df8 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.DistributionBinDescriptor.g.cs @@ -0,0 +1,70 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// A single bin of a distribution metric. The numeric range `[range_min, range_max)` is in the units declared by the metric's `unit` field. The overflow bin (the one covering everything from the largest declared bound upward) omits `range_max`. + /// + public sealed partial class DistributionBinDescriptor + { + /// + /// Stable identifier for this bin. Referenced from response points by `HistogramBin.label`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("label")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Label { get; set; } + + /// + /// Inclusive lower bound of this bin's numeric range, in the metric's `unit`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("range_min")] + [global::System.Text.Json.Serialization.JsonRequired] + public required double RangeMin { get; set; } + + /// + /// Exclusive upper bound of this bin's numeric range, in the metric's `unit`. Omitted for the overflow bin. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("range_max")] + public double? RangeMax { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Stable identifier for this bin. Referenced from response points by `HistogramBin.label`. + /// + /// + /// Inclusive lower bound of this bin's numeric range, in the metric's `unit`. + /// + /// + /// Exclusive upper bound of this bin's numeric range, in the metric's `unit`. Omitted for the overflow bin. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public DistributionBinDescriptor( + string label, + double rangeMin, + double? rangeMax) + { + this.Label = label ?? throw new global::System.ArgumentNullException(nameof(label)); + this.RangeMin = rangeMin; + this.RangeMax = rangeMax; + } + + /// + /// Initializes a new instance of the class. + /// + public DistributionBinDescriptor() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.DistributionMetricDescriptor.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.DistributionMetricDescriptor.Json.g.cs new file mode 100644 index 00000000..87898522 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.DistributionMetricDescriptor.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public readonly partial struct DistributionMetricDescriptor + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Vectara.DistributionMetricDescriptor? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.DistributionMetricDescriptor), + jsonSerializerContext) as global::Vectara.DistributionMetricDescriptor?; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Vectara.DistributionMetricDescriptor? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Vectara.DistributionMetricDescriptor), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.DistributionMetricDescriptor?; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.DistributionMetricDescriptor.g.cs b/src/libs/Vectara/Generated/Vectara.Models.DistributionMetricDescriptor.g.cs new file mode 100644 index 00000000..2eb668ea --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.DistributionMetricDescriptor.g.cs @@ -0,0 +1,295 @@ +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace Vectara +{ + /// + /// Descriptor for a distribution metric. Carries the canonical bin list with numeric bounds. + /// + public readonly partial struct DistributionMetricDescriptor : global::System.IEquatable + { + /// + /// Common metadata fields shared by every metric descriptor regardless of kind. + /// +#if NET6_0_OR_GREATER + public global::Vectara.MetricDescriptorBase? Base { get; init; } +#else + public global::Vectara.MetricDescriptorBase? Base { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Base))] +#endif + public bool IsBase => Base != null; + + /// + /// + /// + public bool TryPickBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.MetricDescriptorBase? value) + { + value = Base; + return IsBase; + } + + /// + /// + /// + public global::Vectara.MetricDescriptorBase PickBase() => IsBase + ? Base! + : throw new global::System.InvalidOperationException($"Expected union variant 'Base' but the value was {ToString()}."); + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::Vectara.DistributionMetricDescriptorVariant2? DistributionMetricDescriptorVariant2 { get; init; } +#else + public global::Vectara.DistributionMetricDescriptorVariant2? DistributionMetricDescriptorVariant2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(DistributionMetricDescriptorVariant2))] +#endif + public bool IsDistributionMetricDescriptorVariant2 => DistributionMetricDescriptorVariant2 != null; + + /// + /// + /// + public bool TryPickDistributionMetricDescriptorVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.DistributionMetricDescriptorVariant2? value) + { + value = DistributionMetricDescriptorVariant2; + return IsDistributionMetricDescriptorVariant2; + } + + /// + /// + /// + public global::Vectara.DistributionMetricDescriptorVariant2 PickDistributionMetricDescriptorVariant2() => IsDistributionMetricDescriptorVariant2 + ? DistributionMetricDescriptorVariant2! + : throw new global::System.InvalidOperationException($"Expected union variant 'DistributionMetricDescriptorVariant2' but the value was {ToString()}."); + /// + /// + /// + public static implicit operator DistributionMetricDescriptor(global::Vectara.MetricDescriptorBase value) => new DistributionMetricDescriptor((global::Vectara.MetricDescriptorBase?)value); + + /// + /// + /// + public static implicit operator global::Vectara.MetricDescriptorBase?(DistributionMetricDescriptor @this) => @this.Base; + + /// + /// + /// + public DistributionMetricDescriptor(global::Vectara.MetricDescriptorBase? value) + { + Base = value; + } + + /// + /// + /// + public static DistributionMetricDescriptor FromBase(global::Vectara.MetricDescriptorBase? value) => new DistributionMetricDescriptor(value); + + /// + /// + /// + public static implicit operator DistributionMetricDescriptor(global::Vectara.DistributionMetricDescriptorVariant2 value) => new DistributionMetricDescriptor((global::Vectara.DistributionMetricDescriptorVariant2?)value); + + /// + /// + /// + public static implicit operator global::Vectara.DistributionMetricDescriptorVariant2?(DistributionMetricDescriptor @this) => @this.DistributionMetricDescriptorVariant2; + + /// + /// + /// + public DistributionMetricDescriptor(global::Vectara.DistributionMetricDescriptorVariant2? value) + { + DistributionMetricDescriptorVariant2 = value; + } + + /// + /// + /// + public static DistributionMetricDescriptor FromDistributionMetricDescriptorVariant2(global::Vectara.DistributionMetricDescriptorVariant2? value) => new DistributionMetricDescriptor(value); + + /// + /// + /// + public DistributionMetricDescriptor( + global::Vectara.MetricDescriptorBase? @base, + global::Vectara.DistributionMetricDescriptorVariant2? distributionMetricDescriptorVariant2 + ) + { + Base = @base; + DistributionMetricDescriptorVariant2 = distributionMetricDescriptorVariant2; + } + + /// + /// + /// + public object? Object => + DistributionMetricDescriptorVariant2 as object ?? + Base as object + ; + + /// + /// + /// + public override string? ToString() => + Base?.ToString() ?? + DistributionMetricDescriptorVariant2?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsBase && IsDistributionMetricDescriptorVariant2; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? @base = null, + global::System.Func? distributionMetricDescriptorVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsBase && @base != null) + { + return @base(Base!); + } + else if (IsDistributionMetricDescriptorVariant2 && distributionMetricDescriptorVariant2 != null) + { + return distributionMetricDescriptorVariant2(DistributionMetricDescriptorVariant2!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? @base = null, + + global::System.Action? distributionMetricDescriptorVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsBase) + { + @base?.Invoke(Base!); + } + else if (IsDistributionMetricDescriptorVariant2) + { + distributionMetricDescriptorVariant2?.Invoke(DistributionMetricDescriptorVariant2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? @base = null, + global::System.Action? distributionMetricDescriptorVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsBase) + { + @base?.Invoke(Base!); + } + else if (IsDistributionMetricDescriptorVariant2) + { + distributionMetricDescriptorVariant2?.Invoke(DistributionMetricDescriptorVariant2!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Base, + typeof(global::Vectara.MetricDescriptorBase), + DistributionMetricDescriptorVariant2, + typeof(global::Vectara.DistributionMetricDescriptorVariant2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + + return global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(DistributionMetricDescriptor other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Base, other.Base) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(DistributionMetricDescriptorVariant2, other.DistributionMetricDescriptorVariant2) + ; + } + + /// + /// + /// + public static bool operator ==(DistributionMetricDescriptor obj1, DistributionMetricDescriptor obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(DistributionMetricDescriptor obj1, DistributionMetricDescriptor obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is DistributionMetricDescriptor o && Equals(o); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.DistributionMetricDescriptorVariant2.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.DistributionMetricDescriptorVariant2.Json.g.cs new file mode 100644 index 00000000..89a4953f --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.DistributionMetricDescriptorVariant2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public sealed partial class DistributionMetricDescriptorVariant2 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Vectara.DistributionMetricDescriptorVariant2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.DistributionMetricDescriptorVariant2), + jsonSerializerContext) as global::Vectara.DistributionMetricDescriptorVariant2; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Vectara.DistributionMetricDescriptorVariant2? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Vectara.DistributionMetricDescriptorVariant2), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.DistributionMetricDescriptorVariant2; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.DistributionMetricDescriptorVariant2.g.cs b/src/libs/Vectara/Generated/Vectara.Models.DistributionMetricDescriptorVariant2.g.cs new file mode 100644 index 00000000..77333172 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.DistributionMetricDescriptorVariant2.g.cs @@ -0,0 +1,60 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// + /// + public sealed partial class DistributionMetricDescriptorVariant2 + { + /// + /// Example: distribution + /// + /// distribution + [global::System.Text.Json.Serialization.JsonPropertyName("kind")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Kind { get; set; } + + /// + /// Bins that this distribution may emit, in canonical order. Each bin has a stable label, an inclusive lower bound, and an exclusive upper bound (omitted for the overflow bin). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("bins")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Bins { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Example: distribution + /// + /// + /// Bins that this distribution may emit, in canonical order. Each bin has a stable label, an inclusive lower bound, and an exclusive upper bound (omitted for the overflow bin). + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public DistributionMetricDescriptorVariant2( + string kind, + global::System.Collections.Generic.IList bins) + { + this.Kind = kind ?? throw new global::System.ArgumentNullException(nameof(kind)); + this.Bins = bins ?? throw new global::System.ArgumentNullException(nameof(bins)); + } + + /// + /// Initializes a new instance of the class. + /// + public DistributionMetricDescriptorVariant2() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.DistributionMetricPoint.g.cs b/src/libs/Vectara/Generated/Vectara.Models.DistributionMetricPoint.g.cs index 05cbaa61..a8fcf662 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.DistributionMetricPoint.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.DistributionMetricPoint.g.cs @@ -4,19 +4,19 @@ namespace Vectara { /// - /// A point in a distribution metric series — a histogram of value-bucketed counts at a time bucket. Only bins with non-zero counts appear. + /// A point in a distribution metric series. Bin labels match those declared on the metric's descriptor. Only bins with non-zero counts appear. /// public sealed partial class DistributionMetricPoint { /// - /// Start of the bucket window in ISO 8601 (UTC). End-time aligned. + /// Start of the time bin in ISO 8601 (UTC). End-time aligned. /// - [global::System.Text.Json.Serialization.JsonPropertyName("bucket_start")] + [global::System.Text.Json.Serialization.JsonPropertyName("bin_start")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.DateTime BucketStart { get; set; } + public required global::System.DateTime BinStart { get; set; } /// - /// Histogram bins, sorted by `lower_ms` ascending. + /// Per-bin counts for this time bin, sorted by the descriptor's canonical bin order. /// [global::System.Text.Json.Serialization.JsonPropertyName("bins")] [global::System.Text.Json.Serialization.JsonRequired] @@ -31,20 +31,20 @@ public sealed partial class DistributionMetricPoint /// /// Initializes a new instance of the class. /// - /// - /// Start of the bucket window in ISO 8601 (UTC). End-time aligned. + /// + /// Start of the time bin in ISO 8601 (UTC). End-time aligned. /// /// - /// Histogram bins, sorted by `lower_ms` ascending. + /// Per-bin counts for this time bin, sorted by the descriptor's canonical bin order. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public DistributionMetricPoint( - global::System.DateTime bucketStart, + global::System.DateTime binStart, global::System.Collections.Generic.IList bins) { - this.BucketStart = bucketStart; + this.BinStart = binStart; this.Bins = bins ?? throw new global::System.ArgumentNullException(nameof(bins)); } diff --git a/src/libs/Vectara/Generated/Vectara.Models.DistributionMetricSeries.g.cs b/src/libs/Vectara/Generated/Vectara.Models.DistributionMetricSeries.g.cs index 963fc976..f27600c8 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.DistributionMetricSeries.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.DistributionMetricSeries.g.cs @@ -5,7 +5,7 @@ namespace Vectara { /// - /// A series of histogram aggregates over a value-axis distribution table. + /// A series of distribution histograms. /// public readonly partial struct DistributionMetricSeries : global::System.IEquatable { diff --git a/src/libs/Vectara/Generated/Vectara.Models.DistributionMetricSeriesVariant2.g.cs b/src/libs/Vectara/Generated/Vectara.Models.DistributionMetricSeriesVariant2.g.cs index 9c102168..7b770e7b 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.DistributionMetricSeriesVariant2.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.DistributionMetricSeriesVariant2.g.cs @@ -9,14 +9,12 @@ namespace Vectara public sealed partial class DistributionMetricSeriesVariant2 { /// - /// Default Value: distribution
/// Example: distribution ///
- /// "distribution" /// distribution [global::System.Text.Json.Serialization.JsonPropertyName("kind")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Kind { get; set; } = "distribution"; + public required string Kind { get; set; } /// /// @@ -35,7 +33,6 @@ public sealed partial class DistributionMetricSeriesVariant2 /// Initializes a new instance of the class. /// /// - /// Default Value: distribution
/// Example: distribution /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.DocumentConversionToolParameters.g.cs b/src/libs/Vectara/Generated/Vectara.Models.DocumentConversionToolParameters.g.cs index 718df950..28050692 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.DocumentConversionToolParameters.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.DocumentConversionToolParameters.g.cs @@ -4,7 +4,7 @@ namespace Vectara { /// - /// Configurable parameters for the document conversion tool. If not overridden, they will be required by the LLM to fill in. + /// Configurable parameters for the document conversion tool. If not overridden, they will be required by the agent to fill in. /// public sealed partial class DocumentConversionToolParameters { diff --git a/src/libs/Vectara/Generated/Vectara.Models.GaugeMetricDescriptor.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.GaugeMetricDescriptor.Json.g.cs new file mode 100644 index 00000000..66500f20 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.GaugeMetricDescriptor.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public readonly partial struct GaugeMetricDescriptor + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Vectara.GaugeMetricDescriptor? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.GaugeMetricDescriptor), + jsonSerializerContext) as global::Vectara.GaugeMetricDescriptor?; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Vectara.GaugeMetricDescriptor? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Vectara.GaugeMetricDescriptor), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.GaugeMetricDescriptor?; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.GaugeMetricDescriptor.g.cs b/src/libs/Vectara/Generated/Vectara.Models.GaugeMetricDescriptor.g.cs new file mode 100644 index 00000000..811814f2 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.GaugeMetricDescriptor.g.cs @@ -0,0 +1,295 @@ +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace Vectara +{ + /// + /// Descriptor for a gauge metric. + /// + public readonly partial struct GaugeMetricDescriptor : global::System.IEquatable + { + /// + /// Common metadata fields shared by every metric descriptor regardless of kind. + /// +#if NET6_0_OR_GREATER + public global::Vectara.MetricDescriptorBase? Base { get; init; } +#else + public global::Vectara.MetricDescriptorBase? Base { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Base))] +#endif + public bool IsBase => Base != null; + + /// + /// + /// + public bool TryPickBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.MetricDescriptorBase? value) + { + value = Base; + return IsBase; + } + + /// + /// + /// + public global::Vectara.MetricDescriptorBase PickBase() => IsBase + ? Base! + : throw new global::System.InvalidOperationException($"Expected union variant 'Base' but the value was {ToString()}."); + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::Vectara.GaugeMetricDescriptorVariant2? GaugeMetricDescriptorVariant2 { get; init; } +#else + public global::Vectara.GaugeMetricDescriptorVariant2? GaugeMetricDescriptorVariant2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(GaugeMetricDescriptorVariant2))] +#endif + public bool IsGaugeMetricDescriptorVariant2 => GaugeMetricDescriptorVariant2 != null; + + /// + /// + /// + public bool TryPickGaugeMetricDescriptorVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.GaugeMetricDescriptorVariant2? value) + { + value = GaugeMetricDescriptorVariant2; + return IsGaugeMetricDescriptorVariant2; + } + + /// + /// + /// + public global::Vectara.GaugeMetricDescriptorVariant2 PickGaugeMetricDescriptorVariant2() => IsGaugeMetricDescriptorVariant2 + ? GaugeMetricDescriptorVariant2! + : throw new global::System.InvalidOperationException($"Expected union variant 'GaugeMetricDescriptorVariant2' but the value was {ToString()}."); + /// + /// + /// + public static implicit operator GaugeMetricDescriptor(global::Vectara.MetricDescriptorBase value) => new GaugeMetricDescriptor((global::Vectara.MetricDescriptorBase?)value); + + /// + /// + /// + public static implicit operator global::Vectara.MetricDescriptorBase?(GaugeMetricDescriptor @this) => @this.Base; + + /// + /// + /// + public GaugeMetricDescriptor(global::Vectara.MetricDescriptorBase? value) + { + Base = value; + } + + /// + /// + /// + public static GaugeMetricDescriptor FromBase(global::Vectara.MetricDescriptorBase? value) => new GaugeMetricDescriptor(value); + + /// + /// + /// + public static implicit operator GaugeMetricDescriptor(global::Vectara.GaugeMetricDescriptorVariant2 value) => new GaugeMetricDescriptor((global::Vectara.GaugeMetricDescriptorVariant2?)value); + + /// + /// + /// + public static implicit operator global::Vectara.GaugeMetricDescriptorVariant2?(GaugeMetricDescriptor @this) => @this.GaugeMetricDescriptorVariant2; + + /// + /// + /// + public GaugeMetricDescriptor(global::Vectara.GaugeMetricDescriptorVariant2? value) + { + GaugeMetricDescriptorVariant2 = value; + } + + /// + /// + /// + public static GaugeMetricDescriptor FromGaugeMetricDescriptorVariant2(global::Vectara.GaugeMetricDescriptorVariant2? value) => new GaugeMetricDescriptor(value); + + /// + /// + /// + public GaugeMetricDescriptor( + global::Vectara.MetricDescriptorBase? @base, + global::Vectara.GaugeMetricDescriptorVariant2? gaugeMetricDescriptorVariant2 + ) + { + Base = @base; + GaugeMetricDescriptorVariant2 = gaugeMetricDescriptorVariant2; + } + + /// + /// + /// + public object? Object => + GaugeMetricDescriptorVariant2 as object ?? + Base as object + ; + + /// + /// + /// + public override string? ToString() => + Base?.ToString() ?? + GaugeMetricDescriptorVariant2?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsBase && IsGaugeMetricDescriptorVariant2; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? @base = null, + global::System.Func? gaugeMetricDescriptorVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsBase && @base != null) + { + return @base(Base!); + } + else if (IsGaugeMetricDescriptorVariant2 && gaugeMetricDescriptorVariant2 != null) + { + return gaugeMetricDescriptorVariant2(GaugeMetricDescriptorVariant2!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? @base = null, + + global::System.Action? gaugeMetricDescriptorVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsBase) + { + @base?.Invoke(Base!); + } + else if (IsGaugeMetricDescriptorVariant2) + { + gaugeMetricDescriptorVariant2?.Invoke(GaugeMetricDescriptorVariant2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? @base = null, + global::System.Action? gaugeMetricDescriptorVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsBase) + { + @base?.Invoke(Base!); + } + else if (IsGaugeMetricDescriptorVariant2) + { + gaugeMetricDescriptorVariant2?.Invoke(GaugeMetricDescriptorVariant2!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Base, + typeof(global::Vectara.MetricDescriptorBase), + GaugeMetricDescriptorVariant2, + typeof(global::Vectara.GaugeMetricDescriptorVariant2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + + return global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(GaugeMetricDescriptor other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Base, other.Base) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(GaugeMetricDescriptorVariant2, other.GaugeMetricDescriptorVariant2) + ; + } + + /// + /// + /// + public static bool operator ==(GaugeMetricDescriptor obj1, GaugeMetricDescriptor obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(GaugeMetricDescriptor obj1, GaugeMetricDescriptor obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is GaugeMetricDescriptor o && Equals(o); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.GaugeMetricDescriptorVariant2.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.GaugeMetricDescriptorVariant2.Json.g.cs new file mode 100644 index 00000000..bebc116d --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.GaugeMetricDescriptorVariant2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public sealed partial class GaugeMetricDescriptorVariant2 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Vectara.GaugeMetricDescriptorVariant2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.GaugeMetricDescriptorVariant2), + jsonSerializerContext) as global::Vectara.GaugeMetricDescriptorVariant2; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Vectara.GaugeMetricDescriptorVariant2? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Vectara.GaugeMetricDescriptorVariant2), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.GaugeMetricDescriptorVariant2; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.GaugeMetricDescriptorVariant2.g.cs b/src/libs/Vectara/Generated/Vectara.Models.GaugeMetricDescriptorVariant2.g.cs new file mode 100644 index 00000000..e4c32817 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.GaugeMetricDescriptorVariant2.g.cs @@ -0,0 +1,48 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// + /// + public sealed partial class GaugeMetricDescriptorVariant2 + { + /// + /// Example: gauge + /// + /// gauge + [global::System.Text.Json.Serialization.JsonPropertyName("kind")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Kind { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Example: gauge + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public GaugeMetricDescriptorVariant2( + string kind) + { + this.Kind = kind ?? throw new global::System.ArgumentNullException(nameof(kind)); + } + + /// + /// Initializes a new instance of the class. + /// + public GaugeMetricDescriptorVariant2() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.GaugeMetricSeriesVariant2.g.cs b/src/libs/Vectara/Generated/Vectara.Models.GaugeMetricSeriesVariant2.g.cs index 59891d87..a1c7d053 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.GaugeMetricSeriesVariant2.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.GaugeMetricSeriesVariant2.g.cs @@ -9,14 +9,12 @@ namespace Vectara public sealed partial class GaugeMetricSeriesVariant2 { /// - /// Default Value: gauge
/// Example: gauge ///
- /// "gauge" /// gauge [global::System.Text.Json.Serialization.JsonPropertyName("kind")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Kind { get; set; } = "gauge"; + public required string Kind { get; set; } /// /// @@ -35,7 +33,6 @@ public sealed partial class GaugeMetricSeriesVariant2 /// Initializes a new instance of the class. /// /// - /// Default Value: gauge
/// Example: gauge /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.GetDocumentTextParameters.g.cs b/src/libs/Vectara/Generated/Vectara.Models.GetDocumentTextParameters.g.cs index 4a1bdb02..d38226e2 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.GetDocumentTextParameters.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.GetDocumentTextParameters.g.cs @@ -4,7 +4,7 @@ namespace Vectara { /// - /// Configurable parameters for the get document text tool. If not overridden, they will be required by the LLM to fill in. + /// Configurable parameters for the get document text tool. If not overridden, they will be required by the agent to fill in. /// public sealed partial class GetDocumentTextParameters { diff --git a/src/libs/Vectara/Generated/Vectara.Models.HistogramBin.g.cs b/src/libs/Vectara/Generated/Vectara.Models.HistogramBin.g.cs index 7f5bb6e8..e9b3b218 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.HistogramBin.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.HistogramBin.g.cs @@ -4,29 +4,23 @@ namespace Vectara { /// - /// A single bin in a distribution histogram. `upper_ms` is null for the overflow bin (everything ≥ the lower bound). + /// A single bin's count within a distribution response point. The bin's numeric range is declared on the metric's descriptor under `bins[].range_min` / `bins[].range_max`, keyed by `label`. Only bins with non-zero counts are included; descriptor bins absent from a response point have a count of zero. /// public sealed partial class HistogramBin { /// - /// Inclusive lower bound of the bin in milliseconds. + /// Bin label matching one of the labels declared on the metric's descriptor. /// - [global::System.Text.Json.Serialization.JsonPropertyName("lower_ms")] + [global::System.Text.Json.Serialization.JsonPropertyName("label")] [global::System.Text.Json.Serialization.JsonRequired] - public required double LowerMs { get; set; } + public required string Label { get; set; } /// - /// Exclusive upper bound of the bin in milliseconds. Null for the overflow bin. + /// Count of observations whose value fell in this bin for this time window. /// - [global::System.Text.Json.Serialization.JsonPropertyName("upper_ms")] - public double? UpperMs { get; set; } - - /// - /// Number of observations whose duration fell in `[lower_ms, upper_ms)`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("count")] + [global::System.Text.Json.Serialization.JsonPropertyName("value")] [global::System.Text.Json.Serialization.JsonRequired] - public required long Count { get; set; } + public required long Value { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -37,26 +31,21 @@ public sealed partial class HistogramBin /// /// Initializes a new instance of the class. /// - /// - /// Inclusive lower bound of the bin in milliseconds. - /// - /// - /// Number of observations whose duration fell in `[lower_ms, upper_ms)`. + /// + /// Bin label matching one of the labels declared on the metric's descriptor. /// - /// - /// Exclusive upper bound of the bin in milliseconds. Null for the overflow bin. + /// + /// Count of observations whose value fell in this bin for this time window. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public HistogramBin( - double lowerMs, - long count, - double? upperMs) + string label, + long value) { - this.LowerMs = lowerMs; - this.UpperMs = upperMs; - this.Count = count; + this.Label = label ?? throw new global::System.ArgumentNullException(nameof(label)); + this.Value = value; } /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.ImageReadToolParameters.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ImageReadToolParameters.g.cs index dd407519..e519f659 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.ImageReadToolParameters.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.ImageReadToolParameters.g.cs @@ -4,7 +4,7 @@ namespace Vectara { /// - /// Configurable parameters for the image read tool. If not overridden, they will be required by the LLM to fill in. + /// Configurable parameters for the image read tool. If not overridden, they will be required by the agent to fill in. /// public sealed partial class ImageReadToolParameters { diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineArtifactGrepToolConfigurationVariant2.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineArtifactGrepToolConfigurationVariant2.g.cs index 2c515f48..ae517fc0 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InlineArtifactGrepToolConfigurationVariant2.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineArtifactGrepToolConfigurationVariant2.g.cs @@ -18,7 +18,7 @@ public sealed partial class InlineArtifactGrepToolConfigurationVariant2 public required string Type { get; set; } = "artifact_grep"; /// - /// Configurable parameters for the artifact grep tool. If not overridden, they will be required by the LLM to fill in. + /// Configurable parameters for the artifact grep tool. If not overridden, they will be required by the agent to fill in. /// [global::System.Text.Json.Serialization.JsonPropertyName("argument_override")] public global::Vectara.ArtifactGrepToolParameters? ArgumentOverride { get; set; } @@ -37,7 +37,7 @@ public sealed partial class InlineArtifactGrepToolConfigurationVariant2 /// Default Value: artifact_grep /// /// - /// Configurable parameters for the artifact grep tool. If not overridden, they will be required by the LLM to fill in. + /// Configurable parameters for the artifact grep tool. If not overridden, they will be required by the agent to fill in. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineArtifactReadToolConfigurationVariant2.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineArtifactReadToolConfigurationVariant2.g.cs index dd678e02..e8838827 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InlineArtifactReadToolConfigurationVariant2.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineArtifactReadToolConfigurationVariant2.g.cs @@ -18,7 +18,7 @@ public sealed partial class InlineArtifactReadToolConfigurationVariant2 public required string Type { get; set; } = "artifact_read"; /// - /// Configurable parameters for the artifact read tool. If not overridden, they will be required by the LLM to fill in. + /// Configurable parameters for the artifact read tool. If not overridden, they will be required by the agent to fill in. /// [global::System.Text.Json.Serialization.JsonPropertyName("argument_override")] public global::Vectara.ArtifactReadToolParameters? ArgumentOverride { get; set; } @@ -43,7 +43,7 @@ public sealed partial class InlineArtifactReadToolConfigurationVariant2 /// Default Value: artifact_read /// /// - /// Configurable parameters for the artifact read tool. If not overridden, they will be required by the LLM to fill in. + /// Configurable parameters for the artifact read tool. If not overridden, they will be required by the agent to fill in. /// /// /// User-configurable settings for the artifact read tool. diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineCorporaSearchToolConfigurationVariant2.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineCorporaSearchToolConfigurationVariant2.g.cs index 3a738479..fa76c55f 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InlineCorporaSearchToolConfigurationVariant2.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineCorporaSearchToolConfigurationVariant2.g.cs @@ -18,7 +18,7 @@ public sealed partial class InlineCorporaSearchToolConfigurationVariant2 public required string Type { get; set; } = "corpora_search"; /// - /// LLM-exposed parameters for the corpora search tool that can be filled in during execution. + /// Agent-exposed parameters for the corpora search tool that can be filled in during execution. /// [global::System.Text.Json.Serialization.JsonPropertyName("argument_override")] public global::Vectara.CorporaSearchToolParameters? ArgumentOverride { get; set; } @@ -47,7 +47,7 @@ public sealed partial class InlineCorporaSearchToolConfigurationVariant2 /// Agent-specific query configuration that supports eager references. Use this in agent tool configurations when turn-start resolution is needed. /// /// - /// LLM-exposed parameters for the corpora search tool that can be filled in during execution. + /// Agent-exposed parameters for the corpora search tool that can be filled in during execution. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineDocumentConversionToolConfigurationVariant2.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineDocumentConversionToolConfigurationVariant2.g.cs index 6e29fb21..da96ebf4 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InlineDocumentConversionToolConfigurationVariant2.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineDocumentConversionToolConfigurationVariant2.g.cs @@ -18,7 +18,7 @@ public sealed partial class InlineDocumentConversionToolConfigurationVariant2 public required string Type { get; set; } = "document_conversion"; /// - /// Configurable parameters for the document conversion tool. If not overridden, they will be required by the LLM to fill in. + /// Configurable parameters for the document conversion tool. If not overridden, they will be required by the agent to fill in. /// [global::System.Text.Json.Serialization.JsonPropertyName("argument_override")] public global::Vectara.DocumentConversionToolParameters? ArgumentOverride { get; set; } @@ -37,7 +37,7 @@ public sealed partial class InlineDocumentConversionToolConfigurationVariant2 /// Default Value: document_conversion /// /// - /// Configurable parameters for the document conversion tool. If not overridden, they will be required by the LLM to fill in. + /// Configurable parameters for the document conversion tool. If not overridden, they will be required by the agent to fill in. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineDynamicVectaraToolConfigurationVariant2.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineDynamicVectaraToolConfigurationVariant2.g.cs index 32f7db5f..157c4344 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InlineDynamicVectaraToolConfigurationVariant2.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineDynamicVectaraToolConfigurationVariant2.g.cs @@ -27,7 +27,7 @@ public sealed partial class InlineDynamicVectaraToolConfigurationVariant2 public required string ToolId { get; set; } /// - /// Optional hardcoded arguments for tool calls. The key specifies the location in the tool arguments to overide, and the value specifies what to override with. The LLM will not be able to change the parameters, nor know those values exist within the tool.
+ /// Optional hardcoded arguments for tool calls. The key specifies the location in the tool arguments to overide, and the value specifies what to override with. The agent will not be able to change the parameters, nor know those values exist within the tool.
/// The values can also be dynamic references to context values using $ref with dot notation path syntax:
/// - Static value: "fixed_value" or 123
/// - Dynamic reference: `{"$ref": "session.metadata.field_name"}`
@@ -61,7 +61,7 @@ public sealed partial class InlineDynamicVectaraToolConfigurationVariant2 /// Example: tol_123e4567-e89b-12d3-a456-426614174000 /// /// - /// Optional hardcoded arguments for tool calls. The key specifies the location in the tool arguments to overide, and the value specifies what to override with. The LLM will not be able to change the parameters, nor know those values exist within the tool.
+ /// Optional hardcoded arguments for tool calls. The key specifies the location in the tool arguments to overide, and the value specifies what to override with. The agent will not be able to change the parameters, nor know those values exist within the tool.
/// The values can also be dynamic references to context values using $ref with dot notation path syntax:
/// - Static value: "fixed_value" or 123
/// - Dynamic reference: `{"$ref": "session.metadata.field_name"}`
diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineDynamicVectaraToolConfigurationVariant2ArgumentOverride.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineDynamicVectaraToolConfigurationVariant2ArgumentOverride.g.cs index 4a1b0cda..7b81d2b3 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InlineDynamicVectaraToolConfigurationVariant2ArgumentOverride.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineDynamicVectaraToolConfigurationVariant2ArgumentOverride.g.cs @@ -4,7 +4,7 @@ namespace Vectara { /// - /// Optional hardcoded arguments for tool calls. The key specifies the location in the tool arguments to overide, and the value specifies what to override with. The LLM will not be able to change the parameters, nor know those values exist within the tool.
+ /// Optional hardcoded arguments for tool calls. The key specifies the location in the tool arguments to overide, and the value specifies what to override with. The agent will not be able to change the parameters, nor know those values exist within the tool.
/// The values can also be dynamic references to context values using $ref with dot notation path syntax:
/// - Static value: "fixed_value" or 123
/// - Dynamic reference: `{"$ref": "session.metadata.field_name"}`
diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineGetDocumentTextToolConfigurationVariant2.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineGetDocumentTextToolConfigurationVariant2.g.cs index 9fc32033..5fd41a77 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InlineGetDocumentTextToolConfigurationVariant2.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineGetDocumentTextToolConfigurationVariant2.g.cs @@ -18,7 +18,7 @@ public sealed partial class InlineGetDocumentTextToolConfigurationVariant2 public required string Type { get; set; } = "get_document_text"; /// - /// Configurable parameters for the get document text tool. If not overridden, they will be required by the LLM to fill in. + /// Configurable parameters for the get document text tool. If not overridden, they will be required by the agent to fill in. /// [global::System.Text.Json.Serialization.JsonPropertyName("argument_override")] public global::Vectara.GetDocumentTextParameters? ArgumentOverride { get; set; } @@ -43,7 +43,7 @@ public sealed partial class InlineGetDocumentTextToolConfigurationVariant2 /// Default Value: get_document_text /// /// - /// Configurable parameters for the get document text tool. If not overridden, they will be required by the LLM to fill in. + /// Configurable parameters for the get document text tool. If not overridden, they will be required by the agent to fill in. /// /// /// User-configurable settings for the get document text tool. These parameters are never exposed to the agent. diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineImageReadToolConfigurationVariant2.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineImageReadToolConfigurationVariant2.g.cs index 3dcd03ad..fb2f8745 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InlineImageReadToolConfigurationVariant2.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineImageReadToolConfigurationVariant2.g.cs @@ -18,7 +18,7 @@ public sealed partial class InlineImageReadToolConfigurationVariant2 public required string Type { get; set; } = "image_read"; /// - /// Configurable parameters for the image read tool. If not overridden, they will be required by the LLM to fill in. + /// Configurable parameters for the image read tool. If not overridden, they will be required by the agent to fill in. /// [global::System.Text.Json.Serialization.JsonPropertyName("argument_override")] public global::Vectara.ImageReadToolParameters? ArgumentOverride { get; set; } @@ -37,7 +37,7 @@ public sealed partial class InlineImageReadToolConfigurationVariant2 /// Default Value: image_read /// /// - /// Configurable parameters for the image read tool. If not overridden, they will be required by the LLM to fill in. + /// Configurable parameters for the image read tool. If not overridden, they will be required by the agent to fill in. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineMcpToolConfigurationVariant2.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineMcpToolConfigurationVariant2.g.cs index 2db8b94d..3a74ceb4 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InlineMcpToolConfigurationVariant2.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineMcpToolConfigurationVariant2.g.cs @@ -27,7 +27,7 @@ public sealed partial class InlineMcpToolConfigurationVariant2 public required string ToolId { get; set; } /// - /// Optional hardcoded arguments for tool calls. The key specifies the location in the tool arguments to overide, and the value specifies what to override with. The LLM will not be able to change the parameters, nor know those values exist within the tool.
+ /// Optional hardcoded arguments for tool calls. The key specifies the location in the tool arguments to overide, and the value specifies what to override with. The agent will not be able to change the parameters, nor know those values exist within the tool.
/// The values can also be dynamic references to context values using $ref with dot notation path syntax:
/// - Static value: "fixed_value" or 123
/// - Dynamic reference: `{"$ref": "session.metadata.field_name"}`
@@ -61,7 +61,7 @@ public sealed partial class InlineMcpToolConfigurationVariant2 /// Example: tol_123e4567-e89b-12d3-a456-426614174000 /// /// - /// Optional hardcoded arguments for tool calls. The key specifies the location in the tool arguments to overide, and the value specifies what to override with. The LLM will not be able to change the parameters, nor know those values exist within the tool.
+ /// Optional hardcoded arguments for tool calls. The key specifies the location in the tool arguments to overide, and the value specifies what to override with. The agent will not be able to change the parameters, nor know those values exist within the tool.
/// The values can also be dynamic references to context values using $ref with dot notation path syntax:
/// - Static value: "fixed_value" or 123
/// - Dynamic reference: `{"$ref": "session.metadata.field_name"}`
diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineMcpToolConfigurationVariant2ArgumentOverride.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineMcpToolConfigurationVariant2ArgumentOverride.g.cs index 9a73d908..592a2084 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InlineMcpToolConfigurationVariant2ArgumentOverride.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineMcpToolConfigurationVariant2ArgumentOverride.g.cs @@ -4,7 +4,7 @@ namespace Vectara { /// - /// Optional hardcoded arguments for tool calls. The key specifies the location in the tool arguments to overide, and the value specifies what to override with. The LLM will not be able to change the parameters, nor know those values exist within the tool.
+ /// Optional hardcoded arguments for tool calls. The key specifies the location in the tool arguments to overide, and the value specifies what to override with. The agent will not be able to change the parameters, nor know those values exist within the tool.
/// The values can also be dynamic references to context values using $ref with dot notation path syntax:
/// - Static value: "fixed_value" or 123
/// - Dynamic reference: `{"$ref": "session.metadata.field_name"}`
diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineSubAgentToolConfigurationVariant2.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineSubAgentToolConfigurationVariant2.g.cs index 4c4a7e81..854f96ca 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InlineSubAgentToolConfigurationVariant2.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineSubAgentToolConfigurationVariant2.g.cs @@ -18,7 +18,7 @@ public sealed partial class InlineSubAgentToolConfigurationVariant2 public required string Type { get; set; } = "sub_agent"; /// - /// Configurable parameters for the sub-agent tool. If not overridden, they will be required by the LLM to fill in. + /// Configurable parameters for the sub-agent tool. If not overridden, they will be required by the agent to fill in. /// [global::System.Text.Json.Serialization.JsonPropertyName("argument_override")] public global::Vectara.SubAgentToolParameters? ArgumentOverride { get; set; } @@ -47,7 +47,7 @@ public sealed partial class InlineSubAgentToolConfigurationVariant2 /// User-configurable settings for the sub-agent tool. These parameters are never exposed to the agent. /// /// - /// Configurable parameters for the sub-agent tool. If not overridden, they will be required by the LLM to fill in. + /// Configurable parameters for the sub-agent tool. If not overridden, they will be required by the agent to fill in. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] diff --git a/src/libs/Vectara/Generated/Vectara.Models.MetricDescriptor.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.MetricDescriptor.Json.g.cs index 75d038f0..65d8a9ee 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.MetricDescriptor.Json.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.MetricDescriptor.Json.g.cs @@ -2,7 +2,7 @@ namespace Vectara { - public sealed partial class MetricDescriptor + public readonly partial struct MetricDescriptor { /// /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. @@ -41,7 +41,7 @@ public string ToJson( return global::System.Text.Json.JsonSerializer.Deserialize( json, typeof(global::Vectara.MetricDescriptor), - jsonSerializerContext) as global::Vectara.MetricDescriptor; + jsonSerializerContext) as global::Vectara.MetricDescriptor?; } /// @@ -70,7 +70,7 @@ public string ToJson( return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, typeof(global::Vectara.MetricDescriptor), - jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.MetricDescriptor; + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.MetricDescriptor?; } /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.MetricDescriptor.g.cs b/src/libs/Vectara/Generated/Vectara.Models.MetricDescriptor.g.cs index a8621146..bbdc6122 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.MetricDescriptor.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.MetricDescriptor.g.cs @@ -1,112 +1,469 @@ +#pragma warning disable CS0618 // Type or member is obsolete #nullable enable namespace Vectara { /// - /// Metadata about a registered metric available for querying. + /// Metadata about a registered metric. The concrete variant is selected by `kind`. /// - public sealed partial class MetricDescriptor + public readonly partial struct MetricDescriptor : global::System.IEquatable { /// - /// The unique name of the metric, used as the path parameter to query it.
- /// Example: agent.trace.duration_ms + /// ///
- /// agent.trace.duration_ms - [global::System.Text.Json.Serialization.JsonPropertyName("name")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Name { get; set; } + public global::Vectara.MetricDescriptorDiscriminatorKind? Kind { get; } /// - /// Human-readable description of what the metric measures. + /// Descriptor for a counter metric. /// - [global::System.Text.Json.Serialization.JsonPropertyName("description")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Description { get; set; } +#if NET6_0_OR_GREATER + public global::Vectara.CounterMetricDescriptor? Counter { get; init; } +#else + public global::Vectara.CounterMetricDescriptor? Counter { get; } +#endif /// - /// Unit of measure for the metric values, when applicable.
- /// Example: ms + /// ///
- /// ms - [global::System.Text.Json.Serialization.JsonPropertyName("unit")] - public string? Unit { get; set; } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Counter))] +#endif + public bool IsCounter => Counter != null; /// - /// The kind of metric. Determines combine semantics when filtering across multiple label values and the shape of points in the response:
- /// - `counter`: monotonic count or sum (trace count, error count, token totals). Combined by summing. Returns `ScalarMetricPoint`s.
- /// - `gauge`: point-in-time value (mean, max, distinct-count). Combined per the underlying aggregate state (weighted mean for averages, max for maxima, distinct-count for uniq metrics). Returns `ScalarMetricPoint`s.
- /// - `percentiles`: distribution percentiles over a t-digest aggregate. Combined by merging t-digest states. Returns `PercentilesMetricPoint`s.
- /// - `distribution`: histogram of value-bucketed counts. Combined by summing per-bin counts. Returns `DistributionMetricPoint`s. + /// ///
- [global::System.Text.Json.Serialization.JsonPropertyName("kind")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Vectara.JsonConverters.MetricKindJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::Vectara.MetricKind Kind { get; set; } + public bool TryPickCounter( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.CounterMetricDescriptor? value) + { + value = Counter; + return IsCounter; + } /// - /// Names of labels that can be used to filter this metric.
- /// Example: [agent_keys] + /// ///
- /// [agent_keys] - [global::System.Text.Json.Serialization.JsonPropertyName("labels")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Labels { get; set; } + public global::Vectara.CounterMetricDescriptor PickCounter() => IsCounter + ? Counter!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'Counter' but the value was {ToString()}."); /// - /// Additional properties that are not explicitly defined in the schema + /// Descriptor for a gauge metric. /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); +#if NET6_0_OR_GREATER + public global::Vectara.GaugeMetricDescriptor? Gauge { get; init; } +#else + public global::Vectara.GaugeMetricDescriptor? Gauge { get; } +#endif /// - /// Initializes a new instance of the class. + /// /// - /// - /// The unique name of the metric, used as the path parameter to query it.
- /// Example: agent.trace.duration_ms - /// - /// - /// Human-readable description of what the metric measures. - /// - /// - /// The kind of metric. Determines combine semantics when filtering across multiple label values and the shape of points in the response:
- /// - `counter`: monotonic count or sum (trace count, error count, token totals). Combined by summing. Returns `ScalarMetricPoint`s.
- /// - `gauge`: point-in-time value (mean, max, distinct-count). Combined per the underlying aggregate state (weighted mean for averages, max for maxima, distinct-count for uniq metrics). Returns `ScalarMetricPoint`s.
- /// - `percentiles`: distribution percentiles over a t-digest aggregate. Combined by merging t-digest states. Returns `PercentilesMetricPoint`s.
- /// - `distribution`: histogram of value-bucketed counts. Combined by summing per-bin counts. Returns `DistributionMetricPoint`s. - /// - /// - /// Names of labels that can be used to filter this metric.
- /// Example: [agent_keys] - /// - /// - /// Unit of measure for the metric values, when applicable.
- /// Example: ms - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Gauge))] #endif + public bool IsGauge => Gauge != null; + + /// + /// + /// + public bool TryPickGauge( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.GaugeMetricDescriptor? value) + { + value = Gauge; + return IsGauge; + } + + /// + /// + /// + public global::Vectara.GaugeMetricDescriptor PickGauge() => IsGauge + ? Gauge!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'Gauge' but the value was {ToString()}."); + + /// + /// Descriptor for a percentiles metric. Carries the ordered list of percentile labels this metric emits. + /// +#if NET6_0_OR_GREATER + public global::Vectara.PercentilesMetricDescriptor? Percentiles { get; init; } +#else + public global::Vectara.PercentilesMetricDescriptor? Percentiles { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Percentiles))] +#endif + public bool IsPercentiles => Percentiles != null; + + /// + /// + /// + public bool TryPickPercentiles( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.PercentilesMetricDescriptor? value) + { + value = Percentiles; + return IsPercentiles; + } + + /// + /// + /// + public global::Vectara.PercentilesMetricDescriptor PickPercentiles() => IsPercentiles + ? Percentiles!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'Percentiles' but the value was {ToString()}."); + + /// + /// Descriptor for a distribution metric. Carries the canonical bin list with numeric bounds. + /// +#if NET6_0_OR_GREATER + public global::Vectara.DistributionMetricDescriptor? Distribution { get; init; } +#else + public global::Vectara.DistributionMetricDescriptor? Distribution { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Distribution))] +#endif + public bool IsDistribution => Distribution != null; + + /// + /// + /// + public bool TryPickDistribution( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.DistributionMetricDescriptor? value) + { + value = Distribution; + return IsDistribution; + } + + /// + /// + /// + public global::Vectara.DistributionMetricDescriptor PickDistribution() => IsDistribution + ? Distribution!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'Distribution' but the value was {ToString()}."); + /// + /// + /// + public static implicit operator MetricDescriptor(global::Vectara.CounterMetricDescriptor value) => new MetricDescriptor((global::Vectara.CounterMetricDescriptor?)value); + + /// + /// + /// + public static implicit operator global::Vectara.CounterMetricDescriptor?(MetricDescriptor @this) => @this.Counter; + + /// + /// + /// + public MetricDescriptor(global::Vectara.CounterMetricDescriptor? value) + { + Counter = value; + } + + /// + /// + /// + public static MetricDescriptor FromCounter(global::Vectara.CounterMetricDescriptor? value) => new MetricDescriptor(value); + + /// + /// + /// + public static implicit operator MetricDescriptor(global::Vectara.GaugeMetricDescriptor value) => new MetricDescriptor((global::Vectara.GaugeMetricDescriptor?)value); + + /// + /// + /// + public static implicit operator global::Vectara.GaugeMetricDescriptor?(MetricDescriptor @this) => @this.Gauge; + + /// + /// + /// + public MetricDescriptor(global::Vectara.GaugeMetricDescriptor? value) + { + Gauge = value; + } + + /// + /// + /// + public static MetricDescriptor FromGauge(global::Vectara.GaugeMetricDescriptor? value) => new MetricDescriptor(value); + + /// + /// + /// + public static implicit operator MetricDescriptor(global::Vectara.PercentilesMetricDescriptor value) => new MetricDescriptor((global::Vectara.PercentilesMetricDescriptor?)value); + + /// + /// + /// + public static implicit operator global::Vectara.PercentilesMetricDescriptor?(MetricDescriptor @this) => @this.Percentiles; + + /// + /// + /// + public MetricDescriptor(global::Vectara.PercentilesMetricDescriptor? value) + { + Percentiles = value; + } + + /// + /// + /// + public static MetricDescriptor FromPercentiles(global::Vectara.PercentilesMetricDescriptor? value) => new MetricDescriptor(value); + + /// + /// + /// + public static implicit operator MetricDescriptor(global::Vectara.DistributionMetricDescriptor value) => new MetricDescriptor((global::Vectara.DistributionMetricDescriptor?)value); + + /// + /// + /// + public static implicit operator global::Vectara.DistributionMetricDescriptor?(MetricDescriptor @this) => @this.Distribution; + + /// + /// + /// + public MetricDescriptor(global::Vectara.DistributionMetricDescriptor? value) + { + Distribution = value; + } + + /// + /// + /// + public static MetricDescriptor FromDistribution(global::Vectara.DistributionMetricDescriptor? value) => new MetricDescriptor(value); + + /// + /// + /// public MetricDescriptor( - string name, - string description, - global::Vectara.MetricKind kind, - global::System.Collections.Generic.IList labels, - string? unit) + global::Vectara.MetricDescriptorDiscriminatorKind? kind, + global::Vectara.CounterMetricDescriptor? counter, + global::Vectara.GaugeMetricDescriptor? gauge, + global::Vectara.PercentilesMetricDescriptor? percentiles, + global::Vectara.DistributionMetricDescriptor? distribution + ) + { + Kind = kind; + + Counter = counter; + Gauge = gauge; + Percentiles = percentiles; + Distribution = distribution; + } + + /// + /// + /// + public object? Object => + Distribution as object ?? + Percentiles as object ?? + Gauge as object ?? + Counter as object + ; + + /// + /// + /// + public override string? ToString() => + Counter?.ToString() ?? + Gauge?.ToString() ?? + Percentiles?.ToString() ?? + Distribution?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsCounter && !IsGauge && !IsPercentiles && !IsDistribution || !IsCounter && IsGauge && !IsPercentiles && !IsDistribution || !IsCounter && !IsGauge && IsPercentiles && !IsDistribution || !IsCounter && !IsGauge && !IsPercentiles && IsDistribution; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? counter = null, + global::System.Func? gauge = null, + global::System.Func? percentiles = null, + global::System.Func? distribution = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsCounter && counter != null) + { + return counter(Counter!); + } + else if (IsGauge && gauge != null) + { + return gauge(Gauge!); + } + else if (IsPercentiles && percentiles != null) + { + return percentiles(Percentiles!); + } + else if (IsDistribution && distribution != null) + { + return distribution(Distribution!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? counter = null, + + global::System.Action? gauge = null, + + global::System.Action? percentiles = null, + + global::System.Action? distribution = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsCounter) + { + counter?.Invoke(Counter!); + } + else if (IsGauge) + { + gauge?.Invoke(Gauge!); + } + else if (IsPercentiles) + { + percentiles?.Invoke(Percentiles!); + } + else if (IsDistribution) + { + distribution?.Invoke(Distribution!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? counter = null, + global::System.Action? gauge = null, + global::System.Action? percentiles = null, + global::System.Action? distribution = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsCounter) + { + counter?.Invoke(Counter!); + } + else if (IsGauge) + { + gauge?.Invoke(Gauge!); + } + else if (IsPercentiles) + { + percentiles?.Invoke(Percentiles!); + } + else if (IsDistribution) + { + distribution?.Invoke(Distribution!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Counter, + typeof(global::Vectara.CounterMetricDescriptor), + Gauge, + typeof(global::Vectara.GaugeMetricDescriptor), + Percentiles, + typeof(global::Vectara.PercentilesMetricDescriptor), + Distribution, + typeof(global::Vectara.DistributionMetricDescriptor), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + + return global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(MetricDescriptor other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Counter, other.Counter) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Gauge, other.Gauge) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Percentiles, other.Percentiles) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Distribution, other.Distribution) + ; + } + + /// + /// + /// + public static bool operator ==(MetricDescriptor obj1, MetricDescriptor obj2) { - this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); - this.Description = description ?? throw new global::System.ArgumentNullException(nameof(description)); - this.Unit = unit; - this.Kind = kind; - this.Labels = labels ?? throw new global::System.ArgumentNullException(nameof(labels)); + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); } /// - /// Initializes a new instance of the class. + /// /// - public MetricDescriptor() + public static bool operator !=(MetricDescriptor obj1, MetricDescriptor obj2) { + return !(obj1 == obj2); } + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is MetricDescriptor o && Equals(o); + } } -} \ No newline at end of file +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.MetricDescriptorBase.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.MetricDescriptorBase.Json.g.cs new file mode 100644 index 00000000..492c809b --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.MetricDescriptorBase.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public sealed partial class MetricDescriptorBase + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Vectara.MetricDescriptorBase? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.MetricDescriptorBase), + jsonSerializerContext) as global::Vectara.MetricDescriptorBase; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Vectara.MetricDescriptorBase? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Vectara.MetricDescriptorBase), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.MetricDescriptorBase; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.MetricDescriptorBase.g.cs b/src/libs/Vectara/Generated/Vectara.Models.MetricDescriptorBase.g.cs new file mode 100644 index 00000000..2c967411 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.MetricDescriptorBase.g.cs @@ -0,0 +1,123 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// Common metadata fields shared by every metric descriptor regardless of kind. + /// + public sealed partial class MetricDescriptorBase + { + /// + /// The unique name of the metric, used as the path parameter to query it.
+ /// Example: agent.trace.duration_ms + ///
+ /// agent.trace.duration_ms + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Name { get; set; } + + /// + /// Top-level grouping for this metric.
+ /// Example: agent + ///
+ /// agent + [global::System.Text.Json.Serialization.JsonPropertyName("category")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Category { get; set; } + + /// + /// Human-readable description of what the metric measures. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("description")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Description { get; set; } + + /// + /// Unit of measure for the metric values, when applicable.
+ /// Example: ms + ///
+ /// ms + [global::System.Text.Json.Serialization.JsonPropertyName("unit")] + public string? Unit { get; set; } + + /// + /// Short human-readable name for this metric, suitable as a chart title or list
+ /// label.
+ /// Example: Trace duration percentiles + ///
+ /// Trace duration percentiles + [global::System.Text.Json.Serialization.JsonPropertyName("display_name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string DisplayName { get; set; } + + /// + /// Names of labels that can be used to filter this metric.
+ /// Example: [agent_keys] + ///
+ /// [agent_keys] + [global::System.Text.Json.Serialization.JsonPropertyName("labels")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Labels { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The unique name of the metric, used as the path parameter to query it.
+ /// Example: agent.trace.duration_ms + /// + /// + /// Top-level grouping for this metric.
+ /// Example: agent + /// + /// + /// Human-readable description of what the metric measures. + /// + /// + /// Short human-readable name for this metric, suitable as a chart title or list
+ /// label.
+ /// Example: Trace duration percentiles + /// + /// + /// Names of labels that can be used to filter this metric.
+ /// Example: [agent_keys] + /// + /// + /// Unit of measure for the metric values, when applicable.
+ /// Example: ms + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public MetricDescriptorBase( + string name, + string category, + string description, + string displayName, + global::System.Collections.Generic.IList labels, + string? unit) + { + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.Category = category ?? throw new global::System.ArgumentNullException(nameof(category)); + this.Description = description ?? throw new global::System.ArgumentNullException(nameof(description)); + this.Unit = unit; + this.DisplayName = displayName ?? throw new global::System.ArgumentNullException(nameof(displayName)); + this.Labels = labels ?? throw new global::System.ArgumentNullException(nameof(labels)); + } + + /// + /// Initializes a new instance of the class. + /// + public MetricDescriptorBase() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.MetricDescriptorDiscriminator.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.MetricDescriptorDiscriminator.Json.g.cs new file mode 100644 index 00000000..7a840a15 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.MetricDescriptorDiscriminator.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public sealed partial class MetricDescriptorDiscriminator + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Vectara.MetricDescriptorDiscriminator? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.MetricDescriptorDiscriminator), + jsonSerializerContext) as global::Vectara.MetricDescriptorDiscriminator; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Vectara.MetricDescriptorDiscriminator? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Vectara.MetricDescriptorDiscriminator), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.MetricDescriptorDiscriminator; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.MetricDescriptorDiscriminator.g.cs b/src/libs/Vectara/Generated/Vectara.Models.MetricDescriptorDiscriminator.g.cs new file mode 100644 index 00000000..29e77190 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.MetricDescriptorDiscriminator.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// + /// + public sealed partial class MetricDescriptorDiscriminator + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("kind")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Vectara.JsonConverters.MetricDescriptorDiscriminatorKindJsonConverter))] + public global::Vectara.MetricDescriptorDiscriminatorKind? Kind { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public MetricDescriptorDiscriminator( + global::Vectara.MetricDescriptorDiscriminatorKind? kind) + { + this.Kind = kind; + } + + /// + /// Initializes a new instance of the class. + /// + public MetricDescriptorDiscriminator() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.MetricDescriptorDiscriminatorKind.g.cs b/src/libs/Vectara/Generated/Vectara.Models.MetricDescriptorDiscriminatorKind.g.cs new file mode 100644 index 00000000..bab4b0be --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.MetricDescriptorDiscriminatorKind.g.cs @@ -0,0 +1,63 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// + /// + public enum MetricDescriptorDiscriminatorKind + { + /// + /// + /// + Counter, + /// + /// + /// + Distribution, + /// + /// + /// + Gauge, + /// + /// + /// + Percentiles, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class MetricDescriptorDiscriminatorKindExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this MetricDescriptorDiscriminatorKind value) + { + return value switch + { + MetricDescriptorDiscriminatorKind.Counter => "counter", + MetricDescriptorDiscriminatorKind.Distribution => "distribution", + MetricDescriptorDiscriminatorKind.Gauge => "gauge", + MetricDescriptorDiscriminatorKind.Percentiles => "percentiles", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static MetricDescriptorDiscriminatorKind? ToEnum(string value) + { + return value switch + { + "counter" => MetricDescriptorDiscriminatorKind.Counter, + "distribution" => MetricDescriptorDiscriminatorKind.Distribution, + "gauge" => MetricDescriptorDiscriminatorKind.Gauge, + "percentiles" => MetricDescriptorDiscriminatorKind.Percentiles, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.MetricKind.g.cs b/src/libs/Vectara/Generated/Vectara.Models.MetricKind.g.cs deleted file mode 100644 index 398b9187..00000000 --- a/src/libs/Vectara/Generated/Vectara.Models.MetricKind.g.cs +++ /dev/null @@ -1,67 +0,0 @@ - -#nullable enable - -namespace Vectara -{ - /// - /// The kind of metric. Determines combine semantics when filtering across multiple label values and the shape of points in the response:
- /// - `counter`: monotonic count or sum (trace count, error count, token totals). Combined by summing. Returns `ScalarMetricPoint`s.
- /// - `gauge`: point-in-time value (mean, max, distinct-count). Combined per the underlying aggregate state (weighted mean for averages, max for maxima, distinct-count for uniq metrics). Returns `ScalarMetricPoint`s.
- /// - `percentiles`: distribution percentiles over a t-digest aggregate. Combined by merging t-digest states. Returns `PercentilesMetricPoint`s.
- /// - `distribution`: histogram of value-bucketed counts. Combined by summing per-bin counts. Returns `DistributionMetricPoint`s. - ///
- public enum MetricKind - { - /// - /// monotonic count or sum (trace count, error count, token totals). Combined by summing. Returns `ScalarMetricPoint`s. - /// - Counter, - /// - /// distribution percentiles over a t-digest aggregate. Combined by merging t-digest states. Returns `PercentilesMetricPoint`s. - /// - Distribution, - /// - /// point-in-time value (mean, max, distinct-count). Combined per the underlying aggregate state (weighted mean for averages, max for maxima, distinct-count for uniq metrics). Returns `ScalarMetricPoint`s. - /// - Gauge, - /// - /// distribution percentiles over a t-digest aggregate. Combined by merging t-digest states. Returns `PercentilesMetricPoint`s. - /// - Percentiles, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class MetricKindExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this MetricKind value) - { - return value switch - { - MetricKind.Counter => "counter", - MetricKind.Distribution => "distribution", - MetricKind.Gauge => "gauge", - MetricKind.Percentiles => "percentiles", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static MetricKind? ToEnum(string value) - { - return value switch - { - "counter" => MetricKind.Counter, - "distribution" => MetricKind.Distribution, - "gauge" => MetricKind.Gauge, - "percentiles" => MetricKind.Percentiles, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.MetricSeries.g.cs b/src/libs/Vectara/Generated/Vectara.Models.MetricSeries.g.cs index 262ddc13..fb656d13 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.MetricSeries.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.MetricSeries.g.cs @@ -126,7 +126,7 @@ public bool TryPickPercentiles( : throw new global::System.InvalidOperationException($"Expected union variant 'Percentiles' but the value was {ToString()}."); /// - /// A series of histogram aggregates over a value-axis distribution table. + /// A series of distribution histograms. /// #if NET6_0_OR_GREATER public global::Vectara.DistributionMetricSeries? Distribution { get; init; } diff --git a/src/libs/Vectara/Generated/Vectara.Models.MetricSeriesBase.g.cs b/src/libs/Vectara/Generated/Vectara.Models.MetricSeriesBase.g.cs index 550b10cb..5fa63905 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.MetricSeriesBase.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.MetricSeriesBase.g.cs @@ -23,11 +23,11 @@ public sealed partial class MetricSeriesBase public required global::System.Collections.Generic.Dictionary> Labels { get; set; } /// - /// Width of each bucket in the returned series, in seconds. The server chooses this based on the requested time range and `max_buckets`. + /// Width of each time bin in the returned series, in seconds. The server chooses this based on the requested time range and `max_bins`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("bucket_size_seconds")] + [global::System.Text.Json.Serialization.JsonPropertyName("bin_size_seconds")] [global::System.Text.Json.Serialization.JsonRequired] - public required int BucketSizeSeconds { get; set; } + public required int BinSizeSeconds { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -44,8 +44,8 @@ public sealed partial class MetricSeriesBase /// /// The labels matched for this series. Echoes the filter values supplied in the request. /// - /// - /// Width of each bucket in the returned series, in seconds. The server chooses this based on the requested time range and `max_buckets`. + /// + /// Width of each time bin in the returned series, in seconds. The server chooses this based on the requested time range and `max_bins`. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] @@ -53,11 +53,11 @@ public sealed partial class MetricSeriesBase public MetricSeriesBase( string metricName, global::System.Collections.Generic.Dictionary> labels, - int bucketSizeSeconds) + int binSizeSeconds) { this.MetricName = metricName ?? throw new global::System.ArgumentNullException(nameof(metricName)); this.Labels = labels ?? throw new global::System.ArgumentNullException(nameof(labels)); - this.BucketSizeSeconds = bucketSizeSeconds; + this.BinSizeSeconds = binSizeSeconds; } /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.PercentileEntry.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.PercentileEntry.Json.g.cs new file mode 100644 index 00000000..086bd8b2 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.PercentileEntry.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public sealed partial class PercentileEntry + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Vectara.PercentileEntry? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.PercentileEntry), + jsonSerializerContext) as global::Vectara.PercentileEntry; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Vectara.PercentileEntry? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Vectara.PercentileEntry), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.PercentileEntry; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.PercentileEntry.g.cs b/src/libs/Vectara/Generated/Vectara.Models.PercentileEntry.g.cs new file mode 100644 index 00000000..54a7a420 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.PercentileEntry.g.cs @@ -0,0 +1,59 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// A single entry in a percentiles array. On a metric descriptor, `value` is the percentile rank (a fraction in [0, 1], e.g. `0.95` for p95). On a response point, `value` is the aggregated metric value at that percentile (e.g. duration in ms). The `label` is the stable key matching descriptor and point entries. + /// + public sealed partial class PercentileEntry + { + /// + /// Stable identifier for this percentile (e.g. `p50`, `p99`). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("label")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Label { get; set; } + + /// + /// Numeric value — the percentile rank on the descriptor, the aggregated value on a response point. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("value")] + [global::System.Text.Json.Serialization.JsonRequired] + public required double Value { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Stable identifier for this percentile (e.g. `p50`, `p99`). + /// + /// + /// Numeric value — the percentile rank on the descriptor, the aggregated value on a response point. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public PercentileEntry( + string label, + double value) + { + this.Label = label ?? throw new global::System.ArgumentNullException(nameof(label)); + this.Value = value; + } + + /// + /// Initializes a new instance of the class. + /// + public PercentileEntry() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.PercentilesMetricPointPercentiles.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.PercentilesMetricDescriptor.Json.g.cs similarity index 86% rename from src/libs/Vectara/Generated/Vectara.Models.PercentilesMetricPointPercentiles.Json.g.cs rename to src/libs/Vectara/Generated/Vectara.Models.PercentilesMetricDescriptor.Json.g.cs index 10c9e990..4356d1c9 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.PercentilesMetricPointPercentiles.Json.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.PercentilesMetricDescriptor.Json.g.cs @@ -2,7 +2,7 @@ namespace Vectara { - public sealed partial class PercentilesMetricPointPercentiles + public readonly partial struct PercentilesMetricDescriptor { /// /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. @@ -34,14 +34,14 @@ public string ToJson( /// /// Deserializes a JSON string using the provided JsonSerializerContext. /// - public static global::Vectara.PercentilesMetricPointPercentiles? FromJson( + public static global::Vectara.PercentilesMetricDescriptor? FromJson( string json, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return global::System.Text.Json.JsonSerializer.Deserialize( json, - typeof(global::Vectara.PercentilesMetricPointPercentiles), - jsonSerializerContext) as global::Vectara.PercentilesMetricPointPercentiles; + typeof(global::Vectara.PercentilesMetricDescriptor), + jsonSerializerContext) as global::Vectara.PercentilesMetricDescriptor?; } /// @@ -51,11 +51,11 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::Vectara.PercentilesMetricPointPercentiles? FromJson( + public static global::Vectara.PercentilesMetricDescriptor? FromJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { - return global::System.Text.Json.JsonSerializer.Deserialize( + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); } @@ -63,14 +63,14 @@ public string ToJson( /// /// Deserializes a JSON stream using the provided JsonSerializerContext. /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, - typeof(global::Vectara.PercentilesMetricPointPercentiles), - jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.PercentilesMetricPointPercentiles; + typeof(global::Vectara.PercentilesMetricDescriptor), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.PercentilesMetricDescriptor?; } /// @@ -80,11 +80,11 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); } diff --git a/src/libs/Vectara/Generated/Vectara.Models.PercentilesMetricDescriptor.g.cs b/src/libs/Vectara/Generated/Vectara.Models.PercentilesMetricDescriptor.g.cs new file mode 100644 index 00000000..dd03118b --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.PercentilesMetricDescriptor.g.cs @@ -0,0 +1,295 @@ +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace Vectara +{ + /// + /// Descriptor for a percentiles metric. Carries the ordered list of percentile labels this metric emits. + /// + public readonly partial struct PercentilesMetricDescriptor : global::System.IEquatable + { + /// + /// Common metadata fields shared by every metric descriptor regardless of kind. + /// +#if NET6_0_OR_GREATER + public global::Vectara.MetricDescriptorBase? Base { get; init; } +#else + public global::Vectara.MetricDescriptorBase? Base { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Base))] +#endif + public bool IsBase => Base != null; + + /// + /// + /// + public bool TryPickBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.MetricDescriptorBase? value) + { + value = Base; + return IsBase; + } + + /// + /// + /// + public global::Vectara.MetricDescriptorBase PickBase() => IsBase + ? Base! + : throw new global::System.InvalidOperationException($"Expected union variant 'Base' but the value was {ToString()}."); + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::Vectara.PercentilesMetricDescriptorVariant2? PercentilesMetricDescriptorVariant2 { get; init; } +#else + public global::Vectara.PercentilesMetricDescriptorVariant2? PercentilesMetricDescriptorVariant2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(PercentilesMetricDescriptorVariant2))] +#endif + public bool IsPercentilesMetricDescriptorVariant2 => PercentilesMetricDescriptorVariant2 != null; + + /// + /// + /// + public bool TryPickPercentilesMetricDescriptorVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.PercentilesMetricDescriptorVariant2? value) + { + value = PercentilesMetricDescriptorVariant2; + return IsPercentilesMetricDescriptorVariant2; + } + + /// + /// + /// + public global::Vectara.PercentilesMetricDescriptorVariant2 PickPercentilesMetricDescriptorVariant2() => IsPercentilesMetricDescriptorVariant2 + ? PercentilesMetricDescriptorVariant2! + : throw new global::System.InvalidOperationException($"Expected union variant 'PercentilesMetricDescriptorVariant2' but the value was {ToString()}."); + /// + /// + /// + public static implicit operator PercentilesMetricDescriptor(global::Vectara.MetricDescriptorBase value) => new PercentilesMetricDescriptor((global::Vectara.MetricDescriptorBase?)value); + + /// + /// + /// + public static implicit operator global::Vectara.MetricDescriptorBase?(PercentilesMetricDescriptor @this) => @this.Base; + + /// + /// + /// + public PercentilesMetricDescriptor(global::Vectara.MetricDescriptorBase? value) + { + Base = value; + } + + /// + /// + /// + public static PercentilesMetricDescriptor FromBase(global::Vectara.MetricDescriptorBase? value) => new PercentilesMetricDescriptor(value); + + /// + /// + /// + public static implicit operator PercentilesMetricDescriptor(global::Vectara.PercentilesMetricDescriptorVariant2 value) => new PercentilesMetricDescriptor((global::Vectara.PercentilesMetricDescriptorVariant2?)value); + + /// + /// + /// + public static implicit operator global::Vectara.PercentilesMetricDescriptorVariant2?(PercentilesMetricDescriptor @this) => @this.PercentilesMetricDescriptorVariant2; + + /// + /// + /// + public PercentilesMetricDescriptor(global::Vectara.PercentilesMetricDescriptorVariant2? value) + { + PercentilesMetricDescriptorVariant2 = value; + } + + /// + /// + /// + public static PercentilesMetricDescriptor FromPercentilesMetricDescriptorVariant2(global::Vectara.PercentilesMetricDescriptorVariant2? value) => new PercentilesMetricDescriptor(value); + + /// + /// + /// + public PercentilesMetricDescriptor( + global::Vectara.MetricDescriptorBase? @base, + global::Vectara.PercentilesMetricDescriptorVariant2? percentilesMetricDescriptorVariant2 + ) + { + Base = @base; + PercentilesMetricDescriptorVariant2 = percentilesMetricDescriptorVariant2; + } + + /// + /// + /// + public object? Object => + PercentilesMetricDescriptorVariant2 as object ?? + Base as object + ; + + /// + /// + /// + public override string? ToString() => + Base?.ToString() ?? + PercentilesMetricDescriptorVariant2?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsBase && IsPercentilesMetricDescriptorVariant2; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? @base = null, + global::System.Func? percentilesMetricDescriptorVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsBase && @base != null) + { + return @base(Base!); + } + else if (IsPercentilesMetricDescriptorVariant2 && percentilesMetricDescriptorVariant2 != null) + { + return percentilesMetricDescriptorVariant2(PercentilesMetricDescriptorVariant2!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? @base = null, + + global::System.Action? percentilesMetricDescriptorVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsBase) + { + @base?.Invoke(Base!); + } + else if (IsPercentilesMetricDescriptorVariant2) + { + percentilesMetricDescriptorVariant2?.Invoke(PercentilesMetricDescriptorVariant2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? @base = null, + global::System.Action? percentilesMetricDescriptorVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsBase) + { + @base?.Invoke(Base!); + } + else if (IsPercentilesMetricDescriptorVariant2) + { + percentilesMetricDescriptorVariant2?.Invoke(PercentilesMetricDescriptorVariant2!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Base, + typeof(global::Vectara.MetricDescriptorBase), + PercentilesMetricDescriptorVariant2, + typeof(global::Vectara.PercentilesMetricDescriptorVariant2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + + return global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(PercentilesMetricDescriptor other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Base, other.Base) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(PercentilesMetricDescriptorVariant2, other.PercentilesMetricDescriptorVariant2) + ; + } + + /// + /// + /// + public static bool operator ==(PercentilesMetricDescriptor obj1, PercentilesMetricDescriptor obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(PercentilesMetricDescriptor obj1, PercentilesMetricDescriptor obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is PercentilesMetricDescriptor o && Equals(o); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.PercentilesMetricDescriptorVariant2.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.PercentilesMetricDescriptorVariant2.Json.g.cs new file mode 100644 index 00000000..70062cd3 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.PercentilesMetricDescriptorVariant2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public sealed partial class PercentilesMetricDescriptorVariant2 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Vectara.PercentilesMetricDescriptorVariant2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.PercentilesMetricDescriptorVariant2), + jsonSerializerContext) as global::Vectara.PercentilesMetricDescriptorVariant2; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Vectara.PercentilesMetricDescriptorVariant2? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Vectara.PercentilesMetricDescriptorVariant2), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.PercentilesMetricDescriptorVariant2; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.PercentilesMetricDescriptorVariant2.g.cs b/src/libs/Vectara/Generated/Vectara.Models.PercentilesMetricDescriptorVariant2.g.cs new file mode 100644 index 00000000..deefe0b9 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.PercentilesMetricDescriptorVariant2.g.cs @@ -0,0 +1,63 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// + /// + public sealed partial class PercentilesMetricDescriptorVariant2 + { + /// + /// Example: percentiles + /// + /// percentiles + [global::System.Text.Json.Serialization.JsonPropertyName("kind")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Kind { get; set; } + + /// + /// Percentile entries returned by this metric, in canonical order. Each entry's `label` matches a corresponding entry in every response point's `percentiles` array; `value` is the percentile rank (e.g. `0.5` for p50).
+ /// Example: [{"label":"p50","value":0.5}, {"label":"p90","value":0.9}, {"label":"p95","value":0.95}, {"label":"p99","value":0.99}] + ///
+ /// [{"label":"p50","value":0.5}, {"label":"p90","value":0.9}, {"label":"p95","value":0.95}, {"label":"p99","value":0.99}] + [global::System.Text.Json.Serialization.JsonPropertyName("percentiles")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Percentiles { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Example: percentiles + /// + /// + /// Percentile entries returned by this metric, in canonical order. Each entry's `label` matches a corresponding entry in every response point's `percentiles` array; `value` is the percentile rank (e.g. `0.5` for p50).
+ /// Example: [{"label":"p50","value":0.5}, {"label":"p90","value":0.9}, {"label":"p95","value":0.95}, {"label":"p99","value":0.99}] + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public PercentilesMetricDescriptorVariant2( + string kind, + global::System.Collections.Generic.IList percentiles) + { + this.Kind = kind ?? throw new global::System.ArgumentNullException(nameof(kind)); + this.Percentiles = percentiles ?? throw new global::System.ArgumentNullException(nameof(percentiles)); + } + + /// + /// Initializes a new instance of the class. + /// + public PercentilesMetricDescriptorVariant2() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.PercentilesMetricPoint.g.cs b/src/libs/Vectara/Generated/Vectara.Models.PercentilesMetricPoint.g.cs index 2618c9e7..79ea2b58 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.PercentilesMetricPoint.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.PercentilesMetricPoint.g.cs @@ -4,23 +4,23 @@ namespace Vectara { /// - /// A point in a percentiles metric series. + /// A point in a percentiles metric series. Entries correspond by `label` to the descriptor's `percentiles` array, in the same canonical order. /// public sealed partial class PercentilesMetricPoint { /// - /// Start of the bucket window in ISO 8601 (UTC). End-time aligned. + /// Start of the time bin in ISO 8601 (UTC). End-time aligned. /// - [global::System.Text.Json.Serialization.JsonPropertyName("bucket_start")] + [global::System.Text.Json.Serialization.JsonPropertyName("bin_start")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.DateTime BucketStart { get; set; } + public required global::System.DateTime BinStart { get; set; } /// - /// Map of percentile label to value. Keys follow the `p<N>` convention (e.g. `p50`, `p99`, `p99_9` for the 99.9th percentile). + /// Per-percentile aggregated values for this time bin. Each entry's `value` is the metric's aggregated value at the percentile identified by `label`. /// [global::System.Text.Json.Serialization.JsonPropertyName("percentiles")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.Dictionary Percentiles { get; set; } + public required global::System.Collections.Generic.IList Percentiles { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -31,20 +31,20 @@ public sealed partial class PercentilesMetricPoint /// /// Initializes a new instance of the class. /// - /// - /// Start of the bucket window in ISO 8601 (UTC). End-time aligned. + /// + /// Start of the time bin in ISO 8601 (UTC). End-time aligned. /// /// - /// Map of percentile label to value. Keys follow the `p<N>` convention (e.g. `p50`, `p99`, `p99_9` for the 99.9th percentile). + /// Per-percentile aggregated values for this time bin. Each entry's `value` is the metric's aggregated value at the percentile identified by `label`. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public PercentilesMetricPoint( - global::System.DateTime bucketStart, - global::System.Collections.Generic.Dictionary percentiles) + global::System.DateTime binStart, + global::System.Collections.Generic.IList percentiles) { - this.BucketStart = bucketStart; + this.BinStart = binStart; this.Percentiles = percentiles ?? throw new global::System.ArgumentNullException(nameof(percentiles)); } diff --git a/src/libs/Vectara/Generated/Vectara.Models.PercentilesMetricPointPercentiles.g.cs b/src/libs/Vectara/Generated/Vectara.Models.PercentilesMetricPointPercentiles.g.cs deleted file mode 100644 index 17c27158..00000000 --- a/src/libs/Vectara/Generated/Vectara.Models.PercentilesMetricPointPercentiles.g.cs +++ /dev/null @@ -1,19 +0,0 @@ - -#nullable enable - -namespace Vectara -{ - /// - /// Map of percentile label to value. Keys follow the `p<N>` convention (e.g. `p50`, `p99`, `p99_9` for the 99.9th percentile). - /// - public sealed partial class PercentilesMetricPointPercentiles - { - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - } -} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.PercentilesMetricSeriesVariant2.g.cs b/src/libs/Vectara/Generated/Vectara.Models.PercentilesMetricSeriesVariant2.g.cs index 0d3f6931..e0e62397 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.PercentilesMetricSeriesVariant2.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.PercentilesMetricSeriesVariant2.g.cs @@ -9,14 +9,12 @@ namespace Vectara public sealed partial class PercentilesMetricSeriesVariant2 { /// - /// Default Value: percentiles
/// Example: percentiles ///
- /// "percentiles" /// percentiles [global::System.Text.Json.Serialization.JsonPropertyName("kind")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Kind { get; set; } = "percentiles"; + public required string Kind { get; set; } /// /// @@ -35,7 +33,6 @@ public sealed partial class PercentilesMetricSeriesVariant2 /// Initializes a new instance of the class. /// /// - /// Default Value: percentiles
/// Example: percentiles /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.ScalarMetricPoint.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ScalarMetricPoint.g.cs index 82f8be6f..e7130025 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.ScalarMetricPoint.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.ScalarMetricPoint.g.cs @@ -4,19 +4,19 @@ namespace Vectara { /// - /// A point in a counter or gauge metric series — a single scalar value at a time bucket. + /// A point in a counter or gauge metric series. A single scalar value at a time bin. /// public sealed partial class ScalarMetricPoint { /// - /// Start of the bucket window in ISO 8601 (UTC). End-time aligned. + /// Start of the time bin in ISO 8601 (UTC). End-time aligned. /// - [global::System.Text.Json.Serialization.JsonPropertyName("bucket_start")] + [global::System.Text.Json.Serialization.JsonPropertyName("bin_start")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.DateTime BucketStart { get; set; } + public required global::System.DateTime BinStart { get; set; } /// - /// The aggregated value for this bucket. + /// The aggregated value for this time bin. /// [global::System.Text.Json.Serialization.JsonPropertyName("value")] [global::System.Text.Json.Serialization.JsonRequired] @@ -31,20 +31,20 @@ public sealed partial class ScalarMetricPoint /// /// Initializes a new instance of the class. /// - /// - /// Start of the bucket window in ISO 8601 (UTC). End-time aligned. + /// + /// Start of the time bin in ISO 8601 (UTC). End-time aligned. /// /// - /// The aggregated value for this bucket. + /// The aggregated value for this time bin. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ScalarMetricPoint( - global::System.DateTime bucketStart, + global::System.DateTime binStart, double value) { - this.BucketStart = bucketStart; + this.BinStart = binStart; this.Value = value; } diff --git a/src/libs/Vectara/Generated/Vectara.Models.SubAgentConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.Models.SubAgentConfiguration.g.cs index 8aa3a1e2..f9c388bf 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.SubAgentConfiguration.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.SubAgentConfiguration.g.cs @@ -19,7 +19,7 @@ public sealed partial class SubAgentConfiguration /// /// Controls session behavior for sub-agent invocations:
- /// - llm_controlled: LLM decides whether to create new or resume existing session
+ /// - llm_controlled: the agent decides whether to create a new session or resume an existing one
/// - persistent: Always reuse the same session (created on first invocation)
/// - ephemeral: Always create a new session on each invocation
/// Default Value: ephemeral
@@ -54,7 +54,7 @@ public sealed partial class SubAgentConfiguration /// /// /// Controls session behavior for sub-agent invocations:
- /// - llm_controlled: LLM decides whether to create new or resume existing session
+ /// - llm_controlled: the agent decides whether to create a new session or resume an existing one
/// - persistent: Always reuse the same session (created on first invocation)
/// - ephemeral: Always create a new session on each invocation
/// Default Value: ephemeral
diff --git a/src/libs/Vectara/Generated/Vectara.Models.SubAgentSessionMode.g.cs b/src/libs/Vectara/Generated/Vectara.Models.SubAgentSessionMode.g.cs index a0597402..f4b790a0 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.SubAgentSessionMode.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.SubAgentSessionMode.g.cs @@ -5,7 +5,7 @@ namespace Vectara { /// /// Controls session behavior for sub-agent invocations:
- /// - llm_controlled: LLM decides whether to create new or resume existing session
+ /// - llm_controlled: the agent decides whether to create a new session or resume an existing one
/// - persistent: Always reuse the same session (created on first invocation)
/// - ephemeral: Always create a new session on each invocation
/// Default Value: ephemeral
@@ -18,7 +18,7 @@ public enum SubAgentSessionMode ///
Ephemeral, /// - /// LLM decides whether to create new or resume existing session + /// the agent decides whether to create a new session or resume an existing one /// LlmControlled, /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.SubAgentToolParameters.g.cs b/src/libs/Vectara/Generated/Vectara.Models.SubAgentToolParameters.g.cs index 5444c5e7..f248ae4f 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.SubAgentToolParameters.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.SubAgentToolParameters.g.cs @@ -4,7 +4,7 @@ namespace Vectara { /// - /// Configurable parameters for the sub-agent tool. If not overridden, they will be required by the LLM to fill in. + /// Configurable parameters for the sub-agent tool. If not overridden, they will be required by the agent to fill in. /// public sealed partial class SubAgentToolParameters { diff --git a/src/libs/Vectara/Generated/Vectara.Models.ToolBase.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ToolBase.g.cs index 783914b0..0cda5cb2 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.ToolBase.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.ToolBase.g.cs @@ -31,7 +31,7 @@ public sealed partial class ToolBase public string? Title { get; set; } /// - /// The description provided to the agent (LLM) to guide tool selection during conversations.
+ /// The description provided to the agent to guide tool selection.
/// This is what the agent sees when deciding which tool to use. ///
[global::System.Text.Json.Serialization.JsonPropertyName("description")] @@ -101,11 +101,11 @@ public sealed partial class ToolBase public object? OutputSchema { get; set; } /// - /// An optional jq expression applied to the tool's JSON output before it is returned to the LLM.
+ /// An optional jq expression applied to the tool's JSON output before it is returned to the agent.
/// Use this to project, filter, or summarize tool output to keep responses concise and on-topic.
/// The expression operates on the tool's response JSON and the result replaces the original output.
- /// If the expression fails to compile or evaluate at runtime, the tool call is reported to the LLM as
- /// an error so the agent can react.
+ /// If the expression fails to compile or evaluate at runtime, the tool call is reported to the agent
+ /// as an error so the agent can react.
/// Examples:
/// - `.results | map({title, url})` — keep only title/url for each result
/// - `.items[0:5]` — first 5 items
@@ -117,7 +117,28 @@ public sealed partial class ToolBase public string? DefaultOutputTransform { get; set; } /// - /// Optional hardcoded arguments for tool calls. The key specifies the location in the tool arguments to overide, and the value specifies what to override with. The LLM will not be able to change the parameters, nor know those values exist within the tool.
+ /// An optional jq expression applied to the tool's input after argument overrides have been merged
+ /// with the agent's arguments and before the tool is invoked. Use this to inject server-side
+ /// context (session metadata, agent secrets) into the tool input, or to reshape the agent's
+ /// arguments.
+ /// The expression receives the standard runtime context — the same `agent`, `session`, `tools`,
+ /// and `currentDate` values exposed to `argument_override` `$ref`s (see `ArgumentOverrideDescription`),
+ /// plus an `args` field containing the merged tool input. The output of the expression replaces
+ /// `args` as the tool input. The pre-transform `args` is what appears in audit events (with
+ /// secrets masked); the post-transform value goes only to the tool. If the expression fails to
+ /// compile or evaluate, the tool call is reported to the agent as an error.
+ /// Examples:
+ /// - `.args + { auth: ("Bearer " + .agent.secrets.token) }` — inject a bearer header
+ /// - `.args | .corpus_key = .session.metadata.corpus_key` — pull a corpus key from session metadata
+ /// - `.args | .query = (.args.query + " " + .session.metadata.query_suffix)` — augment the agent's query
+ /// Example: .args + { auth: ("Bearer " + .agent.secrets.token) } + ///
+ /// .args + { auth: ("Bearer " + .agent.secrets.token) } + [global::System.Text.Json.Serialization.JsonPropertyName("default_input_transform")] + public string? DefaultInputTransform { get; set; } + + /// + /// Optional hardcoded arguments for tool calls. The key specifies the location in the tool arguments to overide, and the value specifies what to override with. The agent will not be able to change the parameters, nor know those values exist within the tool.
/// The values can also be dynamic references to context values using $ref with dot notation path syntax:
/// - Static value: "fixed_value" or 123
/// - Dynamic reference: `{"$ref": "session.metadata.field_name"}`
@@ -180,7 +201,7 @@ public sealed partial class ToolBase /// Unique identifier for the tool. /// /// - /// The description provided to the agent (LLM) to guide tool selection during conversations.
+ /// The description provided to the agent to guide tool selection.
/// This is what the agent sees when deciding which tool to use. /// /// @@ -223,19 +244,36 @@ public sealed partial class ToolBase /// understand the shape of tool responses and to author `default_output_transform` jq expressions. /// /// - /// An optional jq expression applied to the tool's JSON output before it is returned to the LLM.
+ /// An optional jq expression applied to the tool's JSON output before it is returned to the agent.
/// Use this to project, filter, or summarize tool output to keep responses concise and on-topic.
/// The expression operates on the tool's response JSON and the result replaces the original output.
- /// If the expression fails to compile or evaluate at runtime, the tool call is reported to the LLM as
- /// an error so the agent can react.
+ /// If the expression fails to compile or evaluate at runtime, the tool call is reported to the agent
+ /// as an error so the agent can react.
/// Examples:
/// - `.results | map({title, url})` — keep only title/url for each result
/// - `.items[0:5]` — first 5 items
/// - `del(.debug)` — drop a noisy field
/// Example: .results | map({title, url}) /// + /// + /// An optional jq expression applied to the tool's input after argument overrides have been merged
+ /// with the agent's arguments and before the tool is invoked. Use this to inject server-side
+ /// context (session metadata, agent secrets) into the tool input, or to reshape the agent's
+ /// arguments.
+ /// The expression receives the standard runtime context — the same `agent`, `session`, `tools`,
+ /// and `currentDate` values exposed to `argument_override` `$ref`s (see `ArgumentOverrideDescription`),
+ /// plus an `args` field containing the merged tool input. The output of the expression replaces
+ /// `args` as the tool input. The pre-transform `args` is what appears in audit events (with
+ /// secrets masked); the post-transform value goes only to the tool. If the expression fails to
+ /// compile or evaluate, the tool call is reported to the agent as an error.
+ /// Examples:
+ /// - `.args + { auth: ("Bearer " + .agent.secrets.token) }` — inject a bearer header
+ /// - `.args | .corpus_key = .session.metadata.corpus_key` — pull a corpus key from session metadata
+ /// - `.args | .query = (.args.query + " " + .session.metadata.query_suffix)` — augment the agent's query
+ /// Example: .args + { auth: ("Bearer " + .agent.secrets.token) } + /// /// - /// Optional hardcoded arguments for tool calls. The key specifies the location in the tool arguments to overide, and the value specifies what to override with. The LLM will not be able to change the parameters, nor know those values exist within the tool.
+ /// Optional hardcoded arguments for tool calls. The key specifies the location in the tool arguments to overide, and the value specifies what to override with. The agent will not be able to change the parameters, nor know those values exist within the tool.
/// The values can also be dynamic references to context values using $ref with dot notation path syntax:
/// - Static value: "fixed_value" or 123
/// - Dynamic reference: `{"$ref": "session.metadata.field_name"}`
@@ -279,6 +317,7 @@ public ToolBase( global::System.DateTime? updatedAt, object? outputSchema, string? defaultOutputTransform, + string? defaultInputTransform, object? defaultArgumentOverride, string? category, string? lineage, @@ -298,6 +337,7 @@ public ToolBase( this.InputSchema = inputSchema ?? throw new global::System.ArgumentNullException(nameof(inputSchema)); this.OutputSchema = outputSchema; this.DefaultOutputTransform = defaultOutputTransform; + this.DefaultInputTransform = defaultInputTransform; this.DefaultArgumentOverride = defaultArgumentOverride; this.Category = category; this.Lineage = lineage; diff --git a/src/libs/Vectara/Generated/Vectara.Models.ToolBaseDefaultArgumentOverride.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ToolBaseDefaultArgumentOverride.g.cs index 045667c5..aafc1f12 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.ToolBaseDefaultArgumentOverride.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.ToolBaseDefaultArgumentOverride.g.cs @@ -4,7 +4,7 @@ namespace Vectara { /// - /// Optional hardcoded arguments for tool calls. The key specifies the location in the tool arguments to overide, and the value specifies what to override with. The LLM will not be able to change the parameters, nor know those values exist within the tool.
+ /// Optional hardcoded arguments for tool calls. The key specifies the location in the tool arguments to overide, and the value specifies what to override with. The agent will not be able to change the parameters, nor know those values exist within the tool.
/// The values can also be dynamic references to context values using $ref with dot notation path syntax:
/// - Static value: "fixed_value" or 123
/// - Dynamic reference: `{"$ref": "session.metadata.field_name"}`
diff --git a/src/libs/Vectara/Generated/Vectara.Models.UpdateAgentStep.g.cs b/src/libs/Vectara/Generated/Vectara.Models.UpdateAgentStep.g.cs index 3a4c229e..fc53dae9 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.UpdateAgentStep.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.UpdateAgentStep.g.cs @@ -34,7 +34,7 @@ public sealed partial class UpdateAgentStep public global::Vectara.AgentOutputParser? OutputParser { get; set; } /// - /// Reminders injected into conversation messages. Set to null to clear all reminders. + /// Reminders injected into the session as the agent runs. Set to null to clear all reminders. /// [global::System.Text.Json.Serialization.JsonPropertyName("reminders")] public global::System.Collections.Generic.IList? Reminders { get; set; } @@ -81,7 +81,7 @@ public sealed partial class UpdateAgentStep /// The output parser determines how the agent's responses are processed before being returned to the user. /// /// - /// Reminders injected into conversation messages. Set to null to clear all reminders. + /// Reminders injected into the session as the agent runs. Set to null to clear all reminders. /// /// /// Conditional transitions to other steps. Set to null to clear. diff --git a/src/libs/Vectara/Generated/Vectara.Models.UpdateFirstAgentStep.g.cs b/src/libs/Vectara/Generated/Vectara.Models.UpdateFirstAgentStep.g.cs index d6005301..8be3480f 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.UpdateFirstAgentStep.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.UpdateFirstAgentStep.g.cs @@ -40,7 +40,7 @@ public sealed partial class UpdateFirstAgentStep public global::Vectara.AgentOutputParser? OutputParser { get; set; } /// - /// Reminders injected into conversation messages. Set to null to clear all reminders. + /// Reminders injected into the session as the agent runs. Set to null to clear all reminders. /// [global::System.Text.Json.Serialization.JsonPropertyName("reminders")] public global::System.Collections.Generic.IList? Reminders { get; set; } @@ -90,7 +90,7 @@ public sealed partial class UpdateFirstAgentStep /// The output parser determines how the agent's responses are processed before being returned to the user. /// /// - /// Reminders injected into conversation messages. Set to null to clear all reminders. + /// Reminders injected into the session as the agent runs. Set to null to clear all reminders. /// /// /// Conditional transitions to other steps. Set to null to clear. diff --git a/src/libs/Vectara/Generated/Vectara.Models.WebGetAuth.g.cs b/src/libs/Vectara/Generated/Vectara.Models.WebGetAuth.g.cs index b441fd1a..94b60427 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.WebGetAuth.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.WebGetAuth.g.cs @@ -16,7 +16,7 @@ namespace Vectara /// /// Explicitly disables authentication. Useful in argument_override to force a tool config to
- /// clear any auth the LLM would otherwise supply, since merge semantics ignore null patches. + /// clear any auth the agent would otherwise supply, since merge semantics ignore null patches. ///
#if NET6_0_OR_GREATER public global::Vectara.WebGetNoAuth? None { get; init; } diff --git a/src/libs/Vectara/Generated/Vectara.Models.WebGetNoAuth.g.cs b/src/libs/Vectara/Generated/Vectara.Models.WebGetNoAuth.g.cs index ec1232d3..d7a63581 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.WebGetNoAuth.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.WebGetNoAuth.g.cs @@ -5,7 +5,7 @@ namespace Vectara { /// /// Explicitly disables authentication. Useful in argument_override to force a tool config to
- /// clear any auth the LLM would otherwise supply, since merge semantics ignore null patches. + /// clear any auth the agent would otherwise supply, since merge semantics ignore null patches. ///
public sealed partial class WebGetNoAuth { diff --git a/src/libs/Vectara/Generated/Vectara.ToolsClient.Create.g.cs b/src/libs/Vectara/Generated/Vectara.ToolsClient.Create.g.cs index 76611b39..9ca3bfc5 100644 --- a/src/libs/Vectara/Generated/Vectara.ToolsClient.Create.g.cs +++ b/src/libs/Vectara/Generated/Vectara.ToolsClient.Create.g.cs @@ -63,7 +63,7 @@ partial void ProcessCreateResponseContent( /// /// Create tool
- /// Create a new tool that agents can use during conversation. Tools give agents capabilities to interact with external systems, process data, query corpora, or run custom logic. Agents select and invoke tools dynamically based on their instructions and the conversational context.
+ /// Create a new tool that agents can call. Tools give agents capabilities to interact with external systems, process data, query corpora, or run custom logic. Agents select and invoke tools dynamically based on their instructions and the current session.
/// Vectara provides several built-in tools, but you can also create your own. This endpoint currently supports creating **Lambda tools**, which run user-defined Python functions in a secure sandbox.
/// Each tool is defined by:
/// - A unique tool ID
@@ -103,7 +103,7 @@ partial void ProcessCreateResponseContent( } /// /// Create tool
- /// Create a new tool that agents can use during conversation. Tools give agents capabilities to interact with external systems, process data, query corpora, or run custom logic. Agents select and invoke tools dynamically based on their instructions and the conversational context.
+ /// Create a new tool that agents can call. Tools give agents capabilities to interact with external systems, process data, query corpora, or run custom logic. Agents select and invoke tools dynamically based on their instructions and the current session.
/// Vectara provides several built-in tools, but you can also create your own. This endpoint currently supports creating **Lambda tools**, which run user-defined Python functions in a secure sandbox.
/// Each tool is defined by:
/// - A unique tool ID
diff --git a/src/libs/Vectara/Generated/Vectara.VectaraClient.g.cs b/src/libs/Vectara/Generated/Vectara.VectaraClient.g.cs index 1597d216..ed14316c 100644 --- a/src/libs/Vectara/Generated/Vectara.VectaraClient.g.cs +++ b/src/libs/Vectara/Generated/Vectara.VectaraClient.g.cs @@ -7,7 +7,7 @@ namespace Vectara /// The Vectara Platform to context engineer Enterprise Agents. The REST API gives you server-side control with enterprise-grade RBAC, multi-tenancy, and full observability. Build agents that combine Vectara's multimodal retrieval with tool use, structured instructions, and managed sessions — all through simple REST endpoints.
/// All endpoints live at `https://api.vectara.io/v2/<resource>` using lowercase, hyphenated paths (e.g. `/corpora/:corpus_key/documents`).
/// ## API conventions
- /// We follow standard REST conventions: `GET` to read, `POST` to create, `PATCH` to update, `PUT` to replace, and `DELETE` to remove. Actions that don't map to CRUD verbs use a separate `POST /<resource>/<action>` path (e.g. `POST /corpora/:corpus_key/reset`).
+ /// We follow standard REST conventions: `GET` to read, `POST` to create, `PUT` to replace, and `DELETE` to remove. A small number of endpoints use `PATCH` for partial update; most updates use `PUT`. Actions that don't map to CRUD verbs use a separate `POST /<resource>/<action>` path (e.g. `POST /corpora/:corpus_key/reset`).
/// **Backward compatibility** — New fields may be added to any response at any time. Fields are never removed, only deprecated. Clients should ignore unknown fields. We aim for strong backward compatibility, though the agentic AI space is evolving rapidly and agent-related APIs may see more frequent additions.
/// ## Authentication methods
/// Every API request must be authenticated using one of these methods:
diff --git a/src/libs/Vectara/openapi.yaml b/src/libs/Vectara/openapi.yaml index 5b28516c..a61b6bf3 100644 --- a/src/libs/Vectara/openapi.yaml +++ b/src/libs/Vectara/openapi.yaml @@ -8,20 +8,20 @@ info: \ simple REST endpoints.\n\nAll endpoints live at `https://api.vectara.io/v2/`\ \ using lowercase, hyphenated paths (e.g. `/corpora/:corpus_key/documents`).\n\ \n## API conventions\n\nWe follow standard REST conventions: `GET` to read, `POST`\ - \ to create, `PATCH` to update, `PUT` to replace, and `DELETE` to remove. Actions\ - \ that don't map to CRUD verbs use a separate `POST //` path\ - \ (e.g. `POST /corpora/:corpus_key/reset`).\n\n**Backward compatibility** \u2014\ - \ New fields may be added to any response at any time. Fields are never removed,\ - \ only deprecated. Clients should ignore unknown fields. We aim for strong backward\ - \ compatibility, though the agentic AI space is evolving rapidly and agent-related\ - \ APIs may see more frequent additions.\n\n## Authentication methods\n\nEvery\ - \ API request must be authenticated using one of these methods:\n\n**API Key**\ - \ \u2014 Pass your key in the `x-api-key` header. Create API keys with precise\ - \ roles for least-privilege access, or use personal API keys that inherit the\ - \ same roles as your user account.\n\n**OAuth 2.0** \u2014 Use the client credentials\ - \ flow to obtain a JWT token from `https://auth.vectara.io/oauth2/token`, then\ - \ pass it in the `Authorization: Bearer ` header. Tokens expire after 30\ - \ minutes.\n\n## Role-based access control\n\nEach endpoint requires specific\ + \ to create, `PUT` to replace, and `DELETE` to remove. A small number of endpoints\ + \ use `PATCH` for partial update; most updates use `PUT`. Actions that don't map\ + \ to CRUD verbs use a separate `POST //` path (e.g. `POST /corpora/:corpus_key/reset`).\n\ + \n**Backward compatibility** \u2014 New fields may be added to any response at\ + \ any time. Fields are never removed, only deprecated. Clients should ignore unknown\ + \ fields. We aim for strong backward compatibility, though the agentic AI space\ + \ is evolving rapidly and agent-related APIs may see more frequent additions.\n\ + \n## Authentication methods\n\nEvery API request must be authenticated using one\ + \ of these methods:\n\n**API Key** \u2014 Pass your key in the `x-api-key` header.\ + \ Create API keys with precise roles for least-privilege access, or use personal\ + \ API keys that inherit the same roles as your user account.\n\n**OAuth 2.0**\ + \ \u2014 Use the client credentials flow to obtain a JWT token from `https://auth.vectara.io/oauth2/token`,\ + \ then pass it in the `Authorization: Bearer ` header. Tokens expire after\ + \ 30 minutes.\n\n## Role-based access control\n\nEach endpoint requires specific\ \ roles. The role badges on each endpoint page show which roles grant access.\ \ Vectara uses three role types:\n\n**API Roles** (account-wide, assigned to users):\ \ Roles like `owner`, `administrator`, `corpus_administrator`, `corpus_developer`,\ @@ -7535,21 +7535,20 @@ paths: - agent_administrator - administrator - owner - description: "Create a new tool that agents can use during conversation. Tools\ - \ give agents capabilities to interact with external systems, process data,\ - \ query corpora, or run custom logic. Agents select and invoke tools dynamically\ - \ based on their instructions and the conversational context.\n\nVectara provides\ - \ several built-in tools, but you can also create your own. This endpoint\ - \ currently supports creating **Lambda tools**, which run user-defined Python\ - \ functions in a secure sandbox.\n\nEach tool is defined by:\n- A unique tool\ - \ ID\n- A description of its purpose\n- An input schema describing accepted\ - \ parameters\n- Optional metadata\n- Enabled/disabled runtime availability\n\ - \n ## Artifact-based tools\nSome built-in tools work with artifacts stored\ - \ in a session:\n- **Document conversion tool**: Converts file artifacts (PDF,\ - \ Word, PowerPoint, images with OCR support) to markdown and produces new\ - \ artifacts containing the extracted content.\n\nThese built-in tools operate\ - \ on artifact references rather than file content, supporting multi-step workflows\ - \ where agents process or index user-uploaded documents.\n" + description: "Create a new tool that agents can call. Tools give agents capabilities\ + \ to interact with external systems, process data, query corpora, or run custom\ + \ logic. Agents select and invoke tools dynamically based on their instructions\ + \ and the current session.\n\nVectara provides several built-in tools, but\ + \ you can also create your own. This endpoint currently supports creating\ + \ **Lambda tools**, which run user-defined Python functions in a secure sandbox.\n\ + \nEach tool is defined by:\n- A unique tool ID\n- A description of its purpose\n\ + - An input schema describing accepted parameters\n- Optional metadata\n- Enabled/disabled\ + \ runtime availability\n\n ## Artifact-based tools\nSome built-in tools work\ + \ with artifacts stored in a session:\n- **Document conversion tool**: Converts\ + \ file artifacts (PDF, Word, PowerPoint, images with OCR support) to markdown\ + \ and produces new artifacts containing the extracted content.\n\nThese built-in\ + \ tools operate on artifact references rather than file content, supporting\ + \ multi-step workflows where agents process or index user-uploaded documents.\n" operationId: createTool parameters: - $ref: '#/components/parameters/RequestTimeout' @@ -8530,39 +8529,46 @@ paths: - agent_administrator - administrator - owner - description: "Create a new agent. An agent is compromised as 3 main things of\ - \ functionality:\n 1. The **instructions** an agent follows. Known as a system\ - \ in prompt in other platforms.\n 2. The **steps** an agent follows when\ - \ receiving an input.\n 3. The **tools** an agent can use to resolve those\ - \ steps and instructions.\n\nInstructions are tied to each step, and should\ - \ be precisely crafted so that the agent can perform the desired actions when\ - \ given an input. \n\n:::tip Creating more precise instructions\nBe specific\ - \ to exactly what you want the agent to do. For emphasis, use CAPS if you\ - \ want the agent to follow a specific format. Negative prompts also help with\ - \ precision such as saying **DO NOT DO THIS**.\n:::\n\nTo use an agent, create\ - \ a new session (called thread or chat in other platforms), and send new inputs\ - \ to the agent to get responses.\n\n:::note\nOnly a single step is supported\ - \ with no follow up steps. So the `first_step` will be only the only step.\ - \ We will add multiple steps and step types to execute complex workflows,\ - \ but many agents can work well with a single step.\n:::\n\n## LLM configuration\n\ - \nAgents use LLMs for reasoning and response generation. You can configure\ - \ the following:\n- **Model**: Choose from available models like GPT-4o.\n\ - - **Parameters**: Adjust temperature, max tokens, and other model-specific\ - \ settings.\n- **Cost optimization**: Balance performance with token usage.\n\ - - **Retry configuration**: Configure automatic retry behavior for transient\ - \ failures.\n\n## Using retries to improve user experience\n\nWhen agents\ - \ interact with LLMs, transient failures like network interruptions can disrupt\ - \ communication between the agent and the LLM. You can configure your agent\ - \ to resume disrupted communication to ensure a smooth user experience.\n\ - - `max_retries`: After an error, the agent will retry its request to the LLM\ - \ this many times.\n- `initial_backoff_ms`: This is how many milliseconds\ - \ the agent will wait before retrying, to give the cause of the error time\ - \ to resolve.\n- `backoff_factor`: Every time the agent retries, it can multiply\ - \ the last retry delay by this number, increasing the wait between retries.\ - \ This is like giving a toddler a longer and longer timeout if it continues\ - \ to misbehave.\n- `max_backoff_ms`: The maximum time you want the agent to\ - \ wait between retries, so the backoff_factor does not create an unreasonably\ - \ long delay for your users.\n" + description: 'Creates an agent. An agent is defined by three things: the **instructions** + it follows, the **steps** it executes when it receives an input, and the **tools** + it can call. Instructions are attached to each step and determine the agent''s + behavior on that step. + + + Only a single step is currently supported. Set `first_step` to that step; + additional step types will be added later. + + + To invoke an agent, create a session and send events to it. Each event produces + a response from the agent. + + + ## LLM configuration + + + Each agent is bound to one LLM, configured under `llm`: + + - `llm_name`: the LLM resource to use (see `GET /v2/llms`). + + - model parameters such as temperature and max tokens. + + - retry configuration applied to LLM calls. + + + ## Retry configuration + + + The agent retries failed LLM calls using exponential backoff: + + - `max_retries`: maximum number of retries after the initial call. + + - `initial_backoff_ms`: delay in milliseconds before the first retry. + + - `backoff_factor`: multiplier applied to the delay after each retry. + + - `max_backoff_ms`: upper bound on the delay between retries. + + ' operationId: createAgent parameters: - $ref: '#/components/parameters/RequestTimeout' @@ -8938,14 +8944,14 @@ paths: - administrator - owner description: "Create a new session for interacting with an agent. A session\ - \ is the conversation container that maintains state across all messages,\ - \ events, tool use, and agent responses.\n\nThis endpoint initializes the\ - \ session and enables you to configure its initial properties, including optional\ - \ metadata. Metadata can influence agent behavior, personalize responses,\ - \ or apply access controls. Instructions and tools can also reference metadata\ - \ using `${\\session.metadata.field}` or `$\\ref` syntax.\n\nA session also\ - \ serves as the workspace for artifacts, enabling file uploads and multi-step\ - \ workflows. For more information, see [Working with artifacts in sessions](https://docs.vectara.com/docs/agent-os/sessions#working-with-artifacts-in-sessions).\n\ + \ maintains state across all events, tool use, and agent responses produced\ + \ during the interaction.\n\nThis endpoint initializes the session and enables\ + \ you to configure its initial properties, including optional metadata. Metadata\ + \ can influence agent behavior, personalize responses, or apply access controls.\ + \ Instructions and tools can also reference metadata using `${\\session.metadata.field}`\ + \ or `$\\ref` syntax.\n\nA session also serves as the workspace for artifacts,\ + \ enabling file uploads and multi-step workflows. For more information, see\ + \ [Working with artifacts in sessions](https://docs.vectara.com/docs/agent-os/sessions#working-with-artifacts-in-sessions).\n\ \n## Example request\n\n```json\n\\$ curl -X POST https://api.vectara.io/v2/agents/support-agent/sessions\ \ \\\n-H \"Authorization: Bearer YOUR_API_KEY\" \\\n-H \"Content-Type: application/json\"\ \ \\\n-d '{\n \"key\": \"user_12345_session\",\n \"name\": \"Customer Support\ @@ -11982,6 +11988,17 @@ paths: parameters: - $ref: '#/components/parameters/RequestTimeout' - $ref: '#/components/parameters/RequestTimeoutMillis' + - name: category + in: query + required: false + description: Restrict the returned catalog to metrics in these categories. + When omitted, all categories are returned. + style: form + explode: true + schema: + type: array + items: + type: string responses: '200': description: Catalog of registered metrics. @@ -12044,12 +12061,12 @@ paths: schema: type: string format: date-time - - name: max_buckets + - name: max_bins in: query required: false description: Upper bound on the number of points in the response. The response - may contain fewer points than requested but never more. The actual bucket - size is reported in the response as `bucket_size_seconds`. Defaults to 60. + may contain fewer points than requested but never more. The actual time-bin + size is reported in the response as `bin_size_seconds`. Defaults to 60. schema: type: integer format: int32 @@ -18192,17 +18209,37 @@ components: type: string OutputTransform: description: "An optional jq expression applied to the tool's JSON output before\ - \ it is returned to the LLM.\nUse this to project, filter, or summarize tool\ - \ output to keep responses concise and on-topic.\n\nThe expression operates\ + \ it is returned to the agent.\nUse this to project, filter, or summarize\ + \ tool output to keep responses concise and on-topic.\n\nThe expression operates\ \ on the tool's response JSON and the result replaces the original output.\n\ If the expression fails to compile or evaluate at runtime, the tool call is\ - \ reported to the LLM as\nan error so the agent can react.\n\nExamples:\n\ + \ reported to the agent\nas an error so the agent can react.\n\nExamples:\n\ \ - `.results | map({title, url})` \u2014 keep only title/url for each result\n\ \ - `.items[0:5]` \u2014 first 5 items\n - `del(.debug)` \u2014 drop a noisy\ \ field\n" type: string maxLength: 4096 example: .results | map({title, url}) + InputTransform: + description: "An optional jq expression applied to the tool's input after argument\ + \ overrides have been merged\nwith the agent's arguments and before the tool\ + \ is invoked. Use this to inject server-side\ncontext (session metadata, agent\ + \ secrets) into the tool input, or to reshape the agent's\narguments.\n\n\ + The expression receives the standard runtime context \u2014 the same `agent`,\ + \ `session`, `tools`,\nand `currentDate` values exposed to `argument_override`\ + \ `$ref`s (see `ArgumentOverrideDescription`),\nplus an `args` field containing\ + \ the merged tool input. The output of the expression replaces\n`args` as\ + \ the tool input. The pre-transform `args` is what appears in audit events\ + \ (with\nsecrets masked); the post-transform value goes only to the tool.\ + \ If the expression fails to\ncompile or evaluate, the tool call is reported\ + \ to the agent as an error.\n\nExamples:\n - `.args + { auth: (\"Bearer \"\ + \ + .agent.secrets.token) }` \u2014 inject a bearer header\n - `.args | .corpus_key\ + \ = .session.metadata.corpus_key` \u2014 pull a corpus key from session metadata\n\ + \ - `.args | .query = (.args.query + \" \" + .session.metadata.query_suffix)`\ + \ \u2014 augment the agent's query\n" + type: string + maxLength: 4096 + example: '.args + { auth: ("Bearer " + .agent.secrets.token) }' ToolBase: description: Base properties shared by all tool types. type: object @@ -18216,8 +18253,7 @@ components: description: Human-readable title of the tool. type: string description: - description: 'The description provided to the agent (LLM) to guide tool - selection during conversations. + description: 'The description provided to the agent to guide tool selection. This is what the agent sees when deciding which tool to use. @@ -18278,10 +18314,21 @@ components: ' $ref: '#/components/schemas/OutputTransform' + default_input_transform: + description: 'Default jq expression applied to this tool''s input when a + tool configuration does not + + specify its own `input_transform`. Tool configurations may override this + value. See + + `InputTransform` for the expression semantics and error behavior. + + ' + $ref: '#/components/schemas/InputTransform' default_argument_override: description: "Optional hardcoded arguments for tool calls. The key specifies\ \ the location in the tool arguments to overide, and the value specifies\ - \ what to override with. The LLM will not be able to change the parameters,\ + \ what to override with. The agent will not be able to change the parameters,\ \ nor know those values exist within the tool.\n\nThe values can also\ \ be dynamic references to context values using $ref with dot notation\ \ path syntax:\n- Static value: \"fixed_value\" or 123\n- Dynamic reference:\ @@ -19523,6 +19570,8 @@ components: $ref: '#/components/schemas/ToolDescriptionTemplate' output_transform: $ref: '#/components/schemas/OutputTransform' + input_transform: + $ref: '#/components/schemas/InputTransform' InlineDynamicVectaraToolConfiguration: title: InlineDynamicVectaraToolConfiguration description: 'An inline configuration for built-in Vectara tools that have implementations @@ -19545,7 +19594,7 @@ components: argument_override: description: "Optional hardcoded arguments for tool calls. The key specifies\ \ the location in the tool arguments to overide, and the value specifies\ - \ what to override with. The LLM will not be able to change the parameters,\ + \ what to override with. The agent will not be able to change the parameters,\ \ nor know those values exist within the tool.\n\nThe values can also\ \ be dynamic references to context values using $ref with dot notation\ \ path syntax:\n- Static value: \"fixed_value\" or 123\n- Dynamic reference:\ @@ -19582,7 +19631,7 @@ components: argument_override: description: "Optional hardcoded arguments for tool calls. The key specifies\ \ the location in the tool arguments to overide, and the value specifies\ - \ what to override with. The LLM will not be able to change the parameters,\ + \ what to override with. The agent will not be able to change the parameters,\ \ nor know those values exist within the tool.\n\nThe values can also\ \ be dynamic references to context values using $ref with dot notation\ \ path syntax:\n- Static value: \"fixed_value\" or 123\n- Dynamic reference:\ @@ -19603,7 +19652,7 @@ components: x-vectaraParents: - AgentToolConfiguration CorporaSearchToolParameters: - description: LLM-exposed parameters for the corpora search tool that can be + description: Agent-exposed parameters for the corpora search tool that can be filled in during execution. type: object properties: @@ -19848,7 +19897,7 @@ components: description: 'Explicitly disables authentication. Useful in argument_override to force a tool config to - clear any auth the LLM would otherwise supply, since merge semantics ignore + clear any auth the agent would otherwise supply, since merge semantics ignore null patches.' type: object properties: @@ -20134,7 +20183,7 @@ components: - AgentToolConfiguration SubAgentToolParameters: description: Configurable parameters for the sub-agent tool. If not overridden, - they will be required by the LLM to fill in. + they will be required by the agent to fill in. type: object properties: message: @@ -20152,7 +20201,8 @@ components: SubAgentSessionMode: description: 'Controls session behavior for sub-agent invocations: - - llm_controlled: LLM decides whether to create new or resume existing session + - llm_controlled: the agent decides whether to create a new session or resume + an existing one - persistent: Always reuse the same session (created on first invocation) @@ -20227,7 +20277,7 @@ components: - AgentToolConfiguration ArtifactReadToolParameters: description: Configurable parameters for the artifact read tool. If not overridden, - they will be required by the LLM to fill in. + they will be required by the agent to fill in. type: object properties: artifact_id: @@ -20295,7 +20345,7 @@ components: - AgentToolConfiguration ArtifactGrepToolParameters: description: Configurable parameters for the artifact grep tool. If not overridden, - they will be required by the LLM to fill in. + they will be required by the agent to fill in. type: object properties: artifact_id: @@ -20336,7 +20386,7 @@ components: - AgentToolConfiguration ImageReadToolParameters: description: Configurable parameters for the image read tool. If not overridden, - they will be required by the LLM to fill in. + they will be required by the agent to fill in. type: object properties: artifact_id: @@ -20375,7 +20425,7 @@ components: - AgentToolConfiguration DocumentConversionToolParameters: description: Configurable parameters for the document conversion tool. If not - overridden, they will be required by the LLM to fill in. + overridden, they will be required by the agent to fill in. type: object properties: artifact_id: @@ -20415,7 +20465,7 @@ components: - AgentToolConfiguration GetDocumentTextParameters: description: Configurable parameters for the get document text tool. If not - overridden, they will be required by the LLM to fill in. + overridden, they will be required by the agent to fill in. type: object properties: document_id: @@ -21624,8 +21674,8 @@ components: output_parser: $ref: '#/components/schemas/AgentOutputParser' reminders: - description: Reminders injected into conversation messages. Set to null - to clear all reminders. + description: Reminders injected into the session as the agent runs. Set + to null to clear all reminders. type: array nullable: true items: @@ -21683,8 +21733,8 @@ components: output_parser: $ref: '#/components/schemas/AgentOutputParser' reminders: - description: Reminders injected into conversation messages. Set to null - to clear all reminders. + description: Reminders injected into the session as the agent runs. Set + to null to clear all reminders. type: array nullable: true items: @@ -25118,33 +25168,9 @@ components: required: - events - metadata - MetricKind: - description: 'The kind of metric. Determines combine semantics when filtering - across multiple label values and the shape of points in the response: - - - - `counter`: monotonic count or sum (trace count, error count, token totals). - Combined by summing. Returns `ScalarMetricPoint`s. - - - `gauge`: point-in-time value (mean, max, distinct-count). Combined per the - underlying aggregate state (weighted mean for averages, max for maxima, distinct-count - for uniq metrics). Returns `ScalarMetricPoint`s. - - - `percentiles`: distribution percentiles over a t-digest aggregate. Combined - by merging t-digest states. Returns `PercentilesMetricPoint`s. - - - `distribution`: histogram of value-bucketed counts. Combined by summing - per-bin counts. Returns `DistributionMetricPoint`s. - - ' - type: string - enum: - - counter - - gauge - - percentiles - - distribution - MetricDescriptor: - description: Metadata about a registered metric available for querying. + MetricDescriptorBase: + description: Common metadata fields shared by every metric descriptor regardless + of kind. type: object properties: name: @@ -25152,6 +25178,10 @@ components: query it. type: string example: agent.trace.duration_ms + category: + description: Top-level grouping for this metric. + type: string + example: agent description: description: Human-readable description of what the metric measures. type: string @@ -25159,8 +25189,15 @@ components: description: Unit of measure for the metric values, when applicable. type: string example: ms - kind: - $ref: '#/components/schemas/MetricKind' + display_name: + description: 'Short human-readable name for this metric, suitable as a chart + title or list + + label. + + ' + type: string + example: Trace duration percentiles labels: description: Names of labels that can be used to filter this metric. type: array @@ -25170,9 +25207,145 @@ components: - agent_keys required: - name + - category - description - - kind + - display_name - labels + CounterMetricDescriptor: + description: Descriptor for a counter metric. + allOf: + - $ref: '#/components/schemas/MetricDescriptorBase' + - type: object + properties: + kind: + type: string + example: counter + required: + - kind + GaugeMetricDescriptor: + description: Descriptor for a gauge metric. + allOf: + - $ref: '#/components/schemas/MetricDescriptorBase' + - type: object + properties: + kind: + type: string + example: gauge + required: + - kind + PercentileEntry: + description: 'A single entry in a percentiles array. On a metric descriptor, + `value` is the percentile rank (a fraction in [0, 1], e.g. `0.95` for p95). + On a response point, `value` is the aggregated metric value at that percentile + (e.g. duration in ms). The `label` is the stable key matching descriptor and + point entries. + + ' + type: object + properties: + label: + description: Stable identifier for this percentile (e.g. `p50`, `p99`). + type: string + value: + description: "Numeric value \u2014 the percentile rank on the descriptor,\ + \ the aggregated value on a response point." + type: number + format: double + required: + - label + - value + PercentilesMetricDescriptor: + description: Descriptor for a percentiles metric. Carries the ordered list of + percentile labels this metric emits. + allOf: + - $ref: '#/components/schemas/MetricDescriptorBase' + - type: object + properties: + kind: + type: string + example: percentiles + percentiles: + description: Percentile entries returned by this metric, in canonical + order. Each entry's `label` matches a corresponding entry in every response + point's `percentiles` array; `value` is the percentile rank (e.g. `0.5` + for p50). + type: array + items: + $ref: '#/components/schemas/PercentileEntry' + example: + - label: p50 + value: 0.5 + - label: p90 + value: 0.9 + - label: p95 + value: 0.95 + - label: p99 + value: 0.99 + required: + - kind + - percentiles + DistributionBinDescriptor: + description: 'A single bin of a distribution metric. The numeric range `[range_min, + range_max)` is in the units declared by the metric''s `unit` field. The overflow + bin (the one covering everything from the largest declared bound upward) omits + `range_max`. + + ' + type: object + properties: + label: + description: Stable identifier for this bin. Referenced from response points + by `HistogramBin.label`. + type: string + range_min: + description: Inclusive lower bound of this bin's numeric range, in the metric's + `unit`. + type: number + format: double + range_max: + description: Exclusive upper bound of this bin's numeric range, in the metric's + `unit`. Omitted for the overflow bin. + type: number + format: double + required: + - label + - range_min + DistributionMetricDescriptor: + description: Descriptor for a distribution metric. Carries the canonical bin + list with numeric bounds. + allOf: + - $ref: '#/components/schemas/MetricDescriptorBase' + - type: object + properties: + kind: + type: string + example: distribution + bins: + description: Bins that this distribution may emit, in canonical order. + Each bin has a stable label, an inclusive lower bound, and an exclusive + upper bound (omitted for the overflow bin). + type: array + items: + $ref: '#/components/schemas/DistributionBinDescriptor' + required: + - kind + - bins + MetricDescriptor: + description: Metadata about a registered metric. The concrete variant is selected + by `kind`. + x-vectara-base-schema: '#/MetricDescriptorBase' + discriminator: + propertyName: kind + mapping: + counter: '#/components/schemas/CounterMetricDescriptor' + gauge: '#/components/schemas/GaugeMetricDescriptor' + percentiles: '#/components/schemas/PercentilesMetricDescriptor' + distribution: '#/components/schemas/DistributionMetricDescriptor' + oneOf: + - $ref: '#/components/schemas/CounterMetricDescriptor' + - $ref: '#/components/schemas/GaugeMetricDescriptor' + - $ref: '#/components/schemas/PercentilesMetricDescriptor' + - $ref: '#/components/schemas/DistributionMetricDescriptor' ListMetricsResponse: description: List of registered metrics available for querying. type: object @@ -25198,30 +25371,30 @@ components: type: array items: type: string - bucket_size_seconds: - description: Width of each bucket in the returned series, in seconds. The - server chooses this based on the requested time range and `max_buckets`. + bin_size_seconds: + description: Width of each time bin in the returned series, in seconds. + The server chooses this based on the requested time range and `max_bins`. type: integer format: int32 required: - metric_name - labels - - bucket_size_seconds + - bin_size_seconds ScalarMetricPoint: - description: "A point in a counter or gauge metric series \u2014 a single scalar\ - \ value at a time bucket." + description: A point in a counter or gauge metric series. A single scalar value + at a time bin. type: object properties: - bucket_start: - description: Start of the bucket window in ISO 8601 (UTC). End-time aligned. + bin_start: + description: Start of the time bin in ISO 8601 (UTC). End-time aligned. type: string format: date-time value: - description: The aggregated value for this bucket. + description: The aggregated value for this time bin. type: number format: double required: - - bucket_start + - bin_start - value CounterMetricSeries: description: A series of counter values (monotonic count or sum). @@ -25231,7 +25404,6 @@ components: properties: kind: type: string - default: counter example: counter points: type: array @@ -25249,7 +25421,6 @@ components: properties: kind: type: string - default: gauge example: gauge points: type: array @@ -25259,22 +25430,23 @@ components: - kind - points PercentilesMetricPoint: - description: A point in a percentiles metric series. + description: A point in a percentiles metric series. Entries correspond by `label` + to the descriptor's `percentiles` array, in the same canonical order. type: object properties: - bucket_start: - description: Start of the bucket window in ISO 8601 (UTC). End-time aligned. + bin_start: + description: Start of the time bin in ISO 8601 (UTC). End-time aligned. type: string format: date-time percentiles: - description: Map of percentile label to value. Keys follow the `p` convention - (e.g. `p50`, `p99`, `p99_9` for the 99.9th percentile). - type: object - additionalProperties: - type: number - format: double + description: Per-percentile aggregated values for this time bin. Each entry's + `value` is the metric's aggregated value at the percentile identified + by `label`. + type: array + items: + $ref: '#/components/schemas/PercentileEntry' required: - - bucket_start + - bin_start - percentiles PercentilesMetricSeries: description: A series of percentile aggregates over a t-digest state. @@ -25284,7 +25456,6 @@ components: properties: kind: type: string - default: percentiles example: percentiles points: type: array @@ -25294,54 +25465,52 @@ components: - kind - points HistogramBin: - description: "A single bin in a distribution histogram. `upper_ms` is null for\ - \ the overflow bin (everything \u2265 the lower bound)." + description: 'A single bin''s count within a distribution response point. The + bin''s numeric range is declared on the metric''s descriptor under `bins[].range_min` + / `bins[].range_max`, keyed by `label`. Only bins with non-zero counts are + included; descriptor bins absent from a response point have a count of zero. + + ' type: object properties: - lower_ms: - description: Inclusive lower bound of the bin in milliseconds. - type: number - format: double - upper_ms: - description: Exclusive upper bound of the bin in milliseconds. Null for - the overflow bin. - type: number - format: double - nullable: true - count: - description: Number of observations whose duration fell in `[lower_ms, upper_ms)`. + label: + description: Bin label matching one of the labels declared on the metric's + descriptor. + type: string + value: + description: Count of observations whose value fell in this bin for this + time window. type: integer format: int64 required: - - lower_ms - - count + - label + - value DistributionMetricPoint: - description: "A point in a distribution metric series \u2014 a histogram of\ - \ value-bucketed counts at a time bucket. Only bins with non-zero counts appear." + description: A point in a distribution metric series. Bin labels match those + declared on the metric's descriptor. Only bins with non-zero counts appear. type: object properties: - bucket_start: - description: Start of the bucket window in ISO 8601 (UTC). End-time aligned. + bin_start: + description: Start of the time bin in ISO 8601 (UTC). End-time aligned. type: string format: date-time bins: - description: Histogram bins, sorted by `lower_ms` ascending. + description: Per-bin counts for this time bin, sorted by the descriptor's + canonical bin order. type: array items: $ref: '#/components/schemas/HistogramBin' required: - - bucket_start + - bin_start - bins DistributionMetricSeries: - description: A series of histogram aggregates over a value-axis distribution - table. + description: A series of distribution histograms. allOf: - $ref: '#/components/schemas/MetricSeriesBase' - type: object properties: kind: type: string - default: distribution example: distribution points: type: array