From 903bfb3038001ea468a4673357a900f9070fc98b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 31 May 2026 04:19:27 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- ...tara.AgentAliasesArtifactsClient.Get3.g.cs | 581 +++ ...ara.AgentAliasesArtifactsClient.List3.g.cs | 622 +++ .../Vectara.AgentAliasesArtifactsClient.g.cs | 139 + .../Vectara.AgentAliasesClient.Create.g.cs | 660 +++ .../Vectara.AgentAliasesClient.Delete.g.cs | 567 ++ .../Vectara.AgentAliasesClient.Get.g.cs | 553 ++ .../Vectara.AgentAliasesClient.List.g.cs | 555 ++ ...tara.AgentAliasesClient.ReplacePolicy.g.cs | 652 +++ .../Vectara.AgentAliasesClient.Update.g.cs | 617 +++ .../Generated/Vectara.AgentAliasesClient.g.cs | 139 + ...Vectara.AgentAliasesEventsClient.Hide.g.cs | 577 +++ ...ctara.AgentAliasesEventsClient.Unhide.g.cs | 577 +++ .../Vectara.AgentAliasesEventsClient.g.cs | 139 + ...ra.AgentAliasesSessionsClient.Create2.g.cs | 697 +++ ...gentAliasesSessionsClient.CreateInput.g.cs | 623 +++ ...sesSessionsClient.CreateInputAsStream.g.cs | 437 ++ ...ra.AgentAliasesSessionsClient.Delete2.g.cs | 545 ++ ...gentAliasesSessionsClient.DeleteEvent.g.cs | 554 ++ ...ctara.AgentAliasesSessionsClient.Get2.g.cs | 568 ++ ...a.AgentAliasesSessionsClient.GetEvent.g.cs | 577 +++ ...tara.AgentAliasesSessionsClient.List2.g.cs | 589 +++ ...AgentAliasesSessionsClient.ListEvents.g.cs | 594 +++ ...ra.AgentAliasesSessionsClient.Update2.g.cs | 700 +++ .../Vectara.AgentAliasesSessionsClient.g.cs | 139 + .../Vectara.AgentSessionsClient.Create.g.cs | 8 + .../Vectara.AgentSessionsClient.Update.g.cs | 7 + ...ara.IAgentAliasesArtifactsClient.Get3.g.cs | 64 + ...ra.IAgentAliasesArtifactsClient.List3.g.cs | 84 + .../Vectara.IAgentAliasesArtifactsClient.g.cs | 48 + .../Vectara.IAgentAliasesClient.Create.g.cs | 89 + .../Vectara.IAgentAliasesClient.Delete.g.cs | 46 + .../Vectara.IAgentAliasesClient.Get.g.cs | 46 + .../Vectara.IAgentAliasesClient.List.g.cs | 64 + ...ara.IAgentAliasesClient.ReplacePolicy.g.cs | 80 + .../Vectara.IAgentAliasesClient.Update.g.cs | 79 + .../Vectara.IAgentAliasesClient.g.cs | 48 + ...ectara.IAgentAliasesEventsClient.Hide.g.cs | 60 + ...tara.IAgentAliasesEventsClient.Unhide.g.cs | 60 + .../Vectara.IAgentAliasesEventsClient.g.cs | 48 + ...a.IAgentAliasesSessionsClient.Create2.g.cs | 118 + ...gentAliasesSessionsClient.CreateInput.g.cs | 62 + ...sesSessionsClient.CreateInputAsStream.g.cs | 35 + ...a.IAgentAliasesSessionsClient.Delete2.g.cs | 56 + ...gentAliasesSessionsClient.DeleteEvent.g.cs | 60 + ...tara.IAgentAliasesSessionsClient.Get2.g.cs | 56 + ....IAgentAliasesSessionsClient.GetEvent.g.cs | 60 + ...ara.IAgentAliasesSessionsClient.List2.g.cs | 62 + ...AgentAliasesSessionsClient.ListEvents.g.cs | 68 + ...a.IAgentAliasesSessionsClient.Update2.g.cs | 117 + .../Vectara.IAgentAliasesSessionsClient.g.cs | 48 + .../Vectara.IAgentSessionsClient.Create.g.cs | 7 + .../Vectara.IAgentSessionsClient.Update.g.cs | 6 + ...ipelineDeadLetterEntriesClient.Create.g.cs | 1 + .../Generated/Vectara.IVectaraClient.g.cs | 20 + .../Vectara.JsonConverters.AliasPolicy.g.cs | 57 + ...nverters.AliasPolicyDiscriminatorType.g.cs | 53 + ....AliasPolicyDiscriminatorTypeNullable.g.cs | 60 + ...ctara.JsonConverters.GoogleDriveScope.g.cs | 72 + ...ers.GoogleDriveScopeDiscriminatorType.g.cs | 53 + ...leDriveScopeDiscriminatorTypeNullable.g.cs | 60 + ...erters.GoogleDriveSourceConfiguration.g.cs | 143 + .../Vectara.JsonConverters.LLMAuth.g.cs | 177 + ...onConverters.LLMAuthDiscriminatorType.g.cs | 53 + ...ters.LLMAuthDiscriminatorTypeNullable.g.cs | 60 + ...istAliasRoutedSessionArtifactsOrderBy.g.cs | 53 + ...RoutedSessionArtifactsOrderByNullable.g.cs | 60 + ...ListAliasRoutedSessionArtifactsSortBy.g.cs | 53 + ...sRoutedSessionArtifactsSortByNullable.g.cs | 60 + .../Vectara.JsonConverters.LlmType.g.cs | 53 + ...ectara.JsonConverters.LlmTypeNullable.g.cs | 60 + ...Vectara.JsonConverters.PipelineSource.g.cs | 15 + .../Vectara.JsonConverters.RuleTargets.g.cs | 72 + ...nverters.RuleTargetsDiscriminatorType.g.cs | 53 + ....RuleTargetsDiscriminatorTypeNullable.g.cs | 60 + ....UpdateGoogleDriveSourceConfiguration.g.cs | 100 + ...a.JsonConverters.UpdatePipelineSource.g.cs | 15 + .../Vectara.JsonSerializerContext.g.cs | 166 +- .../Vectara.JsonSerializerContextTypes.g.cs | 1460 +++--- .../Vectara.Models.AgentAlias.Json.g.cs | 92 + .../Generated/Vectara.Models.AgentAlias.g.cs | 140 + ...ectara.Models.AgentAliasMetadata.Json.g.cs | 92 + .../Vectara.Models.AgentAliasMetadata.g.cs | 19 + .../Vectara.Models.AgentSession.g.cs | 34 +- ...ctara.Models.AgentSessionSecrets.Json.g.cs | 92 + .../Vectara.Models.AgentSessionSecrets.g.cs | 22 + .../Vectara.Models.AliasPolicy.Json.g.cs | 92 + .../Generated/Vectara.Models.AliasPolicy.g.cs | 223 + ....Models.AliasPolicyDiscriminator.Json.g.cs | 92 + ...ctara.Models.AliasPolicyDiscriminator.g.cs | 45 + ...a.Models.AliasPolicyDiscriminatorType.g.cs | 45 + .../Vectara.Models.AliasRule.Json.g.cs | 92 + .../Generated/Vectara.Models.AliasRule.g.cs | 100 + ...seGoogleDriveSourceConfiguration.Json.g.cs | 92 + ...ls.BaseGoogleDriveSourceConfiguration.g.cs | 102 + ...a.Models.CreateAgentAliasRequest.Json.g.cs | 92 + ...ectara.Models.CreateAgentAliasRequest.g.cs | 105 + ....CreateAgentAliasRequestMetadata.Json.g.cs | 92 + ...odels.CreateAgentAliasRequestMetadata.g.cs | 19 + ...tara.Models.CreateAgentSessionRequest.g.cs | 18 + ...CreateAgentSessionRequestSecrets.Json.g.cs | 92 + ...dels.CreateAgentSessionRequestSecrets.g.cs | 22 + .../Vectara.Models.CreateDocumentRequest.g.cs | 2 +- ....CreatePipelineDeadLetterEntryRequest.g.cs | 2 + .../Vectara.Models.GoogleDriveScope.Json.g.cs | 92 + .../Vectara.Models.GoogleDriveScope.g.cs | 309 ++ ...ls.GoogleDriveScopeDiscriminator.Json.g.cs | 92 + ....Models.GoogleDriveScopeDiscriminator.g.cs | 45 + ...els.GoogleDriveScopeDiscriminatorType.g.cs | 51 + ...s.GoogleDriveSourceConfiguration.Json.g.cs | 92 + ...Models.GoogleDriveSourceConfiguration.g.cs | 275 + ...DriveSourceConfigurationVariant2.Json.g.cs | 92 + ...oogleDriveSourceConfigurationVariant2.g.cs | 19 + ...namicVectaraToolConfigurationVariant2.g.cs | 12 + ...ConfigurationVariant2ArgumentOverride.g.cs | 6 + ...ls.InlineMcpToolConfigurationVariant2.g.cs | 12 + ...ConfigurationVariant2ArgumentOverride.g.cs | 6 + .../Vectara.Models.LLMAuth.Json.g.cs | 92 + .../Generated/Vectara.Models.LLMAuth.g.cs | 884 ++++ ...tara.Models.LLMAuthDiscriminator.Json.g.cs | 92 + .../Vectara.Models.LLMAuthDiscriminator.g.cs | 45 + ...ctara.Models.LLMAuthDiscriminatorType.g.cs | 93 + ....Models.ListAgentAliasesResponse.Json.g.cs | 92 + ...ctara.Models.ListAgentAliasesResponse.g.cs | 60 + ...istAliasRoutedSessionArtifactsOrderBy.g.cs | 51 + ...ListAliasRoutedSessionArtifactsSortBy.g.cs | 51 + .../Vectara/Generated/Vectara.Models.Llm.g.cs | 74 +- .../Vectara.Models.LlmHeaders.Json.g.cs | 92 + .../Generated/Vectara.Models.LlmHeaders.g.cs | 19 + .../Generated/Vectara.Models.LlmType.g.cs | 63 + ...ectara.Models.MyGoogleDriveScope.Json.g.cs | 92 + .../Vectara.Models.MyGoogleDriveScope.g.cs | 88 + ...ectara.Models.PipelineDeadLetterEntry.g.cs | 2 + .../Vectara.Models.PipelineSource.g.cs | 85 +- ...odels.PipelineSourceDiscriminatorType.g.cs | 6 + ...Models.ReplaceAliasPolicyRequest.Json.g.cs | 92 + ...tara.Models.ReplaceAliasPolicyRequest.g.cs | 51 + ...Vectara.Models.RoutedAliasPolicy.Json.g.cs | 92 + .../Vectara.Models.RoutedAliasPolicy.g.cs | 61 + .../Vectara.Models.RuleTargets.Json.g.cs | 92 + .../Generated/Vectara.Models.RuleTargets.g.cs | 305 ++ ....Models.RuleTargetsDiscriminator.Json.g.cs | 92 + ...ctara.Models.RuleTargetsDiscriminator.g.cs | 45 + ...a.Models.RuleTargetsDiscriminatorType.g.cs | 51 + ...ra.Models.SharedGoogleDriveScope.Json.g.cs | 92 + ...Vectara.Models.SharedGoogleDriveScope.g.cs | 76 + ...Vectara.Models.SingleRuleTargets.Json.g.cs | 92 + .../Vectara.Models.SingleRuleTargets.g.cs | 60 + .../Generated/Vectara.Models.ToolBase.g.cs | 12 + ...odels.ToolBaseDefaultArgumentOverride.g.cs | 6 + ...a.Models.UpdateAgentAliasRequest.Json.g.cs | 92 + ...ectara.Models.UpdateAgentAliasRequest.g.cs | 71 + ....UpdateAgentAliasRequestMetadata.Json.g.cs | 92 + ...odels.UpdateAgentAliasRequestMetadata.g.cs | 19 + ...tara.Models.UpdateAgentSessionRequest.g.cs | 18 +- ...UpdateAgentSessionRequestSecrets.Json.g.cs | 92 + ...dels.UpdateAgentSessionRequestSecrets.g.cs | 21 + ...teGoogleDriveSourceConfiguration.Json.g.cs | 92 + ....UpdateGoogleDriveSourceConfiguration.g.cs | 205 + .../Vectara.Models.UpdatePipelineSource.g.cs | 85 +- ...UpdatePipelineSourceDiscriminatorType.g.cs | 6 + ...ctara.Models.WeightedRuleTargets.Json.g.cs | 92 + .../Vectara.Models.WeightedRuleTargets.g.cs | 81 + .../Vectara.Models.WeightedTarget.Json.g.cs | 92 + .../Vectara.Models.WeightedTarget.g.cs | 59 + ...ipelineDeadLetterEntriesClient.Create.g.cs | 1 + .../Generated/Vectara.VectaraClient.g.cs | 40 + .../Generated/autosdk.generated-examples.json | 2 +- src/libs/Vectara/openapi.yaml | 4612 ++++++++++++----- 168 files changed, 26855 insertions(+), 2114 deletions(-) create mode 100644 src/libs/Vectara/Generated/Vectara.AgentAliasesArtifactsClient.Get3.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.AgentAliasesArtifactsClient.List3.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.AgentAliasesArtifactsClient.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.AgentAliasesClient.Create.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.AgentAliasesClient.Delete.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.AgentAliasesClient.Get.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.AgentAliasesClient.List.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.AgentAliasesClient.ReplacePolicy.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.AgentAliasesClient.Update.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.AgentAliasesClient.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.AgentAliasesEventsClient.Hide.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.AgentAliasesEventsClient.Unhide.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.AgentAliasesEventsClient.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.AgentAliasesSessionsClient.Create2.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.AgentAliasesSessionsClient.CreateInput.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.AgentAliasesSessionsClient.CreateInputAsStream.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.AgentAliasesSessionsClient.Delete2.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.AgentAliasesSessionsClient.DeleteEvent.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.AgentAliasesSessionsClient.Get2.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.AgentAliasesSessionsClient.GetEvent.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.AgentAliasesSessionsClient.List2.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.AgentAliasesSessionsClient.ListEvents.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.AgentAliasesSessionsClient.Update2.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.AgentAliasesSessionsClient.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.IAgentAliasesArtifactsClient.Get3.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.IAgentAliasesArtifactsClient.List3.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.IAgentAliasesArtifactsClient.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.IAgentAliasesClient.Create.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.IAgentAliasesClient.Delete.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.IAgentAliasesClient.Get.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.IAgentAliasesClient.List.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.IAgentAliasesClient.ReplacePolicy.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.IAgentAliasesClient.Update.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.IAgentAliasesClient.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.IAgentAliasesEventsClient.Hide.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.IAgentAliasesEventsClient.Unhide.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.IAgentAliasesEventsClient.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.IAgentAliasesSessionsClient.Create2.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.IAgentAliasesSessionsClient.CreateInput.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.IAgentAliasesSessionsClient.CreateInputAsStream.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.IAgentAliasesSessionsClient.Delete2.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.IAgentAliasesSessionsClient.DeleteEvent.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.IAgentAliasesSessionsClient.Get2.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.IAgentAliasesSessionsClient.GetEvent.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.IAgentAliasesSessionsClient.List2.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.IAgentAliasesSessionsClient.ListEvents.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.IAgentAliasesSessionsClient.Update2.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.IAgentAliasesSessionsClient.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.JsonConverters.AliasPolicy.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.JsonConverters.AliasPolicyDiscriminatorType.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.JsonConverters.AliasPolicyDiscriminatorTypeNullable.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.JsonConverters.GoogleDriveScope.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.JsonConverters.GoogleDriveScopeDiscriminatorType.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.JsonConverters.GoogleDriveScopeDiscriminatorTypeNullable.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.JsonConverters.GoogleDriveSourceConfiguration.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.JsonConverters.LLMAuth.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.JsonConverters.LLMAuthDiscriminatorType.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.JsonConverters.LLMAuthDiscriminatorTypeNullable.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.JsonConverters.ListAliasRoutedSessionArtifactsOrderBy.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.JsonConverters.ListAliasRoutedSessionArtifactsOrderByNullable.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.JsonConverters.ListAliasRoutedSessionArtifactsSortBy.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.JsonConverters.ListAliasRoutedSessionArtifactsSortByNullable.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.JsonConverters.LlmType.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.JsonConverters.LlmTypeNullable.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.JsonConverters.RuleTargets.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.JsonConverters.RuleTargetsDiscriminatorType.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.JsonConverters.RuleTargetsDiscriminatorTypeNullable.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.JsonConverters.UpdateGoogleDriveSourceConfiguration.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.AgentAlias.Json.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.AgentAlias.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.AgentAliasMetadata.Json.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.AgentAliasMetadata.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.AgentSessionSecrets.Json.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.AgentSessionSecrets.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.AliasPolicy.Json.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.AliasPolicy.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.AliasPolicyDiscriminator.Json.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.AliasPolicyDiscriminator.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.AliasPolicyDiscriminatorType.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.AliasRule.Json.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.AliasRule.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.BaseGoogleDriveSourceConfiguration.Json.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.BaseGoogleDriveSourceConfiguration.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.CreateAgentAliasRequest.Json.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.CreateAgentAliasRequest.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.CreateAgentAliasRequestMetadata.Json.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.CreateAgentAliasRequestMetadata.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.CreateAgentSessionRequestSecrets.Json.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.CreateAgentSessionRequestSecrets.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.GoogleDriveScope.Json.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.GoogleDriveScope.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.GoogleDriveScopeDiscriminator.Json.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.GoogleDriveScopeDiscriminator.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.GoogleDriveScopeDiscriminatorType.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.GoogleDriveSourceConfiguration.Json.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.GoogleDriveSourceConfiguration.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.GoogleDriveSourceConfigurationVariant2.Json.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.GoogleDriveSourceConfigurationVariant2.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.LLMAuth.Json.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.LLMAuth.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.LLMAuthDiscriminator.Json.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.LLMAuthDiscriminator.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.LLMAuthDiscriminatorType.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.ListAgentAliasesResponse.Json.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.ListAgentAliasesResponse.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.ListAliasRoutedSessionArtifactsOrderBy.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.ListAliasRoutedSessionArtifactsSortBy.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.LlmHeaders.Json.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.LlmHeaders.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.LlmType.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.MyGoogleDriveScope.Json.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.MyGoogleDriveScope.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.ReplaceAliasPolicyRequest.Json.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.ReplaceAliasPolicyRequest.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.RoutedAliasPolicy.Json.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.RoutedAliasPolicy.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.RuleTargets.Json.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.RuleTargets.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.RuleTargetsDiscriminator.Json.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.RuleTargetsDiscriminator.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.RuleTargetsDiscriminatorType.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.SharedGoogleDriveScope.Json.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.SharedGoogleDriveScope.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.SingleRuleTargets.Json.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.SingleRuleTargets.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.UpdateAgentAliasRequest.Json.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.UpdateAgentAliasRequest.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.UpdateAgentAliasRequestMetadata.Json.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.UpdateAgentAliasRequestMetadata.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.UpdateAgentSessionRequestSecrets.Json.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.UpdateAgentSessionRequestSecrets.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.UpdateGoogleDriveSourceConfiguration.Json.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.UpdateGoogleDriveSourceConfiguration.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.WeightedRuleTargets.Json.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.WeightedRuleTargets.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.WeightedTarget.Json.g.cs create mode 100644 src/libs/Vectara/Generated/Vectara.Models.WeightedTarget.g.cs diff --git a/src/libs/Vectara/Generated/Vectara.AgentAliasesArtifactsClient.Get3.g.cs b/src/libs/Vectara/Generated/Vectara.AgentAliasesArtifactsClient.Get3.g.cs new file mode 100644 index 00000000..47524241 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.AgentAliasesArtifactsClient.Get3.g.cs @@ -0,0 +1,581 @@ + +#nullable enable + +namespace Vectara +{ + public partial class AgentAliasesArtifactsClient + { + + + private static readonly global::Vectara.EndPointSecurityRequirement s_Get3SecurityRequirement0 = + new global::Vectara.EndPointSecurityRequirement + { + Authorizations = new global::Vectara.EndPointAuthorizationRequirement[] + { new global::Vectara.EndPointAuthorizationRequirement + { + Type = "ApiKey", + SchemeId = "ApiKeyAuth", + Location = "Header", + Name = "x-api-key", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + + private static readonly global::Vectara.EndPointSecurityRequirement s_Get3SecurityRequirement1 = + new global::Vectara.EndPointSecurityRequirement + { + Authorizations = new global::Vectara.EndPointAuthorizationRequirement[] + { new global::Vectara.EndPointAuthorizationRequirement + { + Type = "OAuth2", + SchemeId = "OAuth2", + Location = "Header", + Name = "", + FriendlyName = "OAuth2", + }, + }, + }; + private static readonly global::Vectara.EndPointSecurityRequirement[] s_Get3SecurityRequirements = + new global::Vectara.EndPointSecurityRequirement[] + { s_Get3SecurityRequirement0, + s_Get3SecurityRequirement1, + }; + partial void PrepareGet3Arguments( + global::System.Net.Http.HttpClient httpClient, + ref int? requestTimeout, + ref int? requestTimeoutMillis, + ref string aliasKey, + ref string sessionKey, + ref string artifactId); + partial void PrepareGet3Request( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + int? requestTimeout, + int? requestTimeoutMillis, + string aliasKey, + string sessionKey, + string artifactId); + partial void ProcessGet3Response( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessGet3ResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Get artifact on alias-routed session
+ /// Retrieve an artifact stored in a session originally created via this alias, including metadata and base64-encoded file content. + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// + /// A unique key that identifies an agent session.
+ /// Example: customer_support_chat + /// + /// + /// Example: art_report_pdf_a3f2 + /// + /// 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 Get3Async( + string aliasKey, + string sessionKey, + string artifactId, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await Get3AsResponseAsync( + aliasKey: aliasKey, + sessionKey: sessionKey, + artifactId: artifactId, + requestTimeout: requestTimeout, + requestTimeoutMillis: requestTimeoutMillis, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get artifact on alias-routed session
+ /// Retrieve an artifact stored in a session originally created via this alias, including metadata and base64-encoded file content. + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// + /// A unique key that identifies an agent session.
+ /// Example: customer_support_chat + /// + /// + /// Example: art_report_pdf_a3f2 + /// + /// 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> Get3AsResponseAsync( + string aliasKey, + string sessionKey, + string artifactId, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareGet3Arguments( + httpClient: HttpClient, + requestTimeout: ref requestTimeout, + requestTimeoutMillis: ref requestTimeoutMillis, + aliasKey: ref aliasKey, + sessionKey: ref sessionKey, + artifactId: ref artifactId); + + + var __authorizations = global::Vectara.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_Get3SecurityRequirements, + operationName: "Get3Async"); + + using var __timeoutCancellationTokenSource = global::Vectara.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Vectara.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Vectara.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Vectara.PathBuilder( + path: $"/v2/agent_aliases/{aliasKey}/sessions/{sessionKey}/artifacts/{artifactId}", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Vectara.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + if (requestTimeout != default) + { + __httpRequest.Headers.TryAddWithoutValidation("Request-Timeout", requestTimeout.ToString()); + } + if (requestTimeoutMillis != default) + { + __httpRequest.Headers.TryAddWithoutValidation("Request-Timeout-Millis", requestTimeoutMillis.ToString()); + } + + global::Vectara.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareGet3Request( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + requestTimeout: requestTimeout, + requestTimeoutMillis: requestTimeoutMillis, + aliasKey: aliasKey!, + sessionKey: sessionKey!, + artifactId: artifactId!); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Vectara.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Get3", + methodName: "Get3Async", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}/sessions/{sessionKey}/artifacts/{artifactId}\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await global::Vectara.VectaraClient.AutoSDKOAuth2Helpers.SendAsync( + httpClient: HttpClient, + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + authorizations: __authorizations, + oAuth2Coordinator: AutoSDKOAuth2State, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Get3", + methodName: "Get3Async", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}/sessions/{sessionKey}/artifacts/{artifactId}\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Get3", + methodName: "Get3Async", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}/sessions/{sessionKey}/artifacts/{artifactId}\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessGet3Response( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Get3", + methodName: "Get3Async", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}/sessions/{sessionKey}/artifacts/{artifactId}\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Get3", + methodName: "Get3Async", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}/sessions/{sessionKey}/artifacts/{artifactId}\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Permissions do not allow accessing this artifact. + if ((int)__response.StatusCode == 403) + { + string? __content_403 = null; + global::System.Exception? __exception_403 = null; + global::Vectara.Error? __value_403 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_403 = global::Vectara.Error.FromJson(__content_403, JsonSerializerContext); + } + else + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_403 = global::Vectara.Error.FromJson(__content_403, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_403 = __ex; + } + + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_403, + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Alias, session, or artifact not found. + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::System.Exception? __exception_404 = null; + global::Vectara.NotFoundError? __value_404 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_404 = global::Vectara.NotFoundError.FromJson(__content_404, JsonSerializerContext); + } + else + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_404 = global::Vectara.NotFoundError.FromJson(__content_404, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_404 = __ex; + } + + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_404, + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessGet3ResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Vectara.SessionArtifact.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Vectara.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::Vectara.SessionArtifact.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Vectara.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.AgentAliasesArtifactsClient.List3.g.cs b/src/libs/Vectara/Generated/Vectara.AgentAliasesArtifactsClient.List3.g.cs new file mode 100644 index 00000000..e9568256 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.AgentAliasesArtifactsClient.List3.g.cs @@ -0,0 +1,622 @@ + +#nullable enable + +namespace Vectara +{ + public partial class AgentAliasesArtifactsClient + { + + + private static readonly global::Vectara.EndPointSecurityRequirement s_List3SecurityRequirement0 = + new global::Vectara.EndPointSecurityRequirement + { + Authorizations = new global::Vectara.EndPointAuthorizationRequirement[] + { new global::Vectara.EndPointAuthorizationRequirement + { + Type = "ApiKey", + SchemeId = "ApiKeyAuth", + Location = "Header", + Name = "x-api-key", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + + private static readonly global::Vectara.EndPointSecurityRequirement s_List3SecurityRequirement1 = + new global::Vectara.EndPointSecurityRequirement + { + Authorizations = new global::Vectara.EndPointAuthorizationRequirement[] + { new global::Vectara.EndPointAuthorizationRequirement + { + Type = "OAuth2", + SchemeId = "OAuth2", + Location = "Header", + Name = "", + FriendlyName = "OAuth2", + }, + }, + }; + private static readonly global::Vectara.EndPointSecurityRequirement[] s_List3SecurityRequirements = + new global::Vectara.EndPointSecurityRequirement[] + { s_List3SecurityRequirement0, + s_List3SecurityRequirement1, + }; + partial void PrepareList3Arguments( + global::System.Net.Http.HttpClient httpClient, + ref int? requestTimeout, + ref int? requestTimeoutMillis, + ref string aliasKey, + ref string sessionKey, + ref int? limit, + ref string? pageKey, + ref global::Vectara.ListAliasRoutedSessionArtifactsSortBy? sortBy, + ref global::Vectara.ListAliasRoutedSessionArtifactsOrderBy? orderBy); + partial void PrepareList3Request( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + int? requestTimeout, + int? requestTimeoutMillis, + string aliasKey, + string sessionKey, + int? limit, + string? pageKey, + global::Vectara.ListAliasRoutedSessionArtifactsSortBy? sortBy, + global::Vectara.ListAliasRoutedSessionArtifactsOrderBy? orderBy); + partial void ProcessList3Response( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessList3ResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// List artifacts on alias-routed session
+ /// List artifacts stored in a session originally created via this alias. Artifacts are files either uploaded by the user, or generated within the session. + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// + /// A unique key that identifies an agent session.
+ /// Example: customer_support_chat + /// + /// + /// Default Value: 10 + /// + /// + /// + /// Default Value: created_at + /// + /// + /// Default Value: desc + /// + /// 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 List3Async( + string aliasKey, + string sessionKey, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + int? limit = default, + string? pageKey = default, + global::Vectara.ListAliasRoutedSessionArtifactsSortBy? sortBy = default, + global::Vectara.ListAliasRoutedSessionArtifactsOrderBy? orderBy = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await List3AsResponseAsync( + aliasKey: aliasKey, + sessionKey: sessionKey, + requestTimeout: requestTimeout, + requestTimeoutMillis: requestTimeoutMillis, + limit: limit, + pageKey: pageKey, + sortBy: sortBy, + orderBy: orderBy, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List artifacts on alias-routed session
+ /// List artifacts stored in a session originally created via this alias. Artifacts are files either uploaded by the user, or generated within the session. + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// + /// A unique key that identifies an agent session.
+ /// Example: customer_support_chat + /// + /// + /// Default Value: 10 + /// + /// + /// + /// Default Value: created_at + /// + /// + /// Default Value: desc + /// + /// 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> List3AsResponseAsync( + string aliasKey, + string sessionKey, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + int? limit = default, + string? pageKey = default, + global::Vectara.ListAliasRoutedSessionArtifactsSortBy? sortBy = default, + global::Vectara.ListAliasRoutedSessionArtifactsOrderBy? orderBy = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareList3Arguments( + httpClient: HttpClient, + requestTimeout: ref requestTimeout, + requestTimeoutMillis: ref requestTimeoutMillis, + aliasKey: ref aliasKey, + sessionKey: ref sessionKey, + limit: ref limit, + pageKey: ref pageKey, + sortBy: ref sortBy, + orderBy: ref orderBy); + + + var __authorizations = global::Vectara.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_List3SecurityRequirements, + operationName: "List3Async"); + + using var __timeoutCancellationTokenSource = global::Vectara.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Vectara.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Vectara.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Vectara.PathBuilder( + path: $"/v2/agent_aliases/{aliasKey}/sessions/{sessionKey}/artifacts", + baseUri: HttpClient.BaseAddress); + __pathBuilder + .AddOptionalParameter("limit", limit?.ToString()) + .AddOptionalParameter("page_key", pageKey) + .AddOptionalParameter("sort_by", sortBy?.ToValueString()) + .AddOptionalParameter("order_by", orderBy?.ToValueString()) + ; + var __path = __pathBuilder.ToString(); + __path = global::Vectara.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + if (requestTimeout != default) + { + __httpRequest.Headers.TryAddWithoutValidation("Request-Timeout", requestTimeout.ToString()); + } + if (requestTimeoutMillis != default) + { + __httpRequest.Headers.TryAddWithoutValidation("Request-Timeout-Millis", requestTimeoutMillis.ToString()); + } + + global::Vectara.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareList3Request( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + requestTimeout: requestTimeout, + requestTimeoutMillis: requestTimeoutMillis, + aliasKey: aliasKey!, + sessionKey: sessionKey!, + limit: limit, + pageKey: pageKey, + sortBy: sortBy, + orderBy: orderBy); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Vectara.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "List3", + methodName: "List3Async", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}/sessions/{sessionKey}/artifacts\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await global::Vectara.VectaraClient.AutoSDKOAuth2Helpers.SendAsync( + httpClient: HttpClient, + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + authorizations: __authorizations, + oAuth2Coordinator: AutoSDKOAuth2State, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "List3", + methodName: "List3Async", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}/sessions/{sessionKey}/artifacts\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "List3", + methodName: "List3Async", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}/sessions/{sessionKey}/artifacts\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessList3Response( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "List3", + methodName: "List3Async", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}/sessions/{sessionKey}/artifacts\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "List3", + methodName: "List3Async", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}/sessions/{sessionKey}/artifacts\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Permissions do not allow listing artifacts on this session. + if ((int)__response.StatusCode == 403) + { + string? __content_403 = null; + global::System.Exception? __exception_403 = null; + global::Vectara.Error? __value_403 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_403 = global::Vectara.Error.FromJson(__content_403, JsonSerializerContext); + } + else + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_403 = global::Vectara.Error.FromJson(__content_403, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_403 = __ex; + } + + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_403, + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Alias or session not found. + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::System.Exception? __exception_404 = null; + global::Vectara.NotFoundError? __value_404 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_404 = global::Vectara.NotFoundError.FromJson(__content_404, JsonSerializerContext); + } + else + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_404 = global::Vectara.NotFoundError.FromJson(__content_404, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_404 = __ex; + } + + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_404, + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessList3ResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Vectara.ListSessionArtifactsResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Vectara.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::Vectara.ListSessionArtifactsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Vectara.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.AgentAliasesArtifactsClient.g.cs b/src/libs/Vectara/Generated/Vectara.AgentAliasesArtifactsClient.g.cs new file mode 100644 index 00000000..654fe049 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.AgentAliasesArtifactsClient.g.cs @@ -0,0 +1,139 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public sealed partial class AgentAliasesArtifactsClient : global::Vectara.IAgentAliasesArtifactsClient, global::System.IDisposable + { + /// + /// + /// + public const string DefaultBaseUrl = "https://api.vectara.io/"; + + private bool _disposeHttpClient = true; + + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + public System.Uri? BaseUri => HttpClient.BaseAddress; + + /// + public global::System.Collections.Generic.List Authorizations { get; } + + /// + public bool ReadResponseAsString { get; set; } +#if DEBUG + = true; +#endif + + /// + public global::Vectara.AutoSDKClientOptions Options { get; } + + + internal global::Vectara.VectaraClient.AutoSDKOAuth2Coordinator AutoSDKOAuth2State { get; set; } = new global::Vectara.VectaraClient.AutoSDKOAuth2Coordinator(); + /// + /// + /// + public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::Vectara.SourceGenerationContext.Default; + + + /// + /// Creates a new instance of the AgentAliasesArtifactsClient. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used. + /// The authorizations to use for the requests. + /// Dispose the HttpClient when the instance is disposed. True by default. + public AgentAliasesArtifactsClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::System.Collections.Generic.List? authorizations = null, + bool disposeHttpClient = true) : this( + httpClient, + baseUri, + authorizations, + options: null, + disposeHttpClient: disposeHttpClient) + { + } + + /// + /// Creates a new instance of the AgentAliasesArtifactsClient with explicit options but no base URL override. + /// Skips passing baseUri so the default base URL from the OpenAPI spec applies. + /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The authorizations to use for the requests. + /// Client-wide request defaults such as headers, query parameters, retries, and timeout. + /// Dispose the HttpClient when the instance is disposed. True by default. + public AgentAliasesArtifactsClient( + global::System.Net.Http.HttpClient? httpClient, + global::System.Collections.Generic.List? authorizations, + global::Vectara.AutoSDKClientOptions? options, + bool disposeHttpClient = true) : this( + httpClient, + baseUri: null, + authorizations, + options, + disposeHttpClient: disposeHttpClient) + { + } + + /// + /// Creates a new instance of the AgentAliasesArtifactsClient. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used. + /// The authorizations to use for the requests. + /// Client-wide request defaults such as headers, query parameters, retries, and timeout. + /// Dispose the HttpClient when the instance is disposed. True by default. + public AgentAliasesArtifactsClient( + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Vectara.AutoSDKClientOptions? options, + bool disposeHttpClient = true) + { + + HttpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + HttpClient.BaseAddress ??= baseUri ?? new global::System.Uri(DefaultBaseUrl); + Authorizations = authorizations ?? new global::System.Collections.Generic.List(); + Options = options ?? new global::Vectara.AutoSDKClientOptions(); + _disposeHttpClient = disposeHttpClient; + + Initialized(HttpClient); + } + + /// + public void Dispose() + { + if (_disposeHttpClient) + { + HttpClient.Dispose(); + } + } + + partial void Initialized( + global::System.Net.Http.HttpClient client); + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.AgentAliasesClient.Create.g.cs b/src/libs/Vectara/Generated/Vectara.AgentAliasesClient.Create.g.cs new file mode 100644 index 00000000..8b137eb0 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.AgentAliasesClient.Create.g.cs @@ -0,0 +1,660 @@ + +#nullable enable + +namespace Vectara +{ + public partial class AgentAliasesClient + { + + + private static readonly global::Vectara.EndPointSecurityRequirement s_CreateSecurityRequirement0 = + new global::Vectara.EndPointSecurityRequirement + { + Authorizations = new global::Vectara.EndPointAuthorizationRequirement[] + { new global::Vectara.EndPointAuthorizationRequirement + { + Type = "ApiKey", + SchemeId = "ApiKeyAuth", + Location = "Header", + Name = "x-api-key", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + + private static readonly global::Vectara.EndPointSecurityRequirement s_CreateSecurityRequirement1 = + new global::Vectara.EndPointSecurityRequirement + { + Authorizations = new global::Vectara.EndPointAuthorizationRequirement[] + { new global::Vectara.EndPointAuthorizationRequirement + { + Type = "OAuth2", + SchemeId = "OAuth2", + Location = "Header", + Name = "", + FriendlyName = "OAuth2", + }, + }, + }; + private static readonly global::Vectara.EndPointSecurityRequirement[] s_CreateSecurityRequirements = + new global::Vectara.EndPointSecurityRequirement[] + { s_CreateSecurityRequirement0, + s_CreateSecurityRequirement1, + }; + partial void PrepareCreateArguments( + global::System.Net.Http.HttpClient httpClient, + ref int? requestTimeout, + ref int? requestTimeoutMillis, + global::Vectara.CreateAgentAliasRequest request); + partial void PrepareCreateRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + int? requestTimeout, + int? requestTimeoutMillis, + global::Vectara.CreateAgentAliasRequest request); + partial void ProcessCreateResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCreateResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Create an alias
+ /// Create a new alias. Aliases are routing primitives that map a public name to one or more underlying agents under a configurable policy. When a session is created through an alias (via `POST /v2/agent_aliases/{alias_key}/sessions`), the alias's policy decides which underlying agent runs that session.
+ /// Common patterns:
+ /// - **Direct alias** — a `routed` policy with one rule and one target. Identical in behavior to invoking the agent directly.
+ /// - **Canary rollout** — a `routed` policy with one rule and multiple weighted targets (e.g. 90% v1, 10% v2).
+ /// - **Tenant routing** — a `routed` policy with multiple rules, each matching on session metadata (e.g. `session.metadata.tenant`). + ///
+ /// + /// + /// + /// 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 CreateAsync( + + global::Vectara.CreateAgentAliasRequest request, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateAsResponseAsync( + + request: request, + requestTimeout: requestTimeout, + requestTimeoutMillis: requestTimeoutMillis, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Create an alias
+ /// Create a new alias. Aliases are routing primitives that map a public name to one or more underlying agents under a configurable policy. When a session is created through an alias (via `POST /v2/agent_aliases/{alias_key}/sessions`), the alias's policy decides which underlying agent runs that session.
+ /// Common patterns:
+ /// - **Direct alias** — a `routed` policy with one rule and one target. Identical in behavior to invoking the agent directly.
+ /// - **Canary rollout** — a `routed` policy with one rule and multiple weighted targets (e.g. 90% v1, 10% v2).
+ /// - **Tenant routing** — a `routed` policy with multiple rules, each matching on session metadata (e.g. `session.metadata.tenant`). + ///
+ /// + /// + /// + /// 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> CreateAsResponseAsync( + + global::Vectara.CreateAgentAliasRequest request, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareCreateArguments( + httpClient: HttpClient, + requestTimeout: ref requestTimeout, + requestTimeoutMillis: ref requestTimeoutMillis, + request: request); + + + var __authorizations = global::Vectara.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_CreateSecurityRequirements, + operationName: "CreateAsync"); + + using var __timeoutCancellationTokenSource = global::Vectara.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Vectara.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Vectara.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Vectara.PathBuilder( + path: "/v2/agent_aliases", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Vectara.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + if (requestTimeout != default) + { + __httpRequest.Headers.TryAddWithoutValidation("Request-Timeout", requestTimeout.ToString()); + } + if (requestTimeoutMillis != default) + { + __httpRequest.Headers.TryAddWithoutValidation("Request-Timeout-Millis", requestTimeoutMillis.ToString()); + } + + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + __httpRequest.Content = __httpRequestContent; + global::Vectara.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareCreateRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + requestTimeout: requestTimeout, + requestTimeoutMillis: requestTimeoutMillis, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Vectara.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Create", + methodName: "CreateAsync", + pathTemplate: "\"/v2/agent_aliases\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await global::Vectara.VectaraClient.AutoSDKOAuth2Helpers.SendAsync( + httpClient: HttpClient, + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + authorizations: __authorizations, + oAuth2Coordinator: AutoSDKOAuth2State, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Create", + methodName: "CreateAsync", + pathTemplate: "\"/v2/agent_aliases\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Create", + methodName: "CreateAsync", + pathTemplate: "\"/v2/agent_aliases\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessCreateResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Create", + methodName: "CreateAsync", + pathTemplate: "\"/v2/agent_aliases\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Create", + methodName: "CreateAsync", + pathTemplate: "\"/v2/agent_aliases\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Request was malformed or the policy is invalid. + if ((int)__response.StatusCode == 400) + { + string? __content_400 = null; + global::System.Exception? __exception_400 = null; + global::Vectara.BadRequestError? __value_400 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_400 = global::Vectara.BadRequestError.FromJson(__content_400, JsonSerializerContext); + } + else + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_400 = global::Vectara.BadRequestError.FromJson(__content_400, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_400 = __ex; + } + + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_400, + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Permissions do not allow creating aliases. + if ((int)__response.StatusCode == 403) + { + string? __content_403 = null; + global::System.Exception? __exception_403 = null; + global::Vectara.Error? __value_403 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_403 = global::Vectara.Error.FromJson(__content_403, JsonSerializerContext); + } + else + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_403 = global::Vectara.Error.FromJson(__content_403, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_403 = __ex; + } + + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_403, + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // An alias with this key already exists. + if ((int)__response.StatusCode == 409) + { + string? __content_409 = null; + global::System.Exception? __exception_409 = null; + global::Vectara.Error? __value_409 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_409 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_409 = global::Vectara.Error.FromJson(__content_409, JsonSerializerContext); + } + else + { + __content_409 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_409 = global::Vectara.Error.FromJson(__content_409, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_409 = __ex; + } + + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_409 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_409, + responseBody: __content_409, + responseObject: __value_409, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessCreateResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Vectara.AgentAlias.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Vectara.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::Vectara.AgentAlias.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Vectara.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + /// + /// Create an alias
+ /// Create a new alias. Aliases are routing primitives that map a public name to one or more underlying agents under a configurable policy. When a session is created through an alias (via `POST /v2/agent_aliases/{alias_key}/sessions`), the alias's policy decides which underlying agent runs that session.
+ /// Common patterns:
+ /// - **Direct alias** — a `routed` policy with one rule and one target. Identical in behavior to invoking the agent directly.
+ /// - **Canary rollout** — a `routed` policy with one rule and multiple weighted targets (e.g. 90% v1, 10% v2).
+ /// - **Tenant routing** — a `routed` policy with multiple rules, each matching on session metadata (e.g. `session.metadata.tenant`). + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// + /// + /// + /// A routing policy. The `type` discriminator determines which fields apply:
+ /// * `routed` — evaluate ordered rules; the first rule whose `match` expression evaluates to true is selected. The selected rule's `targets` are then used (one agent for `single`, hashed by `partition_by` for `weighted`). Rules with omitted `match` are catch-all rules (typically last).
+ /// Most use cases (direct, weighted/canary, conditional, conditional+canary) collapse into `routed`. + /// + /// + /// Default Value: true + /// + /// + /// 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 CreateAsync( + string key, + string name, + global::Vectara.RoutedAliasPolicy policy, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + string? description = default, + bool? enabled = default, + object? metadata = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::Vectara.CreateAgentAliasRequest + { + Key = key, + Name = name, + Description = description, + Policy = policy, + Enabled = enabled, + Metadata = metadata, + }; + + return await CreateAsync( + requestTimeout: requestTimeout, + requestTimeoutMillis: requestTimeoutMillis, + request: __request, + requestOptions: requestOptions, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.AgentAliasesClient.Delete.g.cs b/src/libs/Vectara/Generated/Vectara.AgentAliasesClient.Delete.g.cs new file mode 100644 index 00000000..d217e889 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.AgentAliasesClient.Delete.g.cs @@ -0,0 +1,567 @@ + +#nullable enable + +namespace Vectara +{ + public partial class AgentAliasesClient + { + + + private static readonly global::Vectara.EndPointSecurityRequirement s_DeleteSecurityRequirement0 = + new global::Vectara.EndPointSecurityRequirement + { + Authorizations = new global::Vectara.EndPointAuthorizationRequirement[] + { new global::Vectara.EndPointAuthorizationRequirement + { + Type = "ApiKey", + SchemeId = "ApiKeyAuth", + Location = "Header", + Name = "x-api-key", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + + private static readonly global::Vectara.EndPointSecurityRequirement s_DeleteSecurityRequirement1 = + new global::Vectara.EndPointSecurityRequirement + { + Authorizations = new global::Vectara.EndPointAuthorizationRequirement[] + { new global::Vectara.EndPointAuthorizationRequirement + { + Type = "OAuth2", + SchemeId = "OAuth2", + Location = "Header", + Name = "", + FriendlyName = "OAuth2", + }, + }, + }; + private static readonly global::Vectara.EndPointSecurityRequirement[] s_DeleteSecurityRequirements = + new global::Vectara.EndPointSecurityRequirement[] + { s_DeleteSecurityRequirement0, + s_DeleteSecurityRequirement1, + }; + partial void PrepareDeleteArguments( + global::System.Net.Http.HttpClient httpClient, + ref int? requestTimeout, + ref int? requestTimeoutMillis, + ref string aliasKey); + partial void PrepareDeleteRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + int? requestTimeout, + int? requestTimeoutMillis, + string aliasKey); + partial void ProcessDeleteResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// Delete an alias
+ /// Delete an alias. The underlying agents the alias points at are not affected. Returns 409 if any live resources still reference this alias. + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// 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 DeleteAsync( + string aliasKey, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + await DeleteAsResponseAsync( + aliasKey: aliasKey, + requestTimeout: requestTimeout, + requestTimeoutMillis: requestTimeoutMillis, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Delete an alias
+ /// Delete an alias. The underlying agents the alias points at are not affected. Returns 409 if any live resources still reference this alias. + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// 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 DeleteAsResponseAsync( + string aliasKey, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareDeleteArguments( + httpClient: HttpClient, + requestTimeout: ref requestTimeout, + requestTimeoutMillis: ref requestTimeoutMillis, + aliasKey: ref aliasKey); + + + var __authorizations = global::Vectara.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_DeleteSecurityRequirements, + operationName: "DeleteAsync"); + + using var __timeoutCancellationTokenSource = global::Vectara.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Vectara.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Vectara.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Vectara.PathBuilder( + path: $"/v2/agent_aliases/{aliasKey}", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Vectara.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Delete, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + if (requestTimeout != default) + { + __httpRequest.Headers.TryAddWithoutValidation("Request-Timeout", requestTimeout.ToString()); + } + if (requestTimeoutMillis != default) + { + __httpRequest.Headers.TryAddWithoutValidation("Request-Timeout-Millis", requestTimeoutMillis.ToString()); + } + + global::Vectara.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareDeleteRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + requestTimeout: requestTimeout, + requestTimeoutMillis: requestTimeoutMillis, + aliasKey: aliasKey!); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Vectara.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Delete", + methodName: "DeleteAsync", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}\"", + httpMethod: "DELETE", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await global::Vectara.VectaraClient.AutoSDKOAuth2Helpers.SendAsync( + httpClient: HttpClient, + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + authorizations: __authorizations, + oAuth2Coordinator: AutoSDKOAuth2State, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Delete", + methodName: "DeleteAsync", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}\"", + httpMethod: "DELETE", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Delete", + methodName: "DeleteAsync", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}\"", + httpMethod: "DELETE", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessDeleteResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Delete", + methodName: "DeleteAsync", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}\"", + httpMethod: "DELETE", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Delete", + methodName: "DeleteAsync", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}\"", + httpMethod: "DELETE", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Permissions do not allow deleting this alias. + if ((int)__response.StatusCode == 403) + { + string? __content_403 = null; + global::System.Exception? __exception_403 = null; + global::Vectara.Error? __value_403 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_403 = global::Vectara.Error.FromJson(__content_403, JsonSerializerContext); + } + else + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_403 = global::Vectara.Error.FromJson(__content_403, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_403 = __ex; + } + + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_403, + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // The alias was not found. + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::System.Exception? __exception_404 = null; + global::Vectara.NotFoundError? __value_404 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_404 = global::Vectara.NotFoundError.FromJson(__content_404, JsonSerializerContext); + } + else + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_404 = global::Vectara.NotFoundError.FromJson(__content_404, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_404 = __ex; + } + + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_404, + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // The alias has live references (e.g. connectors) that prevent deletion. + if ((int)__response.StatusCode == 409) + { + string? __content_409 = null; + global::System.Exception? __exception_409 = null; + global::Vectara.Error? __value_409 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_409 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_409 = global::Vectara.Error.FromJson(__content_409, JsonSerializerContext); + } + else + { + __content_409 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_409 = global::Vectara.Error.FromJson(__content_409, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_409 = __ex; + } + + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_409 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_409, + responseBody: __content_409, + responseObject: __value_409, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return new global::Vectara.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); + } + catch (global::System.Exception __ex) + { + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + return new global::Vectara.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.AgentAliasesClient.Get.g.cs b/src/libs/Vectara/Generated/Vectara.AgentAliasesClient.Get.g.cs new file mode 100644 index 00000000..3aab2330 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.AgentAliasesClient.Get.g.cs @@ -0,0 +1,553 @@ + +#nullable enable + +namespace Vectara +{ + public partial class AgentAliasesClient + { + + + private static readonly global::Vectara.EndPointSecurityRequirement s_GetSecurityRequirement0 = + new global::Vectara.EndPointSecurityRequirement + { + Authorizations = new global::Vectara.EndPointAuthorizationRequirement[] + { new global::Vectara.EndPointAuthorizationRequirement + { + Type = "ApiKey", + SchemeId = "ApiKeyAuth", + Location = "Header", + Name = "x-api-key", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + + private static readonly global::Vectara.EndPointSecurityRequirement s_GetSecurityRequirement1 = + new global::Vectara.EndPointSecurityRequirement + { + Authorizations = new global::Vectara.EndPointAuthorizationRequirement[] + { new global::Vectara.EndPointAuthorizationRequirement + { + Type = "OAuth2", + SchemeId = "OAuth2", + Location = "Header", + Name = "", + FriendlyName = "OAuth2", + }, + }, + }; + private static readonly global::Vectara.EndPointSecurityRequirement[] s_GetSecurityRequirements = + new global::Vectara.EndPointSecurityRequirement[] + { s_GetSecurityRequirement0, + s_GetSecurityRequirement1, + }; + partial void PrepareGetArguments( + global::System.Net.Http.HttpClient httpClient, + ref int? requestTimeout, + ref int? requestTimeoutMillis, + ref string aliasKey); + partial void PrepareGetRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + int? requestTimeout, + int? requestTimeoutMillis, + string aliasKey); + partial void ProcessGetResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessGetResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Get an alias
+ /// Retrieve a specific alias including its policy. + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// 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 GetAsync( + string aliasKey, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetAsResponseAsync( + aliasKey: aliasKey, + requestTimeout: requestTimeout, + requestTimeoutMillis: requestTimeoutMillis, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get an alias
+ /// Retrieve a specific alias including its policy. + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// 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> GetAsResponseAsync( + string aliasKey, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareGetArguments( + httpClient: HttpClient, + requestTimeout: ref requestTimeout, + requestTimeoutMillis: ref requestTimeoutMillis, + aliasKey: ref aliasKey); + + + var __authorizations = global::Vectara.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_GetSecurityRequirements, + operationName: "GetAsync"); + + using var __timeoutCancellationTokenSource = global::Vectara.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Vectara.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Vectara.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Vectara.PathBuilder( + path: $"/v2/agent_aliases/{aliasKey}", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Vectara.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + if (requestTimeout != default) + { + __httpRequest.Headers.TryAddWithoutValidation("Request-Timeout", requestTimeout.ToString()); + } + if (requestTimeoutMillis != default) + { + __httpRequest.Headers.TryAddWithoutValidation("Request-Timeout-Millis", requestTimeoutMillis.ToString()); + } + + global::Vectara.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareGetRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + requestTimeout: requestTimeout, + requestTimeoutMillis: requestTimeoutMillis, + aliasKey: aliasKey!); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Vectara.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Get", + methodName: "GetAsync", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await global::Vectara.VectaraClient.AutoSDKOAuth2Helpers.SendAsync( + httpClient: HttpClient, + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + authorizations: __authorizations, + oAuth2Coordinator: AutoSDKOAuth2State, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Get", + methodName: "GetAsync", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Get", + methodName: "GetAsync", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessGetResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Get", + methodName: "GetAsync", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Get", + methodName: "GetAsync", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Permissions do not allow viewing this alias. + if ((int)__response.StatusCode == 403) + { + string? __content_403 = null; + global::System.Exception? __exception_403 = null; + global::Vectara.Error? __value_403 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_403 = global::Vectara.Error.FromJson(__content_403, JsonSerializerContext); + } + else + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_403 = global::Vectara.Error.FromJson(__content_403, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_403 = __ex; + } + + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_403, + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // The alias was not found. + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::System.Exception? __exception_404 = null; + global::Vectara.NotFoundError? __value_404 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_404 = global::Vectara.NotFoundError.FromJson(__content_404, JsonSerializerContext); + } + else + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_404 = global::Vectara.NotFoundError.FromJson(__content_404, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_404 = __ex; + } + + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_404, + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessGetResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Vectara.AgentAlias.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Vectara.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::Vectara.AgentAlias.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Vectara.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.AgentAliasesClient.List.g.cs b/src/libs/Vectara/Generated/Vectara.AgentAliasesClient.List.g.cs new file mode 100644 index 00000000..25870586 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.AgentAliasesClient.List.g.cs @@ -0,0 +1,555 @@ + +#nullable enable + +namespace Vectara +{ + public partial class AgentAliasesClient + { + + + private static readonly global::Vectara.EndPointSecurityRequirement s_ListSecurityRequirement0 = + new global::Vectara.EndPointSecurityRequirement + { + Authorizations = new global::Vectara.EndPointAuthorizationRequirement[] + { new global::Vectara.EndPointAuthorizationRequirement + { + Type = "ApiKey", + SchemeId = "ApiKeyAuth", + Location = "Header", + Name = "x-api-key", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + + private static readonly global::Vectara.EndPointSecurityRequirement s_ListSecurityRequirement1 = + new global::Vectara.EndPointSecurityRequirement + { + Authorizations = new global::Vectara.EndPointAuthorizationRequirement[] + { new global::Vectara.EndPointAuthorizationRequirement + { + Type = "OAuth2", + SchemeId = "OAuth2", + Location = "Header", + Name = "", + FriendlyName = "OAuth2", + }, + }, + }; + private static readonly global::Vectara.EndPointSecurityRequirement[] s_ListSecurityRequirements = + new global::Vectara.EndPointSecurityRequirement[] + { s_ListSecurityRequirement0, + s_ListSecurityRequirement1, + }; + partial void PrepareListArguments( + global::System.Net.Http.HttpClient httpClient, + ref int? requestTimeout, + ref int? requestTimeoutMillis, + ref int? limit, + ref string? pageKey, + ref string? filter, + ref bool? enabled); + partial void PrepareListRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + int? requestTimeout, + int? requestTimeoutMillis, + int? limit, + string? pageKey, + string? filter, + bool? enabled); + partial void ProcessListResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessListResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// List aliases
+ /// List all aliases owned by the current customer. + ///
+ /// + /// + /// + /// Default Value: 10 + /// + /// + /// + /// Example: support.* + /// + /// + /// Example: true + /// + /// 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, + int? limit = default, + string? pageKey = default, + string? filter = default, + bool? enabled = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ListAsResponseAsync( + requestTimeout: requestTimeout, + requestTimeoutMillis: requestTimeoutMillis, + limit: limit, + pageKey: pageKey, + filter: filter, + enabled: enabled, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List aliases
+ /// List all aliases owned by the current customer. + ///
+ /// + /// + /// + /// Default Value: 10 + /// + /// + /// + /// Example: support.* + /// + /// + /// Example: true + /// + /// 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, + int? limit = default, + string? pageKey = default, + string? filter = default, + bool? enabled = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareListArguments( + httpClient: HttpClient, + requestTimeout: ref requestTimeout, + requestTimeoutMillis: ref requestTimeoutMillis, + limit: ref limit, + pageKey: ref pageKey, + filter: ref filter, + enabled: ref enabled); + + + var __authorizations = global::Vectara.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_ListSecurityRequirements, + operationName: "ListAsync"); + + using var __timeoutCancellationTokenSource = global::Vectara.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Vectara.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Vectara.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Vectara.PathBuilder( + path: "/v2/agent_aliases", + baseUri: HttpClient.BaseAddress); + __pathBuilder + .AddOptionalParameter("limit", limit?.ToString()) + .AddOptionalParameter("page_key", pageKey) + .AddOptionalParameter("filter", filter) + .AddOptionalParameter("enabled", enabled?.ToString().ToLowerInvariant()) + ; + var __path = __pathBuilder.ToString(); + __path = global::Vectara.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + if (requestTimeout != default) + { + __httpRequest.Headers.TryAddWithoutValidation("Request-Timeout", requestTimeout.ToString()); + } + if (requestTimeoutMillis != default) + { + __httpRequest.Headers.TryAddWithoutValidation("Request-Timeout-Millis", requestTimeoutMillis.ToString()); + } + + global::Vectara.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareListRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + requestTimeout: requestTimeout, + requestTimeoutMillis: requestTimeoutMillis, + limit: limit, + pageKey: pageKey, + filter: filter, + enabled: enabled); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Vectara.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "List", + methodName: "ListAsync", + pathTemplate: "\"/v2/agent_aliases\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await global::Vectara.VectaraClient.AutoSDKOAuth2Helpers.SendAsync( + httpClient: HttpClient, + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + authorizations: __authorizations, + oAuth2Coordinator: AutoSDKOAuth2State, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "List", + methodName: "ListAsync", + pathTemplate: "\"/v2/agent_aliases\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "List", + methodName: "ListAsync", + pathTemplate: "\"/v2/agent_aliases\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessListResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "List", + methodName: "ListAsync", + pathTemplate: "\"/v2/agent_aliases\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "List", + methodName: "ListAsync", + pathTemplate: "\"/v2/agent_aliases\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Permissions do not allow listing aliases. + if ((int)__response.StatusCode == 403) + { + string? __content_403 = null; + global::System.Exception? __exception_403 = null; + global::Vectara.Error? __value_403 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_403 = global::Vectara.Error.FromJson(__content_403, JsonSerializerContext); + } + else + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_403 = global::Vectara.Error.FromJson(__content_403, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_403 = __ex; + } + + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_403, + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessListResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Vectara.ListAgentAliasesResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Vectara.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::Vectara.ListAgentAliasesResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Vectara.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.AgentAliasesClient.ReplacePolicy.g.cs b/src/libs/Vectara/Generated/Vectara.AgentAliasesClient.ReplacePolicy.g.cs new file mode 100644 index 00000000..d7afa9c8 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.AgentAliasesClient.ReplacePolicy.g.cs @@ -0,0 +1,652 @@ + +#nullable enable + +namespace Vectara +{ + public partial class AgentAliasesClient + { + + + private static readonly global::Vectara.EndPointSecurityRequirement s_ReplacePolicySecurityRequirement0 = + new global::Vectara.EndPointSecurityRequirement + { + Authorizations = new global::Vectara.EndPointAuthorizationRequirement[] + { new global::Vectara.EndPointAuthorizationRequirement + { + Type = "ApiKey", + SchemeId = "ApiKeyAuth", + Location = "Header", + Name = "x-api-key", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + + private static readonly global::Vectara.EndPointSecurityRequirement s_ReplacePolicySecurityRequirement1 = + new global::Vectara.EndPointSecurityRequirement + { + Authorizations = new global::Vectara.EndPointAuthorizationRequirement[] + { new global::Vectara.EndPointAuthorizationRequirement + { + Type = "OAuth2", + SchemeId = "OAuth2", + Location = "Header", + Name = "", + FriendlyName = "OAuth2", + }, + }, + }; + private static readonly global::Vectara.EndPointSecurityRequirement[] s_ReplacePolicySecurityRequirements = + new global::Vectara.EndPointSecurityRequirement[] + { s_ReplacePolicySecurityRequirement0, + s_ReplacePolicySecurityRequirement1, + }; + partial void PrepareReplacePolicyArguments( + global::System.Net.Http.HttpClient httpClient, + ref int? requestTimeout, + ref int? requestTimeoutMillis, + ref string aliasKey, + global::Vectara.ReplaceAliasPolicyRequest request); + partial void PrepareReplacePolicyRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + int? requestTimeout, + int? requestTimeoutMillis, + string aliasKey, + global::Vectara.ReplaceAliasPolicyRequest request); + partial void ProcessReplacePolicyResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessReplacePolicyResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Replace an alias's routing policy
+ /// Atomically replace the alias's routing policy and stickiness configuration. Replacement is whole-object; partial merging is not supported.
+ /// Use this endpoint to flip canary weights, change tenant routing, etc. The change is atomic: in-flight sessions resolved before the change keep their resolved agent (resolution is once-at-creation). + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// + /// 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 ReplacePolicyAsync( + string aliasKey, + + global::Vectara.ReplaceAliasPolicyRequest request, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ReplacePolicyAsResponseAsync( + aliasKey: aliasKey, + + request: request, + requestTimeout: requestTimeout, + requestTimeoutMillis: requestTimeoutMillis, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Replace an alias's routing policy
+ /// Atomically replace the alias's routing policy and stickiness configuration. Replacement is whole-object; partial merging is not supported.
+ /// Use this endpoint to flip canary weights, change tenant routing, etc. The change is atomic: in-flight sessions resolved before the change keep their resolved agent (resolution is once-at-creation). + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// + /// 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> ReplacePolicyAsResponseAsync( + string aliasKey, + + global::Vectara.ReplaceAliasPolicyRequest request, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareReplacePolicyArguments( + httpClient: HttpClient, + requestTimeout: ref requestTimeout, + requestTimeoutMillis: ref requestTimeoutMillis, + aliasKey: ref aliasKey, + request: request); + + + var __authorizations = global::Vectara.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_ReplacePolicySecurityRequirements, + operationName: "ReplacePolicyAsync"); + + using var __timeoutCancellationTokenSource = global::Vectara.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Vectara.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Vectara.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Vectara.PathBuilder( + path: $"/v2/agent_aliases/{aliasKey}/policy", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Vectara.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Put, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + if (requestTimeout != default) + { + __httpRequest.Headers.TryAddWithoutValidation("Request-Timeout", requestTimeout.ToString()); + } + if (requestTimeoutMillis != default) + { + __httpRequest.Headers.TryAddWithoutValidation("Request-Timeout-Millis", requestTimeoutMillis.ToString()); + } + + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + __httpRequest.Content = __httpRequestContent; + global::Vectara.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareReplacePolicyRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + requestTimeout: requestTimeout, + requestTimeoutMillis: requestTimeoutMillis, + aliasKey: aliasKey!, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Vectara.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ReplacePolicy", + methodName: "ReplacePolicyAsync", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}/policy\"", + httpMethod: "PUT", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await global::Vectara.VectaraClient.AutoSDKOAuth2Helpers.SendAsync( + httpClient: HttpClient, + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + authorizations: __authorizations, + oAuth2Coordinator: AutoSDKOAuth2State, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ReplacePolicy", + methodName: "ReplacePolicyAsync", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}/policy\"", + httpMethod: "PUT", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ReplacePolicy", + methodName: "ReplacePolicyAsync", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}/policy\"", + httpMethod: "PUT", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessReplacePolicyResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ReplacePolicy", + methodName: "ReplacePolicyAsync", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}/policy\"", + httpMethod: "PUT", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ReplacePolicy", + methodName: "ReplacePolicyAsync", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}/policy\"", + httpMethod: "PUT", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // The new policy is invalid. + if ((int)__response.StatusCode == 400) + { + string? __content_400 = null; + global::System.Exception? __exception_400 = null; + global::Vectara.BadRequestError? __value_400 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_400 = global::Vectara.BadRequestError.FromJson(__content_400, JsonSerializerContext); + } + else + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_400 = global::Vectara.BadRequestError.FromJson(__content_400, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_400 = __ex; + } + + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_400, + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Permissions do not allow modifying this alias. + if ((int)__response.StatusCode == 403) + { + string? __content_403 = null; + global::System.Exception? __exception_403 = null; + global::Vectara.Error? __value_403 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_403 = global::Vectara.Error.FromJson(__content_403, JsonSerializerContext); + } + else + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_403 = global::Vectara.Error.FromJson(__content_403, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_403 = __ex; + } + + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_403, + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // The alias was not found. + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::System.Exception? __exception_404 = null; + global::Vectara.NotFoundError? __value_404 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_404 = global::Vectara.NotFoundError.FromJson(__content_404, JsonSerializerContext); + } + else + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_404 = global::Vectara.NotFoundError.FromJson(__content_404, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_404 = __ex; + } + + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_404, + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessReplacePolicyResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Vectara.AgentAlias.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Vectara.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::Vectara.AgentAlias.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Vectara.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + /// + /// Replace an alias's routing policy
+ /// Atomically replace the alias's routing policy and stickiness configuration. Replacement is whole-object; partial merging is not supported.
+ /// Use this endpoint to flip canary weights, change tenant routing, etc. The change is atomic: in-flight sessions resolved before the change keep their resolved agent (resolution is once-at-creation). + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// + /// A routing policy. The `type` discriminator determines which fields apply:
+ /// * `routed` — evaluate ordered rules; the first rule whose `match` expression evaluates to true is selected. The selected rule's `targets` are then used (one agent for `single`, hashed by `partition_by` for `weighted`). Rules with omitted `match` are catch-all rules (typically last).
+ /// Most use cases (direct, weighted/canary, conditional, conditional+canary) collapse into `routed`. + /// + /// 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 ReplacePolicyAsync( + string aliasKey, + global::Vectara.RoutedAliasPolicy policy, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::Vectara.ReplaceAliasPolicyRequest + { + Policy = policy, + }; + + return await ReplacePolicyAsync( + requestTimeout: requestTimeout, + requestTimeoutMillis: requestTimeoutMillis, + aliasKey: aliasKey, + request: __request, + requestOptions: requestOptions, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.AgentAliasesClient.Update.g.cs b/src/libs/Vectara/Generated/Vectara.AgentAliasesClient.Update.g.cs new file mode 100644 index 00000000..f6825480 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.AgentAliasesClient.Update.g.cs @@ -0,0 +1,617 @@ + +#nullable enable + +namespace Vectara +{ + public partial class AgentAliasesClient + { + + + private static readonly global::Vectara.EndPointSecurityRequirement s_UpdateSecurityRequirement0 = + new global::Vectara.EndPointSecurityRequirement + { + Authorizations = new global::Vectara.EndPointAuthorizationRequirement[] + { new global::Vectara.EndPointAuthorizationRequirement + { + Type = "ApiKey", + SchemeId = "ApiKeyAuth", + Location = "Header", + Name = "x-api-key", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + + private static readonly global::Vectara.EndPointSecurityRequirement s_UpdateSecurityRequirement1 = + new global::Vectara.EndPointSecurityRequirement + { + Authorizations = new global::Vectara.EndPointAuthorizationRequirement[] + { new global::Vectara.EndPointAuthorizationRequirement + { + Type = "OAuth2", + SchemeId = "OAuth2", + Location = "Header", + Name = "", + FriendlyName = "OAuth2", + }, + }, + }; + private static readonly global::Vectara.EndPointSecurityRequirement[] s_UpdateSecurityRequirements = + new global::Vectara.EndPointSecurityRequirement[] + { s_UpdateSecurityRequirement0, + s_UpdateSecurityRequirement1, + }; + partial void PrepareUpdateArguments( + global::System.Net.Http.HttpClient httpClient, + ref int? requestTimeout, + ref int? requestTimeoutMillis, + ref string aliasKey, + global::Vectara.UpdateAgentAliasRequest request); + partial void PrepareUpdateRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + int? requestTimeout, + int? requestTimeoutMillis, + string aliasKey, + global::Vectara.UpdateAgentAliasRequest request); + partial void ProcessUpdateResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessUpdateResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Update an alias's metadata
+ /// Update an alias's metadata fields (name, description, enabled, metadata). To replace the routing policy, use `PUT /v2/agent_aliases/{alias_key}/policy` — policies are atomic and not partially updatable. + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// + /// 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 UpdateAsync( + string aliasKey, + + global::Vectara.UpdateAgentAliasRequest request, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UpdateAsResponseAsync( + aliasKey: aliasKey, + + request: request, + requestTimeout: requestTimeout, + requestTimeoutMillis: requestTimeoutMillis, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Update an alias's metadata
+ /// Update an alias's metadata fields (name, description, enabled, metadata). To replace the routing policy, use `PUT /v2/agent_aliases/{alias_key}/policy` — policies are atomic and not partially updatable. + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// + /// 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> UpdateAsResponseAsync( + string aliasKey, + + global::Vectara.UpdateAgentAliasRequest request, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareUpdateArguments( + httpClient: HttpClient, + requestTimeout: ref requestTimeout, + requestTimeoutMillis: ref requestTimeoutMillis, + aliasKey: ref aliasKey, + request: request); + + + var __authorizations = global::Vectara.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_UpdateSecurityRequirements, + operationName: "UpdateAsync"); + + using var __timeoutCancellationTokenSource = global::Vectara.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Vectara.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Vectara.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Vectara.PathBuilder( + path: $"/v2/agent_aliases/{aliasKey}", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Vectara.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: new global::System.Net.Http.HttpMethod("PATCH"), + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + if (requestTimeout != default) + { + __httpRequest.Headers.TryAddWithoutValidation("Request-Timeout", requestTimeout.ToString()); + } + if (requestTimeoutMillis != default) + { + __httpRequest.Headers.TryAddWithoutValidation("Request-Timeout-Millis", requestTimeoutMillis.ToString()); + } + + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + __httpRequest.Content = __httpRequestContent; + global::Vectara.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareUpdateRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + requestTimeout: requestTimeout, + requestTimeoutMillis: requestTimeoutMillis, + aliasKey: aliasKey!, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Vectara.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Update", + methodName: "UpdateAsync", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}\"", + httpMethod: "PATCH", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await global::Vectara.VectaraClient.AutoSDKOAuth2Helpers.SendAsync( + httpClient: HttpClient, + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + authorizations: __authorizations, + oAuth2Coordinator: AutoSDKOAuth2State, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Update", + methodName: "UpdateAsync", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}\"", + httpMethod: "PATCH", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Update", + methodName: "UpdateAsync", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}\"", + httpMethod: "PATCH", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessUpdateResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Update", + methodName: "UpdateAsync", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}\"", + httpMethod: "PATCH", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Update", + methodName: "UpdateAsync", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}\"", + httpMethod: "PATCH", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Permissions do not allow modifying this alias. + if ((int)__response.StatusCode == 403) + { + string? __content_403 = null; + global::System.Exception? __exception_403 = null; + global::Vectara.Error? __value_403 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_403 = global::Vectara.Error.FromJson(__content_403, JsonSerializerContext); + } + else + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_403 = global::Vectara.Error.FromJson(__content_403, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_403 = __ex; + } + + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_403, + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // The alias was not found. + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::System.Exception? __exception_404 = null; + global::Vectara.NotFoundError? __value_404 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_404 = global::Vectara.NotFoundError.FromJson(__content_404, JsonSerializerContext); + } + else + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_404 = global::Vectara.NotFoundError.FromJson(__content_404, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_404 = __ex; + } + + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_404, + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessUpdateResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Vectara.AgentAlias.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Vectara.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::Vectara.AgentAlias.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Vectara.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + /// + /// Update an alias's metadata
+ /// Update an alias's metadata fields (name, description, enabled, metadata). To replace the routing policy, use `PUT /v2/agent_aliases/{alias_key}/policy` — policies are atomic and not partially updatable. + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// + /// + /// + /// + /// 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 UpdateAsync( + string aliasKey, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + string? name = default, + string? description = default, + bool? enabled = default, + object? metadata = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::Vectara.UpdateAgentAliasRequest + { + Name = name, + Description = description, + Enabled = enabled, + Metadata = metadata, + }; + + return await UpdateAsync( + requestTimeout: requestTimeout, + requestTimeoutMillis: requestTimeoutMillis, + aliasKey: aliasKey, + request: __request, + requestOptions: requestOptions, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.AgentAliasesClient.g.cs b/src/libs/Vectara/Generated/Vectara.AgentAliasesClient.g.cs new file mode 100644 index 00000000..99cbea55 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.AgentAliasesClient.g.cs @@ -0,0 +1,139 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public sealed partial class AgentAliasesClient : global::Vectara.IAgentAliasesClient, global::System.IDisposable + { + /// + /// + /// + public const string DefaultBaseUrl = "https://api.vectara.io/"; + + private bool _disposeHttpClient = true; + + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + public System.Uri? BaseUri => HttpClient.BaseAddress; + + /// + public global::System.Collections.Generic.List Authorizations { get; } + + /// + public bool ReadResponseAsString { get; set; } +#if DEBUG + = true; +#endif + + /// + public global::Vectara.AutoSDKClientOptions Options { get; } + + + internal global::Vectara.VectaraClient.AutoSDKOAuth2Coordinator AutoSDKOAuth2State { get; set; } = new global::Vectara.VectaraClient.AutoSDKOAuth2Coordinator(); + /// + /// + /// + public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::Vectara.SourceGenerationContext.Default; + + + /// + /// Creates a new instance of the AgentAliasesClient. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used. + /// The authorizations to use for the requests. + /// Dispose the HttpClient when the instance is disposed. True by default. + public AgentAliasesClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::System.Collections.Generic.List? authorizations = null, + bool disposeHttpClient = true) : this( + httpClient, + baseUri, + authorizations, + options: null, + disposeHttpClient: disposeHttpClient) + { + } + + /// + /// Creates a new instance of the AgentAliasesClient with explicit options but no base URL override. + /// Skips passing baseUri so the default base URL from the OpenAPI spec applies. + /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The authorizations to use for the requests. + /// Client-wide request defaults such as headers, query parameters, retries, and timeout. + /// Dispose the HttpClient when the instance is disposed. True by default. + public AgentAliasesClient( + global::System.Net.Http.HttpClient? httpClient, + global::System.Collections.Generic.List? authorizations, + global::Vectara.AutoSDKClientOptions? options, + bool disposeHttpClient = true) : this( + httpClient, + baseUri: null, + authorizations, + options, + disposeHttpClient: disposeHttpClient) + { + } + + /// + /// Creates a new instance of the AgentAliasesClient. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used. + /// The authorizations to use for the requests. + /// Client-wide request defaults such as headers, query parameters, retries, and timeout. + /// Dispose the HttpClient when the instance is disposed. True by default. + public AgentAliasesClient( + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Vectara.AutoSDKClientOptions? options, + bool disposeHttpClient = true) + { + + HttpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + HttpClient.BaseAddress ??= baseUri ?? new global::System.Uri(DefaultBaseUrl); + Authorizations = authorizations ?? new global::System.Collections.Generic.List(); + Options = options ?? new global::Vectara.AutoSDKClientOptions(); + _disposeHttpClient = disposeHttpClient; + + Initialized(HttpClient); + } + + /// + public void Dispose() + { + if (_disposeHttpClient) + { + HttpClient.Dispose(); + } + } + + partial void Initialized( + global::System.Net.Http.HttpClient client); + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.AgentAliasesEventsClient.Hide.g.cs b/src/libs/Vectara/Generated/Vectara.AgentAliasesEventsClient.Hide.g.cs new file mode 100644 index 00000000..09a6afee --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.AgentAliasesEventsClient.Hide.g.cs @@ -0,0 +1,577 @@ + +#nullable enable + +namespace Vectara +{ + public partial class AgentAliasesEventsClient + { + + + private static readonly global::Vectara.EndPointSecurityRequirement s_HideSecurityRequirement0 = + new global::Vectara.EndPointSecurityRequirement + { + Authorizations = new global::Vectara.EndPointAuthorizationRequirement[] + { new global::Vectara.EndPointAuthorizationRequirement + { + Type = "ApiKey", + SchemeId = "ApiKeyAuth", + Location = "Header", + Name = "x-api-key", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + + private static readonly global::Vectara.EndPointSecurityRequirement s_HideSecurityRequirement1 = + new global::Vectara.EndPointSecurityRequirement + { + Authorizations = new global::Vectara.EndPointAuthorizationRequirement[] + { new global::Vectara.EndPointAuthorizationRequirement + { + Type = "OAuth2", + SchemeId = "OAuth2", + Location = "Header", + Name = "", + FriendlyName = "OAuth2", + }, + }, + }; + private static readonly global::Vectara.EndPointSecurityRequirement[] s_HideSecurityRequirements = + new global::Vectara.EndPointSecurityRequirement[] + { s_HideSecurityRequirement0, + s_HideSecurityRequirement1, + }; + partial void PrepareHideArguments( + global::System.Net.Http.HttpClient httpClient, + ref int? requestTimeout, + ref int? requestTimeoutMillis, + ref string aliasKey, + ref string sessionKey, + ref string eventId); + partial void PrepareHideRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + int? requestTimeout, + int? requestTimeoutMillis, + string aliasKey, + string sessionKey, + string eventId); + partial void ProcessHideResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessHideResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Hide event on alias-routed session
+ /// Manually hide an event on a session originally created via this alias. Sets hide_reason to 'manual'. + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// + /// A unique key that identifies an agent session.
+ /// Example: customer_support_chat + /// + /// + /// 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 HideAsync( + string aliasKey, + string sessionKey, + string eventId, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await HideAsResponseAsync( + aliasKey: aliasKey, + sessionKey: sessionKey, + eventId: eventId, + requestTimeout: requestTimeout, + requestTimeoutMillis: requestTimeoutMillis, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Hide event on alias-routed session
+ /// Manually hide an event on a session originally created via this alias. Sets hide_reason to 'manual'. + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// + /// A unique key that identifies an agent session.
+ /// Example: customer_support_chat + /// + /// + /// 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> HideAsResponseAsync( + string aliasKey, + string sessionKey, + string eventId, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareHideArguments( + httpClient: HttpClient, + requestTimeout: ref requestTimeout, + requestTimeoutMillis: ref requestTimeoutMillis, + aliasKey: ref aliasKey, + sessionKey: ref sessionKey, + eventId: ref eventId); + + + var __authorizations = global::Vectara.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_HideSecurityRequirements, + operationName: "HideAsync"); + + using var __timeoutCancellationTokenSource = global::Vectara.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Vectara.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Vectara.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Vectara.PathBuilder( + path: $"/v2/agent_aliases/{aliasKey}/sessions/{sessionKey}/events/{eventId}/hide", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Vectara.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + if (requestTimeout != default) + { + __httpRequest.Headers.TryAddWithoutValidation("Request-Timeout", requestTimeout.ToString()); + } + if (requestTimeoutMillis != default) + { + __httpRequest.Headers.TryAddWithoutValidation("Request-Timeout-Millis", requestTimeoutMillis.ToString()); + } + + global::Vectara.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareHideRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + requestTimeout: requestTimeout, + requestTimeoutMillis: requestTimeoutMillis, + aliasKey: aliasKey!, + sessionKey: sessionKey!, + eventId: eventId!); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Vectara.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Hide", + methodName: "HideAsync", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}/sessions/{sessionKey}/events/{eventId}/hide\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await global::Vectara.VectaraClient.AutoSDKOAuth2Helpers.SendAsync( + httpClient: HttpClient, + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + authorizations: __authorizations, + oAuth2Coordinator: AutoSDKOAuth2State, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Hide", + methodName: "HideAsync", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}/sessions/{sessionKey}/events/{eventId}/hide\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Hide", + methodName: "HideAsync", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}/sessions/{sessionKey}/events/{eventId}/hide\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessHideResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Hide", + methodName: "HideAsync", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}/sessions/{sessionKey}/events/{eventId}/hide\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Hide", + methodName: "HideAsync", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}/sessions/{sessionKey}/events/{eventId}/hide\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Permissions do not allow hiding events on this session. + if ((int)__response.StatusCode == 403) + { + string? __content_403 = null; + global::System.Exception? __exception_403 = null; + global::Vectara.Error? __value_403 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_403 = global::Vectara.Error.FromJson(__content_403, JsonSerializerContext); + } + else + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_403 = global::Vectara.Error.FromJson(__content_403, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_403 = __ex; + } + + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_403, + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Alias, session, or event not found. + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::System.Exception? __exception_404 = null; + global::Vectara.NotFoundError? __value_404 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_404 = global::Vectara.NotFoundError.FromJson(__content_404, JsonSerializerContext); + } + else + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_404 = global::Vectara.NotFoundError.FromJson(__content_404, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_404 = __ex; + } + + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_404, + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessHideResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Vectara.AgentEvent.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Vectara.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::Vectara.AgentEvent.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Vectara.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.AgentAliasesEventsClient.Unhide.g.cs b/src/libs/Vectara/Generated/Vectara.AgentAliasesEventsClient.Unhide.g.cs new file mode 100644 index 00000000..e244f929 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.AgentAliasesEventsClient.Unhide.g.cs @@ -0,0 +1,577 @@ + +#nullable enable + +namespace Vectara +{ + public partial class AgentAliasesEventsClient + { + + + private static readonly global::Vectara.EndPointSecurityRequirement s_UnhideSecurityRequirement0 = + new global::Vectara.EndPointSecurityRequirement + { + Authorizations = new global::Vectara.EndPointAuthorizationRequirement[] + { new global::Vectara.EndPointAuthorizationRequirement + { + Type = "ApiKey", + SchemeId = "ApiKeyAuth", + Location = "Header", + Name = "x-api-key", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + + private static readonly global::Vectara.EndPointSecurityRequirement s_UnhideSecurityRequirement1 = + new global::Vectara.EndPointSecurityRequirement + { + Authorizations = new global::Vectara.EndPointAuthorizationRequirement[] + { new global::Vectara.EndPointAuthorizationRequirement + { + Type = "OAuth2", + SchemeId = "OAuth2", + Location = "Header", + Name = "", + FriendlyName = "OAuth2", + }, + }, + }; + private static readonly global::Vectara.EndPointSecurityRequirement[] s_UnhideSecurityRequirements = + new global::Vectara.EndPointSecurityRequirement[] + { s_UnhideSecurityRequirement0, + s_UnhideSecurityRequirement1, + }; + partial void PrepareUnhideArguments( + global::System.Net.Http.HttpClient httpClient, + ref int? requestTimeout, + ref int? requestTimeoutMillis, + ref string aliasKey, + ref string sessionKey, + ref string eventId); + partial void PrepareUnhideRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + int? requestTimeout, + int? requestTimeoutMillis, + string aliasKey, + string sessionKey, + string eventId); + partial void ProcessUnhideResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessUnhideResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Unhide event on alias-routed session
+ /// Unhide a hidden event on a session originally created via this alias. Clears the hide_reason. + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// + /// A unique key that identifies an agent session.
+ /// Example: customer_support_chat + /// + /// + /// 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 UnhideAsync( + string aliasKey, + string sessionKey, + string eventId, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UnhideAsResponseAsync( + aliasKey: aliasKey, + sessionKey: sessionKey, + eventId: eventId, + requestTimeout: requestTimeout, + requestTimeoutMillis: requestTimeoutMillis, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Unhide event on alias-routed session
+ /// Unhide a hidden event on a session originally created via this alias. Clears the hide_reason. + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// + /// A unique key that identifies an agent session.
+ /// Example: customer_support_chat + /// + /// + /// 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> UnhideAsResponseAsync( + string aliasKey, + string sessionKey, + string eventId, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareUnhideArguments( + httpClient: HttpClient, + requestTimeout: ref requestTimeout, + requestTimeoutMillis: ref requestTimeoutMillis, + aliasKey: ref aliasKey, + sessionKey: ref sessionKey, + eventId: ref eventId); + + + var __authorizations = global::Vectara.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_UnhideSecurityRequirements, + operationName: "UnhideAsync"); + + using var __timeoutCancellationTokenSource = global::Vectara.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Vectara.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Vectara.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Vectara.PathBuilder( + path: $"/v2/agent_aliases/{aliasKey}/sessions/{sessionKey}/events/{eventId}/unhide", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Vectara.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + if (requestTimeout != default) + { + __httpRequest.Headers.TryAddWithoutValidation("Request-Timeout", requestTimeout.ToString()); + } + if (requestTimeoutMillis != default) + { + __httpRequest.Headers.TryAddWithoutValidation("Request-Timeout-Millis", requestTimeoutMillis.ToString()); + } + + global::Vectara.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareUnhideRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + requestTimeout: requestTimeout, + requestTimeoutMillis: requestTimeoutMillis, + aliasKey: aliasKey!, + sessionKey: sessionKey!, + eventId: eventId!); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Vectara.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Unhide", + methodName: "UnhideAsync", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}/sessions/{sessionKey}/events/{eventId}/unhide\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await global::Vectara.VectaraClient.AutoSDKOAuth2Helpers.SendAsync( + httpClient: HttpClient, + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + authorizations: __authorizations, + oAuth2Coordinator: AutoSDKOAuth2State, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Unhide", + methodName: "UnhideAsync", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}/sessions/{sessionKey}/events/{eventId}/unhide\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Unhide", + methodName: "UnhideAsync", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}/sessions/{sessionKey}/events/{eventId}/unhide\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessUnhideResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Unhide", + methodName: "UnhideAsync", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}/sessions/{sessionKey}/events/{eventId}/unhide\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Unhide", + methodName: "UnhideAsync", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}/sessions/{sessionKey}/events/{eventId}/unhide\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Permissions do not allow unhiding events on this session. + if ((int)__response.StatusCode == 403) + { + string? __content_403 = null; + global::System.Exception? __exception_403 = null; + global::Vectara.Error? __value_403 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_403 = global::Vectara.Error.FromJson(__content_403, JsonSerializerContext); + } + else + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_403 = global::Vectara.Error.FromJson(__content_403, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_403 = __ex; + } + + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_403, + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Alias, session, or event not found. + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::System.Exception? __exception_404 = null; + global::Vectara.NotFoundError? __value_404 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_404 = global::Vectara.NotFoundError.FromJson(__content_404, JsonSerializerContext); + } + else + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_404 = global::Vectara.NotFoundError.FromJson(__content_404, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_404 = __ex; + } + + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_404, + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessUnhideResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Vectara.AgentEvent.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Vectara.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::Vectara.AgentEvent.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Vectara.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.AgentAliasesEventsClient.g.cs b/src/libs/Vectara/Generated/Vectara.AgentAliasesEventsClient.g.cs new file mode 100644 index 00000000..2003e582 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.AgentAliasesEventsClient.g.cs @@ -0,0 +1,139 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public sealed partial class AgentAliasesEventsClient : global::Vectara.IAgentAliasesEventsClient, global::System.IDisposable + { + /// + /// + /// + public const string DefaultBaseUrl = "https://api.vectara.io/"; + + private bool _disposeHttpClient = true; + + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + public System.Uri? BaseUri => HttpClient.BaseAddress; + + /// + public global::System.Collections.Generic.List Authorizations { get; } + + /// + public bool ReadResponseAsString { get; set; } +#if DEBUG + = true; +#endif + + /// + public global::Vectara.AutoSDKClientOptions Options { get; } + + + internal global::Vectara.VectaraClient.AutoSDKOAuth2Coordinator AutoSDKOAuth2State { get; set; } = new global::Vectara.VectaraClient.AutoSDKOAuth2Coordinator(); + /// + /// + /// + public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::Vectara.SourceGenerationContext.Default; + + + /// + /// Creates a new instance of the AgentAliasesEventsClient. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used. + /// The authorizations to use for the requests. + /// Dispose the HttpClient when the instance is disposed. True by default. + public AgentAliasesEventsClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::System.Collections.Generic.List? authorizations = null, + bool disposeHttpClient = true) : this( + httpClient, + baseUri, + authorizations, + options: null, + disposeHttpClient: disposeHttpClient) + { + } + + /// + /// Creates a new instance of the AgentAliasesEventsClient with explicit options but no base URL override. + /// Skips passing baseUri so the default base URL from the OpenAPI spec applies. + /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The authorizations to use for the requests. + /// Client-wide request defaults such as headers, query parameters, retries, and timeout. + /// Dispose the HttpClient when the instance is disposed. True by default. + public AgentAliasesEventsClient( + global::System.Net.Http.HttpClient? httpClient, + global::System.Collections.Generic.List? authorizations, + global::Vectara.AutoSDKClientOptions? options, + bool disposeHttpClient = true) : this( + httpClient, + baseUri: null, + authorizations, + options, + disposeHttpClient: disposeHttpClient) + { + } + + /// + /// Creates a new instance of the AgentAliasesEventsClient. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used. + /// The authorizations to use for the requests. + /// Client-wide request defaults such as headers, query parameters, retries, and timeout. + /// Dispose the HttpClient when the instance is disposed. True by default. + public AgentAliasesEventsClient( + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Vectara.AutoSDKClientOptions? options, + bool disposeHttpClient = true) + { + + HttpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + HttpClient.BaseAddress ??= baseUri ?? new global::System.Uri(DefaultBaseUrl); + Authorizations = authorizations ?? new global::System.Collections.Generic.List(); + Options = options ?? new global::Vectara.AutoSDKClientOptions(); + _disposeHttpClient = disposeHttpClient; + + Initialized(HttpClient); + } + + /// + public void Dispose() + { + if (_disposeHttpClient) + { + HttpClient.Dispose(); + } + } + + partial void Initialized( + global::System.Net.Http.HttpClient client); + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.AgentAliasesSessionsClient.Create2.g.cs b/src/libs/Vectara/Generated/Vectara.AgentAliasesSessionsClient.Create2.g.cs new file mode 100644 index 00000000..020ea15a --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.AgentAliasesSessionsClient.Create2.g.cs @@ -0,0 +1,697 @@ + +#nullable enable + +namespace Vectara +{ + public partial class AgentAliasesSessionsClient + { + + + private static readonly global::Vectara.EndPointSecurityRequirement s_Create2SecurityRequirement0 = + new global::Vectara.EndPointSecurityRequirement + { + Authorizations = new global::Vectara.EndPointAuthorizationRequirement[] + { new global::Vectara.EndPointAuthorizationRequirement + { + Type = "ApiKey", + SchemeId = "ApiKeyAuth", + Location = "Header", + Name = "x-api-key", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + + private static readonly global::Vectara.EndPointSecurityRequirement s_Create2SecurityRequirement1 = + new global::Vectara.EndPointSecurityRequirement + { + Authorizations = new global::Vectara.EndPointAuthorizationRequirement[] + { new global::Vectara.EndPointAuthorizationRequirement + { + Type = "OAuth2", + SchemeId = "OAuth2", + Location = "Header", + Name = "", + FriendlyName = "OAuth2", + }, + }, + }; + private static readonly global::Vectara.EndPointSecurityRequirement[] s_Create2SecurityRequirements = + new global::Vectara.EndPointSecurityRequirement[] + { s_Create2SecurityRequirement0, + s_Create2SecurityRequirement1, + }; + partial void PrepareCreate2Arguments( + global::System.Net.Http.HttpClient httpClient, + ref int? requestTimeout, + ref int? requestTimeoutMillis, + ref string aliasKey, + global::Vectara.CreateAgentSessionRequest request); + partial void PrepareCreate2Request( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + int? requestTimeout, + int? requestTimeoutMillis, + string aliasKey, + global::Vectara.CreateAgentSessionRequest request); + partial void ProcessCreate2Response( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCreate2ResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Create session via alias
+ /// Create a new session by routing through an alias. The alias's policy is evaluated to pick the underlying agent that will own the session. Subsequent operations on the session can be addressed via this alias or directly via `/v2/agents/{resolved_agent_key}/sessions/{session_key}`. + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// + /// 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 Create2Async( + string aliasKey, + + global::Vectara.CreateAgentSessionRequest request, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await Create2AsResponseAsync( + aliasKey: aliasKey, + + request: request, + requestTimeout: requestTimeout, + requestTimeoutMillis: requestTimeoutMillis, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Create session via alias
+ /// Create a new session by routing through an alias. The alias's policy is evaluated to pick the underlying agent that will own the session. Subsequent operations on the session can be addressed via this alias or directly via `/v2/agents/{resolved_agent_key}/sessions/{session_key}`. + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// + /// 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> Create2AsResponseAsync( + string aliasKey, + + global::Vectara.CreateAgentSessionRequest request, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareCreate2Arguments( + httpClient: HttpClient, + requestTimeout: ref requestTimeout, + requestTimeoutMillis: ref requestTimeoutMillis, + aliasKey: ref aliasKey, + request: request); + + + var __authorizations = global::Vectara.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_Create2SecurityRequirements, + operationName: "Create2Async"); + + using var __timeoutCancellationTokenSource = global::Vectara.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Vectara.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Vectara.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Vectara.PathBuilder( + path: $"/v2/agent_aliases/{aliasKey}/sessions", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Vectara.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + if (requestTimeout != default) + { + __httpRequest.Headers.TryAddWithoutValidation("Request-Timeout", requestTimeout.ToString()); + } + if (requestTimeoutMillis != default) + { + __httpRequest.Headers.TryAddWithoutValidation("Request-Timeout-Millis", requestTimeoutMillis.ToString()); + } + + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + __httpRequest.Content = __httpRequestContent; + global::Vectara.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareCreate2Request( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + requestTimeout: requestTimeout, + requestTimeoutMillis: requestTimeoutMillis, + aliasKey: aliasKey!, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Vectara.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Create2", + methodName: "Create2Async", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}/sessions\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await global::Vectara.VectaraClient.AutoSDKOAuth2Helpers.SendAsync( + httpClient: HttpClient, + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + authorizations: __authorizations, + oAuth2Coordinator: AutoSDKOAuth2State, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Create2", + methodName: "Create2Async", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}/sessions\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Create2", + methodName: "Create2Async", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}/sessions\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessCreate2Response( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Create2", + methodName: "Create2Async", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}/sessions\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Create2", + methodName: "Create2Async", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}/sessions\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Session creation request was malformed, or the alias's policy could not resolve against the session context. + if ((int)__response.StatusCode == 400) + { + string? __content_400 = null; + global::System.Exception? __exception_400 = null; + global::Vectara.BadRequestError? __value_400 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_400 = global::Vectara.BadRequestError.FromJson(__content_400, JsonSerializerContext); + } + else + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_400 = global::Vectara.BadRequestError.FromJson(__content_400, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_400 = __ex; + } + + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_400, + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Permissions do not allow creating sessions via this alias. + if ((int)__response.StatusCode == 403) + { + string? __content_403 = null; + global::System.Exception? __exception_403 = null; + global::Vectara.Error? __value_403 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_403 = global::Vectara.Error.FromJson(__content_403, JsonSerializerContext); + } + else + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_403 = global::Vectara.Error.FromJson(__content_403, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_403 = __ex; + } + + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_403, + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Alias not found or not currently active. + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::System.Exception? __exception_404 = null; + global::Vectara.NotFoundError? __value_404 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_404 = global::Vectara.NotFoundError.FromJson(__content_404, JsonSerializerContext); + } + else + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_404 = global::Vectara.NotFoundError.FromJson(__content_404, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_404 = __ex; + } + + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_404, + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessCreate2ResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Vectara.AgentSession.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Vectara.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::Vectara.AgentSession.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Vectara.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + /// + /// Create session via alias
+ /// Create a new session by routing through an alias. The alias's policy is evaluated to pick the underlying agent that will own the session. Subsequent operations on the session can be addressed via this alias or directly via `/v2/agents/{resolved_agent_key}/sessions/{session_key}`. + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// + /// A unique key that identifies an agent session.
+ /// Example: customer_support_chat + /// + /// + /// Human-readable name for the session.
+ /// Example: Customer Support Session + /// + /// + /// Optional description of the session purpose or context.
+ /// Example: Helping customer troubleshoot issues + /// + /// + /// Arbitrary metadata associated with the session.
+ /// Default Value: {}
+ /// Example: {"customer_id":"12345","priority":"medium","channel":"web_chat"} + /// + /// + /// Whether the session should be enabled upon creation.
+ /// Default Value: true
+ /// Example: true + /// + /// + /// Time-to-idle in minutes for the session. If no events occur in the session for this duration, the session will be automatically deleted. If set to 0, the session will not expire.
+ /// Default Value: 0
+ /// Example: 60 + /// + /// + /// Session-scoped secrets to store on the new session. Map of secret name to plaintext value.
+ /// Encrypted at rest with the owning agent's encryption key. Referenced from tool `argument_override` via
+ /// `{"$ref": "session.secrets.<name>"}`. Returned masked (`****`) on reads.
+ /// Example: {"slack_user_token":"xoxp-your-token-here"} + /// + /// + /// Create a new session by forking an existing one. By default, copies all visible events
+ /// and artifacts from the source session without compaction. Optionally specify exactly one of
+ /// include_up_to_event_id or compact_up_to_event_id to control which events are included
+ /// and whether they are compacted. These two fields are mutually exclusive. + /// + /// 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 Create2Async( + string aliasKey, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + string? key = default, + string? name = default, + string? description = default, + object? metadata = default, + bool? enabled = default, + long? ttiMinutes = default, + global::System.Collections.Generic.Dictionary? secrets = default, + global::Vectara.CreateAgentSessionRequestFromSession? fromSession = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::Vectara.CreateAgentSessionRequest + { + Key = key, + Name = name, + Description = description, + Metadata = metadata, + Enabled = enabled, + TtiMinutes = ttiMinutes, + Secrets = secrets, + FromSession = fromSession, + }; + + return await Create2Async( + requestTimeout: requestTimeout, + requestTimeoutMillis: requestTimeoutMillis, + aliasKey: aliasKey, + request: __request, + requestOptions: requestOptions, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.AgentAliasesSessionsClient.CreateInput.g.cs b/src/libs/Vectara/Generated/Vectara.AgentAliasesSessionsClient.CreateInput.g.cs new file mode 100644 index 00000000..9180277f --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.AgentAliasesSessionsClient.CreateInput.g.cs @@ -0,0 +1,623 @@ + +#nullable enable + +namespace Vectara +{ + public partial class AgentAliasesSessionsClient + { + + + private static readonly global::Vectara.EndPointSecurityRequirement s_CreateInputSecurityRequirement0 = + new global::Vectara.EndPointSecurityRequirement + { + Authorizations = new global::Vectara.EndPointAuthorizationRequirement[] + { new global::Vectara.EndPointAuthorizationRequirement + { + Type = "ApiKey", + SchemeId = "ApiKeyAuth", + Location = "Header", + Name = "x-api-key", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + + private static readonly global::Vectara.EndPointSecurityRequirement s_CreateInputSecurityRequirement1 = + new global::Vectara.EndPointSecurityRequirement + { + Authorizations = new global::Vectara.EndPointAuthorizationRequirement[] + { new global::Vectara.EndPointAuthorizationRequirement + { + Type = "OAuth2", + SchemeId = "OAuth2", + Location = "Header", + Name = "", + FriendlyName = "OAuth2", + }, + }, + }; + private static readonly global::Vectara.EndPointSecurityRequirement[] s_CreateInputSecurityRequirements = + new global::Vectara.EndPointSecurityRequirement[] + { s_CreateInputSecurityRequirement0, + s_CreateInputSecurityRequirement1, + }; + partial void PrepareCreateInputArguments( + global::System.Net.Http.HttpClient httpClient, + ref int? requestTimeout, + ref int? requestTimeoutMillis, + ref string aliasKey, + ref string sessionKey, + global::Vectara.CreateInputRequest request); + partial void PrepareCreateInputRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + int? requestTimeout, + int? requestTimeoutMillis, + string aliasKey, + string sessionKey, + global::Vectara.CreateInputRequest request); + partial void ProcessCreateInputResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCreateInputResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Submit input to alias-routed session
+ /// Submit an input event to a session originally created via this alias. The session's resolved agent runs the loop. + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// + /// A unique key that identifies an agent session.
+ /// Example: customer_support_chat + /// + /// + /// 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 CreateInputAsync( + string aliasKey, + string sessionKey, + + global::Vectara.CreateInputRequest request, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateInputAsResponseAsync( + aliasKey: aliasKey, + sessionKey: sessionKey, + + request: request, + requestTimeout: requestTimeout, + requestTimeoutMillis: requestTimeoutMillis, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Submit input to alias-routed session
+ /// Submit an input event to a session originally created via this alias. The session's resolved agent runs the loop. + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// + /// A unique key that identifies an agent session.
+ /// Example: customer_support_chat + /// + /// + /// 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> CreateInputAsResponseAsync( + string aliasKey, + string sessionKey, + + global::Vectara.CreateInputRequest request, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareCreateInputArguments( + httpClient: HttpClient, + requestTimeout: ref requestTimeout, + requestTimeoutMillis: ref requestTimeoutMillis, + aliasKey: ref aliasKey, + sessionKey: ref sessionKey, + request: request); + + + var __authorizations = global::Vectara.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_CreateInputSecurityRequirements, + operationName: "CreateInputAsync"); + + using var __timeoutCancellationTokenSource = global::Vectara.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Vectara.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Vectara.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Vectara.PathBuilder( + path: $"/v2/agent_aliases/{aliasKey}/sessions/{sessionKey}/events", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Vectara.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + if (requestTimeout != default) + { + __httpRequest.Headers.TryAddWithoutValidation("Request-Timeout", requestTimeout.ToString()); + } + if (requestTimeoutMillis != default) + { + __httpRequest.Headers.TryAddWithoutValidation("Request-Timeout-Millis", requestTimeoutMillis.ToString()); + } + + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + __httpRequest.Content = __httpRequestContent; + global::Vectara.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareCreateInputRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + requestTimeout: requestTimeout, + requestTimeoutMillis: requestTimeoutMillis, + aliasKey: aliasKey!, + sessionKey: sessionKey!, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Vectara.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateInput", + methodName: "CreateInputAsync", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}/sessions/{sessionKey}/events\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await global::Vectara.VectaraClient.AutoSDKOAuth2Helpers.SendAsync( + httpClient: HttpClient, + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + authorizations: __authorizations, + oAuth2Coordinator: AutoSDKOAuth2State, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateInput", + methodName: "CreateInputAsync", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}/sessions/{sessionKey}/events\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateInput", + methodName: "CreateInputAsync", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}/sessions/{sessionKey}/events\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessCreateInputResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateInput", + methodName: "CreateInputAsync", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}/sessions/{sessionKey}/events\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateInput", + methodName: "CreateInputAsync", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}/sessions/{sessionKey}/events\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Input request was malformed. + if ((int)__response.StatusCode == 400) + { + string? __content_400 = null; + global::System.Exception? __exception_400 = null; + global::Vectara.BadRequestError? __value_400 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_400 = global::Vectara.BadRequestError.FromJson(__content_400, JsonSerializerContext); + } + else + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_400 = global::Vectara.BadRequestError.FromJson(__content_400, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_400 = __ex; + } + + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_400, + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Permissions do not allow submitting input to this session. + if ((int)__response.StatusCode == 403) + { + string? __content_403 = null; + global::System.Exception? __exception_403 = null; + global::Vectara.Error? __value_403 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_403 = global::Vectara.Error.FromJson(__content_403, JsonSerializerContext); + } + else + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_403 = global::Vectara.Error.FromJson(__content_403, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_403 = __ex; + } + + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_403, + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Alias or session not found. + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::System.Exception? __exception_404 = null; + global::Vectara.NotFoundError? __value_404 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_404 = global::Vectara.NotFoundError.FromJson(__content_404, JsonSerializerContext); + } + else + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_404 = global::Vectara.NotFoundError.FromJson(__content_404, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_404 = __ex; + } + + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_404, + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessCreateInputResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Vectara.AgentResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Vectara.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::Vectara.AgentResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Vectara.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.AgentAliasesSessionsClient.CreateInputAsStream.g.cs b/src/libs/Vectara/Generated/Vectara.AgentAliasesSessionsClient.CreateInputAsStream.g.cs new file mode 100644 index 00000000..7fb24f04 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.AgentAliasesSessionsClient.CreateInputAsStream.g.cs @@ -0,0 +1,437 @@ + +#nullable enable + +namespace Vectara +{ + public partial class AgentAliasesSessionsClient + { + + + private static readonly global::Vectara.EndPointSecurityRequirement s_CreateInputAsStreamSecurityRequirement0 = + new global::Vectara.EndPointSecurityRequirement + { + Authorizations = new global::Vectara.EndPointAuthorizationRequirement[] + { new global::Vectara.EndPointAuthorizationRequirement + { + Type = "ApiKey", + SchemeId = "ApiKeyAuth", + Location = "Header", + Name = "x-api-key", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + + private static readonly global::Vectara.EndPointSecurityRequirement s_CreateInputAsStreamSecurityRequirement1 = + new global::Vectara.EndPointSecurityRequirement + { + Authorizations = new global::Vectara.EndPointAuthorizationRequirement[] + { new global::Vectara.EndPointAuthorizationRequirement + { + Type = "OAuth2", + SchemeId = "OAuth2", + Location = "Header", + Name = "", + FriendlyName = "OAuth2", + }, + }, + }; + private static readonly global::Vectara.EndPointSecurityRequirement[] s_CreateInputAsStreamSecurityRequirements = + new global::Vectara.EndPointSecurityRequirement[] + { s_CreateInputAsStreamSecurityRequirement0, + s_CreateInputAsStreamSecurityRequirement1, + }; + partial void PrepareCreateInputAsStreamArguments( + global::System.Net.Http.HttpClient httpClient, + ref int? requestTimeout, + ref int? requestTimeoutMillis, + ref string aliasKey, + ref string sessionKey, + global::Vectara.CreateInputRequest request); + partial void PrepareCreateInputAsStreamRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + int? requestTimeout, + int? requestTimeoutMillis, + string aliasKey, + string sessionKey, + global::Vectara.CreateInputRequest request); + partial void ProcessCreateInputAsStreamResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// Submit input to alias-routed session
+ /// Submit an input event to a session originally created via this alias. The session's resolved agent runs the loop. + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// + /// A unique key that identifies an agent session.
+ /// Example: customer_support_chat + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Collections.Generic.IAsyncEnumerable CreateInputAsStreamAsync( + string aliasKey, + string sessionKey, + + global::Vectara.CreateInputRequest request, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareCreateInputAsStreamArguments( + httpClient: HttpClient, + requestTimeout: ref requestTimeout, + requestTimeoutMillis: ref requestTimeoutMillis, + aliasKey: ref aliasKey, + sessionKey: ref sessionKey, + request: request); + + + var __authorizations = global::Vectara.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_CreateInputAsStreamSecurityRequirements, + operationName: "CreateInputAsStreamAsync"); + + using var __timeoutCancellationTokenSource = global::Vectara.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Vectara.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Vectara.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Vectara.PathBuilder( + path: $"/v2/agent_aliases/{aliasKey}/sessions/{sessionKey}/events", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Vectara.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + if (requestTimeout != default) + { + __httpRequest.Headers.TryAddWithoutValidation("Request-Timeout", requestTimeout.ToString()); + } + if (requestTimeoutMillis != default) + { + __httpRequest.Headers.TryAddWithoutValidation("Request-Timeout-Millis", requestTimeoutMillis.ToString()); + } + + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + __httpRequest.Content = __httpRequestContent; + global::Vectara.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareCreateInputAsStreamRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + requestTimeout: requestTimeout, + requestTimeoutMillis: requestTimeoutMillis, + aliasKey: aliasKey!, + sessionKey: sessionKey!, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Vectara.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateInputAsStream", + methodName: "CreateInputAsStreamAsync", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}/sessions/{sessionKey}/events\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await global::Vectara.VectaraClient.AutoSDKOAuth2Helpers.SendAsync( + httpClient: HttpClient, + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseHeadersRead, + authorizations: __authorizations, + oAuth2Coordinator: AutoSDKOAuth2State, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateInputAsStream", + methodName: "CreateInputAsStreamAsync", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}/sessions/{sessionKey}/events\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateInputAsStream", + methodName: "CreateInputAsStreamAsync", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}/sessions/{sessionKey}/events\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessCreateInputAsStreamResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateInputAsStream", + methodName: "CreateInputAsStreamAsync", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}/sessions/{sessionKey}/events\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateInputAsStream", + methodName: "CreateInputAsStreamAsync", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}/sessions/{sessionKey}/events\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + + using var __stream = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + await foreach (var __sseEvent in global::System.Net.ServerSentEvents.SseParser + .Create(__stream).EnumerateAsync(__effectiveCancellationToken)) + { + var __content = __sseEvent.Data; + if (__content == "[DONE]") + { + yield break; + } + + var __streamedResponse = global::Vectara.AgentStreamedResponse.FromJson(__content, JsonSerializerContext) ?? + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: $"Response deserialization failed for \"{__content}\" ", + innerException: null, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + + yield return __streamedResponse; + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.AgentAliasesSessionsClient.Delete2.g.cs b/src/libs/Vectara/Generated/Vectara.AgentAliasesSessionsClient.Delete2.g.cs new file mode 100644 index 00000000..c9d2e660 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.AgentAliasesSessionsClient.Delete2.g.cs @@ -0,0 +1,545 @@ + +#nullable enable + +namespace Vectara +{ + public partial class AgentAliasesSessionsClient + { + + + private static readonly global::Vectara.EndPointSecurityRequirement s_Delete2SecurityRequirement0 = + new global::Vectara.EndPointSecurityRequirement + { + Authorizations = new global::Vectara.EndPointAuthorizationRequirement[] + { new global::Vectara.EndPointAuthorizationRequirement + { + Type = "ApiKey", + SchemeId = "ApiKeyAuth", + Location = "Header", + Name = "x-api-key", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + + private static readonly global::Vectara.EndPointSecurityRequirement s_Delete2SecurityRequirement1 = + new global::Vectara.EndPointSecurityRequirement + { + Authorizations = new global::Vectara.EndPointAuthorizationRequirement[] + { new global::Vectara.EndPointAuthorizationRequirement + { + Type = "OAuth2", + SchemeId = "OAuth2", + Location = "Header", + Name = "", + FriendlyName = "OAuth2", + }, + }, + }; + private static readonly global::Vectara.EndPointSecurityRequirement[] s_Delete2SecurityRequirements = + new global::Vectara.EndPointSecurityRequirement[] + { s_Delete2SecurityRequirement0, + s_Delete2SecurityRequirement1, + }; + partial void PrepareDelete2Arguments( + global::System.Net.Http.HttpClient httpClient, + ref int? requestTimeout, + ref int? requestTimeoutMillis, + ref string aliasKey, + ref string sessionKey); + partial void PrepareDelete2Request( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + int? requestTimeout, + int? requestTimeoutMillis, + string aliasKey, + string sessionKey); + partial void ProcessDelete2Response( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// Delete alias-routed session
+ /// Delete a session originally created via this alias. + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// + /// A unique key that identifies an agent session.
+ /// Example: customer_support_chat + /// + /// 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 Delete2Async( + string aliasKey, + string sessionKey, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + await Delete2AsResponseAsync( + aliasKey: aliasKey, + sessionKey: sessionKey, + requestTimeout: requestTimeout, + requestTimeoutMillis: requestTimeoutMillis, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Delete alias-routed session
+ /// Delete a session originally created via this alias. + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// + /// A unique key that identifies an agent session.
+ /// Example: customer_support_chat + /// + /// 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 Delete2AsResponseAsync( + string aliasKey, + string sessionKey, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareDelete2Arguments( + httpClient: HttpClient, + requestTimeout: ref requestTimeout, + requestTimeoutMillis: ref requestTimeoutMillis, + aliasKey: ref aliasKey, + sessionKey: ref sessionKey); + + + var __authorizations = global::Vectara.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_Delete2SecurityRequirements, + operationName: "Delete2Async"); + + using var __timeoutCancellationTokenSource = global::Vectara.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Vectara.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Vectara.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Vectara.PathBuilder( + path: $"/v2/agent_aliases/{aliasKey}/sessions/{sessionKey}", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Vectara.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Delete, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + if (requestTimeout != default) + { + __httpRequest.Headers.TryAddWithoutValidation("Request-Timeout", requestTimeout.ToString()); + } + if (requestTimeoutMillis != default) + { + __httpRequest.Headers.TryAddWithoutValidation("Request-Timeout-Millis", requestTimeoutMillis.ToString()); + } + + global::Vectara.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareDelete2Request( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + requestTimeout: requestTimeout, + requestTimeoutMillis: requestTimeoutMillis, + aliasKey: aliasKey!, + sessionKey: sessionKey!); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Vectara.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Delete2", + methodName: "Delete2Async", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}/sessions/{sessionKey}\"", + httpMethod: "DELETE", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await global::Vectara.VectaraClient.AutoSDKOAuth2Helpers.SendAsync( + httpClient: HttpClient, + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + authorizations: __authorizations, + oAuth2Coordinator: AutoSDKOAuth2State, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Delete2", + methodName: "Delete2Async", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}/sessions/{sessionKey}\"", + httpMethod: "DELETE", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Delete2", + methodName: "Delete2Async", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}/sessions/{sessionKey}\"", + httpMethod: "DELETE", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessDelete2Response( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Delete2", + methodName: "Delete2Async", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}/sessions/{sessionKey}\"", + httpMethod: "DELETE", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Delete2", + methodName: "Delete2Async", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}/sessions/{sessionKey}\"", + httpMethod: "DELETE", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Permissions do not allow deleting this session. + if ((int)__response.StatusCode == 403) + { + string? __content_403 = null; + global::System.Exception? __exception_403 = null; + global::Vectara.Error? __value_403 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_403 = global::Vectara.Error.FromJson(__content_403, JsonSerializerContext); + } + else + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_403 = global::Vectara.Error.FromJson(__content_403, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_403 = __ex; + } + + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_403, + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Alias or session not found. + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::System.Exception? __exception_404 = null; + global::Vectara.NotFoundError? __value_404 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_404 = global::Vectara.NotFoundError.FromJson(__content_404, JsonSerializerContext); + } + else + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_404 = global::Vectara.NotFoundError.FromJson(__content_404, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_404 = __ex; + } + + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_404, + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return new global::Vectara.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); + } + catch (global::System.Exception __ex) + { + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + return new global::Vectara.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.AgentAliasesSessionsClient.DeleteEvent.g.cs b/src/libs/Vectara/Generated/Vectara.AgentAliasesSessionsClient.DeleteEvent.g.cs new file mode 100644 index 00000000..a2200162 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.AgentAliasesSessionsClient.DeleteEvent.g.cs @@ -0,0 +1,554 @@ + +#nullable enable + +namespace Vectara +{ + public partial class AgentAliasesSessionsClient + { + + + private static readonly global::Vectara.EndPointSecurityRequirement s_DeleteEventSecurityRequirement0 = + new global::Vectara.EndPointSecurityRequirement + { + Authorizations = new global::Vectara.EndPointAuthorizationRequirement[] + { new global::Vectara.EndPointAuthorizationRequirement + { + Type = "ApiKey", + SchemeId = "ApiKeyAuth", + Location = "Header", + Name = "x-api-key", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + + private static readonly global::Vectara.EndPointSecurityRequirement s_DeleteEventSecurityRequirement1 = + new global::Vectara.EndPointSecurityRequirement + { + Authorizations = new global::Vectara.EndPointAuthorizationRequirement[] + { new global::Vectara.EndPointAuthorizationRequirement + { + Type = "OAuth2", + SchemeId = "OAuth2", + Location = "Header", + Name = "", + FriendlyName = "OAuth2", + }, + }, + }; + private static readonly global::Vectara.EndPointSecurityRequirement[] s_DeleteEventSecurityRequirements = + new global::Vectara.EndPointSecurityRequirement[] + { s_DeleteEventSecurityRequirement0, + s_DeleteEventSecurityRequirement1, + }; + partial void PrepareDeleteEventArguments( + global::System.Net.Http.HttpClient httpClient, + ref int? requestTimeout, + ref int? requestTimeoutMillis, + ref string aliasKey, + ref string sessionKey, + ref string eventId); + partial void PrepareDeleteEventRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + int? requestTimeout, + int? requestTimeoutMillis, + string aliasKey, + string sessionKey, + string eventId); + partial void ProcessDeleteEventResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// Delete event on alias-routed session
+ /// Delete a single event of a session originally created via this alias. + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// + /// A unique key that identifies an agent session.
+ /// Example: customer_support_chat + /// + /// + /// 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 DeleteEventAsync( + string aliasKey, + string sessionKey, + string eventId, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + await DeleteEventAsResponseAsync( + aliasKey: aliasKey, + sessionKey: sessionKey, + eventId: eventId, + requestTimeout: requestTimeout, + requestTimeoutMillis: requestTimeoutMillis, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Delete event on alias-routed session
+ /// Delete a single event of a session originally created via this alias. + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// + /// A unique key that identifies an agent session.
+ /// Example: customer_support_chat + /// + /// + /// 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 DeleteEventAsResponseAsync( + string aliasKey, + string sessionKey, + string eventId, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareDeleteEventArguments( + httpClient: HttpClient, + requestTimeout: ref requestTimeout, + requestTimeoutMillis: ref requestTimeoutMillis, + aliasKey: ref aliasKey, + sessionKey: ref sessionKey, + eventId: ref eventId); + + + var __authorizations = global::Vectara.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_DeleteEventSecurityRequirements, + operationName: "DeleteEventAsync"); + + using var __timeoutCancellationTokenSource = global::Vectara.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Vectara.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Vectara.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Vectara.PathBuilder( + path: $"/v2/agent_aliases/{aliasKey}/sessions/{sessionKey}/events/{eventId}", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Vectara.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Delete, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + if (requestTimeout != default) + { + __httpRequest.Headers.TryAddWithoutValidation("Request-Timeout", requestTimeout.ToString()); + } + if (requestTimeoutMillis != default) + { + __httpRequest.Headers.TryAddWithoutValidation("Request-Timeout-Millis", requestTimeoutMillis.ToString()); + } + + global::Vectara.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareDeleteEventRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + requestTimeout: requestTimeout, + requestTimeoutMillis: requestTimeoutMillis, + aliasKey: aliasKey!, + sessionKey: sessionKey!, + eventId: eventId!); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Vectara.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "DeleteEvent", + methodName: "DeleteEventAsync", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}/sessions/{sessionKey}/events/{eventId}\"", + httpMethod: "DELETE", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await global::Vectara.VectaraClient.AutoSDKOAuth2Helpers.SendAsync( + httpClient: HttpClient, + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + authorizations: __authorizations, + oAuth2Coordinator: AutoSDKOAuth2State, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "DeleteEvent", + methodName: "DeleteEventAsync", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}/sessions/{sessionKey}/events/{eventId}\"", + httpMethod: "DELETE", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "DeleteEvent", + methodName: "DeleteEventAsync", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}/sessions/{sessionKey}/events/{eventId}\"", + httpMethod: "DELETE", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessDeleteEventResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "DeleteEvent", + methodName: "DeleteEventAsync", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}/sessions/{sessionKey}/events/{eventId}\"", + httpMethod: "DELETE", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "DeleteEvent", + methodName: "DeleteEventAsync", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}/sessions/{sessionKey}/events/{eventId}\"", + httpMethod: "DELETE", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Permissions do not allow deleting this event. + if ((int)__response.StatusCode == 403) + { + string? __content_403 = null; + global::System.Exception? __exception_403 = null; + global::Vectara.Error? __value_403 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_403 = global::Vectara.Error.FromJson(__content_403, JsonSerializerContext); + } + else + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_403 = global::Vectara.Error.FromJson(__content_403, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_403 = __ex; + } + + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_403, + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Alias, session, or event not found. + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::System.Exception? __exception_404 = null; + global::Vectara.NotFoundError? __value_404 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_404 = global::Vectara.NotFoundError.FromJson(__content_404, JsonSerializerContext); + } + else + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_404 = global::Vectara.NotFoundError.FromJson(__content_404, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_404 = __ex; + } + + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_404, + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return new global::Vectara.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); + } + catch (global::System.Exception __ex) + { + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + return new global::Vectara.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.AgentAliasesSessionsClient.Get2.g.cs b/src/libs/Vectara/Generated/Vectara.AgentAliasesSessionsClient.Get2.g.cs new file mode 100644 index 00000000..8b79992e --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.AgentAliasesSessionsClient.Get2.g.cs @@ -0,0 +1,568 @@ + +#nullable enable + +namespace Vectara +{ + public partial class AgentAliasesSessionsClient + { + + + private static readonly global::Vectara.EndPointSecurityRequirement s_Get2SecurityRequirement0 = + new global::Vectara.EndPointSecurityRequirement + { + Authorizations = new global::Vectara.EndPointAuthorizationRequirement[] + { new global::Vectara.EndPointAuthorizationRequirement + { + Type = "ApiKey", + SchemeId = "ApiKeyAuth", + Location = "Header", + Name = "x-api-key", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + + private static readonly global::Vectara.EndPointSecurityRequirement s_Get2SecurityRequirement1 = + new global::Vectara.EndPointSecurityRequirement + { + Authorizations = new global::Vectara.EndPointAuthorizationRequirement[] + { new global::Vectara.EndPointAuthorizationRequirement + { + Type = "OAuth2", + SchemeId = "OAuth2", + Location = "Header", + Name = "", + FriendlyName = "OAuth2", + }, + }, + }; + private static readonly global::Vectara.EndPointSecurityRequirement[] s_Get2SecurityRequirements = + new global::Vectara.EndPointSecurityRequirement[] + { s_Get2SecurityRequirement0, + s_Get2SecurityRequirement1, + }; + partial void PrepareGet2Arguments( + global::System.Net.Http.HttpClient httpClient, + ref int? requestTimeout, + ref int? requestTimeoutMillis, + ref string aliasKey, + ref string sessionKey); + partial void PrepareGet2Request( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + int? requestTimeout, + int? requestTimeoutMillis, + string aliasKey, + string sessionKey); + partial void ProcessGet2Response( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessGet2ResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Get alias-routed session
+ /// Retrieve a session originally created via this alias. + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// + /// A unique key that identifies an agent session.
+ /// Example: customer_support_chat + /// + /// 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 Get2Async( + string aliasKey, + string sessionKey, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await Get2AsResponseAsync( + aliasKey: aliasKey, + sessionKey: sessionKey, + requestTimeout: requestTimeout, + requestTimeoutMillis: requestTimeoutMillis, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get alias-routed session
+ /// Retrieve a session originally created via this alias. + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// + /// A unique key that identifies an agent session.
+ /// Example: customer_support_chat + /// + /// 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> Get2AsResponseAsync( + string aliasKey, + string sessionKey, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareGet2Arguments( + httpClient: HttpClient, + requestTimeout: ref requestTimeout, + requestTimeoutMillis: ref requestTimeoutMillis, + aliasKey: ref aliasKey, + sessionKey: ref sessionKey); + + + var __authorizations = global::Vectara.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_Get2SecurityRequirements, + operationName: "Get2Async"); + + using var __timeoutCancellationTokenSource = global::Vectara.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Vectara.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Vectara.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Vectara.PathBuilder( + path: $"/v2/agent_aliases/{aliasKey}/sessions/{sessionKey}", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Vectara.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + if (requestTimeout != default) + { + __httpRequest.Headers.TryAddWithoutValidation("Request-Timeout", requestTimeout.ToString()); + } + if (requestTimeoutMillis != default) + { + __httpRequest.Headers.TryAddWithoutValidation("Request-Timeout-Millis", requestTimeoutMillis.ToString()); + } + + global::Vectara.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareGet2Request( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + requestTimeout: requestTimeout, + requestTimeoutMillis: requestTimeoutMillis, + aliasKey: aliasKey!, + sessionKey: sessionKey!); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Vectara.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Get2", + methodName: "Get2Async", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}/sessions/{sessionKey}\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await global::Vectara.VectaraClient.AutoSDKOAuth2Helpers.SendAsync( + httpClient: HttpClient, + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + authorizations: __authorizations, + oAuth2Coordinator: AutoSDKOAuth2State, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Get2", + methodName: "Get2Async", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}/sessions/{sessionKey}\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Get2", + methodName: "Get2Async", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}/sessions/{sessionKey}\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessGet2Response( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Get2", + methodName: "Get2Async", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}/sessions/{sessionKey}\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Get2", + methodName: "Get2Async", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}/sessions/{sessionKey}\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Permissions do not allow accessing this session. + if ((int)__response.StatusCode == 403) + { + string? __content_403 = null; + global::System.Exception? __exception_403 = null; + global::Vectara.Error? __value_403 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_403 = global::Vectara.Error.FromJson(__content_403, JsonSerializerContext); + } + else + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_403 = global::Vectara.Error.FromJson(__content_403, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_403 = __ex; + } + + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_403, + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Alias or session not found. + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::System.Exception? __exception_404 = null; + global::Vectara.NotFoundError? __value_404 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_404 = global::Vectara.NotFoundError.FromJson(__content_404, JsonSerializerContext); + } + else + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_404 = global::Vectara.NotFoundError.FromJson(__content_404, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_404 = __ex; + } + + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_404, + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessGet2ResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Vectara.AgentSession.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Vectara.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::Vectara.AgentSession.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Vectara.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.AgentAliasesSessionsClient.GetEvent.g.cs b/src/libs/Vectara/Generated/Vectara.AgentAliasesSessionsClient.GetEvent.g.cs new file mode 100644 index 00000000..5c5a34a9 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.AgentAliasesSessionsClient.GetEvent.g.cs @@ -0,0 +1,577 @@ + +#nullable enable + +namespace Vectara +{ + public partial class AgentAliasesSessionsClient + { + + + private static readonly global::Vectara.EndPointSecurityRequirement s_GetEventSecurityRequirement0 = + new global::Vectara.EndPointSecurityRequirement + { + Authorizations = new global::Vectara.EndPointAuthorizationRequirement[] + { new global::Vectara.EndPointAuthorizationRequirement + { + Type = "ApiKey", + SchemeId = "ApiKeyAuth", + Location = "Header", + Name = "x-api-key", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + + private static readonly global::Vectara.EndPointSecurityRequirement s_GetEventSecurityRequirement1 = + new global::Vectara.EndPointSecurityRequirement + { + Authorizations = new global::Vectara.EndPointAuthorizationRequirement[] + { new global::Vectara.EndPointAuthorizationRequirement + { + Type = "OAuth2", + SchemeId = "OAuth2", + Location = "Header", + Name = "", + FriendlyName = "OAuth2", + }, + }, + }; + private static readonly global::Vectara.EndPointSecurityRequirement[] s_GetEventSecurityRequirements = + new global::Vectara.EndPointSecurityRequirement[] + { s_GetEventSecurityRequirement0, + s_GetEventSecurityRequirement1, + }; + partial void PrepareGetEventArguments( + global::System.Net.Http.HttpClient httpClient, + ref int? requestTimeout, + ref int? requestTimeoutMillis, + ref string aliasKey, + ref string sessionKey, + ref string eventId); + partial void PrepareGetEventRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + int? requestTimeout, + int? requestTimeoutMillis, + string aliasKey, + string sessionKey, + string eventId); + partial void ProcessGetEventResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessGetEventResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Get event on alias-routed session
+ /// Get a single event of a session originally created via this alias. + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// + /// A unique key that identifies an agent session.
+ /// Example: customer_support_chat + /// + /// + /// 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 GetEventAsync( + string aliasKey, + string sessionKey, + string eventId, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetEventAsResponseAsync( + aliasKey: aliasKey, + sessionKey: sessionKey, + eventId: eventId, + requestTimeout: requestTimeout, + requestTimeoutMillis: requestTimeoutMillis, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get event on alias-routed session
+ /// Get a single event of a session originally created via this alias. + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// + /// A unique key that identifies an agent session.
+ /// Example: customer_support_chat + /// + /// + /// 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> GetEventAsResponseAsync( + string aliasKey, + string sessionKey, + string eventId, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareGetEventArguments( + httpClient: HttpClient, + requestTimeout: ref requestTimeout, + requestTimeoutMillis: ref requestTimeoutMillis, + aliasKey: ref aliasKey, + sessionKey: ref sessionKey, + eventId: ref eventId); + + + var __authorizations = global::Vectara.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_GetEventSecurityRequirements, + operationName: "GetEventAsync"); + + using var __timeoutCancellationTokenSource = global::Vectara.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Vectara.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Vectara.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Vectara.PathBuilder( + path: $"/v2/agent_aliases/{aliasKey}/sessions/{sessionKey}/events/{eventId}", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Vectara.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + if (requestTimeout != default) + { + __httpRequest.Headers.TryAddWithoutValidation("Request-Timeout", requestTimeout.ToString()); + } + if (requestTimeoutMillis != default) + { + __httpRequest.Headers.TryAddWithoutValidation("Request-Timeout-Millis", requestTimeoutMillis.ToString()); + } + + global::Vectara.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareGetEventRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + requestTimeout: requestTimeout, + requestTimeoutMillis: requestTimeoutMillis, + aliasKey: aliasKey!, + sessionKey: sessionKey!, + eventId: eventId!); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Vectara.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "GetEvent", + methodName: "GetEventAsync", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}/sessions/{sessionKey}/events/{eventId}\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await global::Vectara.VectaraClient.AutoSDKOAuth2Helpers.SendAsync( + httpClient: HttpClient, + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + authorizations: __authorizations, + oAuth2Coordinator: AutoSDKOAuth2State, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "GetEvent", + methodName: "GetEventAsync", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}/sessions/{sessionKey}/events/{eventId}\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "GetEvent", + methodName: "GetEventAsync", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}/sessions/{sessionKey}/events/{eventId}\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessGetEventResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "GetEvent", + methodName: "GetEventAsync", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}/sessions/{sessionKey}/events/{eventId}\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "GetEvent", + methodName: "GetEventAsync", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}/sessions/{sessionKey}/events/{eventId}\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Permissions do not allow accessing this event. + if ((int)__response.StatusCode == 403) + { + string? __content_403 = null; + global::System.Exception? __exception_403 = null; + global::Vectara.Error? __value_403 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_403 = global::Vectara.Error.FromJson(__content_403, JsonSerializerContext); + } + else + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_403 = global::Vectara.Error.FromJson(__content_403, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_403 = __ex; + } + + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_403, + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Alias, session, or event not found. + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::System.Exception? __exception_404 = null; + global::Vectara.NotFoundError? __value_404 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_404 = global::Vectara.NotFoundError.FromJson(__content_404, JsonSerializerContext); + } + else + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_404 = global::Vectara.NotFoundError.FromJson(__content_404, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_404 = __ex; + } + + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_404, + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessGetEventResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Vectara.AgentEvent.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Vectara.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::Vectara.AgentEvent.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Vectara.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.AgentAliasesSessionsClient.List2.g.cs b/src/libs/Vectara/Generated/Vectara.AgentAliasesSessionsClient.List2.g.cs new file mode 100644 index 00000000..a13cefe9 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.AgentAliasesSessionsClient.List2.g.cs @@ -0,0 +1,589 @@ + +#nullable enable + +namespace Vectara +{ + public partial class AgentAliasesSessionsClient + { + + + private static readonly global::Vectara.EndPointSecurityRequirement s_List2SecurityRequirement0 = + new global::Vectara.EndPointSecurityRequirement + { + Authorizations = new global::Vectara.EndPointAuthorizationRequirement[] + { new global::Vectara.EndPointAuthorizationRequirement + { + Type = "ApiKey", + SchemeId = "ApiKeyAuth", + Location = "Header", + Name = "x-api-key", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + + private static readonly global::Vectara.EndPointSecurityRequirement s_List2SecurityRequirement1 = + new global::Vectara.EndPointSecurityRequirement + { + Authorizations = new global::Vectara.EndPointAuthorizationRequirement[] + { new global::Vectara.EndPointAuthorizationRequirement + { + Type = "OAuth2", + SchemeId = "OAuth2", + Location = "Header", + Name = "", + FriendlyName = "OAuth2", + }, + }, + }; + private static readonly global::Vectara.EndPointSecurityRequirement[] s_List2SecurityRequirements = + new global::Vectara.EndPointSecurityRequirement[] + { s_List2SecurityRequirement0, + s_List2SecurityRequirement1, + }; + partial void PrepareList2Arguments( + global::System.Net.Http.HttpClient httpClient, + ref int? requestTimeout, + ref int? requestTimeoutMillis, + ref string aliasKey, + ref string? filter, + ref int? limit, + ref string? pageKey); + partial void PrepareList2Request( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + int? requestTimeout, + int? requestTimeoutMillis, + string aliasKey, + string? filter, + int? limit, + string? pageKey); + partial void ProcessList2Response( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessList2ResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// List sessions routed via this alias
+ /// List sessions that were originally created via this alias (sessions whose `alias_key` matches). Sessions are also reachable under their resolved agent's URL; this endpoint is the alias-scoped view. + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// + /// + /// Default Value: 10 + /// + /// + /// 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 List2Async( + string aliasKey, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + string? filter = default, + int? limit = default, + string? pageKey = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await List2AsResponseAsync( + aliasKey: aliasKey, + requestTimeout: requestTimeout, + requestTimeoutMillis: requestTimeoutMillis, + filter: filter, + limit: limit, + pageKey: pageKey, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List sessions routed via this alias
+ /// List sessions that were originally created via this alias (sessions whose `alias_key` matches). Sessions are also reachable under their resolved agent's URL; this endpoint is the alias-scoped view. + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// + /// + /// Default Value: 10 + /// + /// + /// 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> List2AsResponseAsync( + string aliasKey, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + string? filter = default, + int? limit = default, + string? pageKey = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareList2Arguments( + httpClient: HttpClient, + requestTimeout: ref requestTimeout, + requestTimeoutMillis: ref requestTimeoutMillis, + aliasKey: ref aliasKey, + filter: ref filter, + limit: ref limit, + pageKey: ref pageKey); + + + var __authorizations = global::Vectara.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_List2SecurityRequirements, + operationName: "List2Async"); + + using var __timeoutCancellationTokenSource = global::Vectara.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Vectara.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Vectara.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Vectara.PathBuilder( + path: $"/v2/agent_aliases/{aliasKey}/sessions", + baseUri: HttpClient.BaseAddress); + __pathBuilder + .AddOptionalParameter("filter", filter) + .AddOptionalParameter("limit", limit?.ToString()) + .AddOptionalParameter("page_key", pageKey) + ; + var __path = __pathBuilder.ToString(); + __path = global::Vectara.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + if (requestTimeout != default) + { + __httpRequest.Headers.TryAddWithoutValidation("Request-Timeout", requestTimeout.ToString()); + } + if (requestTimeoutMillis != default) + { + __httpRequest.Headers.TryAddWithoutValidation("Request-Timeout-Millis", requestTimeoutMillis.ToString()); + } + + global::Vectara.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareList2Request( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + requestTimeout: requestTimeout, + requestTimeoutMillis: requestTimeoutMillis, + aliasKey: aliasKey!, + filter: filter, + limit: limit, + pageKey: pageKey); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Vectara.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "List2", + methodName: "List2Async", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}/sessions\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await global::Vectara.VectaraClient.AutoSDKOAuth2Helpers.SendAsync( + httpClient: HttpClient, + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + authorizations: __authorizations, + oAuth2Coordinator: AutoSDKOAuth2State, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "List2", + methodName: "List2Async", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}/sessions\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "List2", + methodName: "List2Async", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}/sessions\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessList2Response( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "List2", + methodName: "List2Async", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}/sessions\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "List2", + methodName: "List2Async", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}/sessions\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Permissions do not allow listing alias-routed sessions. + if ((int)__response.StatusCode == 403) + { + string? __content_403 = null; + global::System.Exception? __exception_403 = null; + global::Vectara.Error? __value_403 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_403 = global::Vectara.Error.FromJson(__content_403, JsonSerializerContext); + } + else + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_403 = global::Vectara.Error.FromJson(__content_403, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_403 = __ex; + } + + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_403, + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Alias not found. + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::System.Exception? __exception_404 = null; + global::Vectara.NotFoundError? __value_404 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_404 = global::Vectara.NotFoundError.FromJson(__content_404, JsonSerializerContext); + } + else + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_404 = global::Vectara.NotFoundError.FromJson(__content_404, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_404 = __ex; + } + + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_404, + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessList2ResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Vectara.ListAgentSessionsResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Vectara.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::Vectara.ListAgentSessionsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Vectara.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.AgentAliasesSessionsClient.ListEvents.g.cs b/src/libs/Vectara/Generated/Vectara.AgentAliasesSessionsClient.ListEvents.g.cs new file mode 100644 index 00000000..85814b36 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.AgentAliasesSessionsClient.ListEvents.g.cs @@ -0,0 +1,594 @@ + +#nullable enable + +namespace Vectara +{ + public partial class AgentAliasesSessionsClient + { + + + private static readonly global::Vectara.EndPointSecurityRequirement s_ListEventsSecurityRequirement0 = + new global::Vectara.EndPointSecurityRequirement + { + Authorizations = new global::Vectara.EndPointAuthorizationRequirement[] + { new global::Vectara.EndPointAuthorizationRequirement + { + Type = "ApiKey", + SchemeId = "ApiKeyAuth", + Location = "Header", + Name = "x-api-key", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + + private static readonly global::Vectara.EndPointSecurityRequirement s_ListEventsSecurityRequirement1 = + new global::Vectara.EndPointSecurityRequirement + { + Authorizations = new global::Vectara.EndPointAuthorizationRequirement[] + { new global::Vectara.EndPointAuthorizationRequirement + { + Type = "OAuth2", + SchemeId = "OAuth2", + Location = "Header", + Name = "", + FriendlyName = "OAuth2", + }, + }, + }; + private static readonly global::Vectara.EndPointSecurityRequirement[] s_ListEventsSecurityRequirements = + new global::Vectara.EndPointSecurityRequirement[] + { s_ListEventsSecurityRequirement0, + s_ListEventsSecurityRequirement1, + }; + partial void PrepareListEventsArguments( + global::System.Net.Http.HttpClient httpClient, + ref int? requestTimeout, + ref int? requestTimeoutMillis, + ref string aliasKey, + ref string sessionKey, + ref int? limit, + ref string? pageKey); + partial void PrepareListEventsRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + int? requestTimeout, + int? requestTimeoutMillis, + string aliasKey, + string sessionKey, + int? limit, + string? pageKey); + partial void ProcessListEventsResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessListEventsResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// List events on alias-routed session
+ /// List events of a session originally created via this alias. + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// + /// A unique key that identifies an agent session.
+ /// Example: customer_support_chat + /// + /// + /// Default Value: 10 + /// + /// + /// 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 ListEventsAsync( + string aliasKey, + string sessionKey, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + int? limit = default, + string? pageKey = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ListEventsAsResponseAsync( + aliasKey: aliasKey, + sessionKey: sessionKey, + requestTimeout: requestTimeout, + requestTimeoutMillis: requestTimeoutMillis, + limit: limit, + pageKey: pageKey, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List events on alias-routed session
+ /// List events of a session originally created via this alias. + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// + /// A unique key that identifies an agent session.
+ /// Example: customer_support_chat + /// + /// + /// Default Value: 10 + /// + /// + /// 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> ListEventsAsResponseAsync( + string aliasKey, + string sessionKey, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + int? limit = default, + string? pageKey = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareListEventsArguments( + httpClient: HttpClient, + requestTimeout: ref requestTimeout, + requestTimeoutMillis: ref requestTimeoutMillis, + aliasKey: ref aliasKey, + sessionKey: ref sessionKey, + limit: ref limit, + pageKey: ref pageKey); + + + var __authorizations = global::Vectara.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_ListEventsSecurityRequirements, + operationName: "ListEventsAsync"); + + using var __timeoutCancellationTokenSource = global::Vectara.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Vectara.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Vectara.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Vectara.PathBuilder( + path: $"/v2/agent_aliases/{aliasKey}/sessions/{sessionKey}/events", + baseUri: HttpClient.BaseAddress); + __pathBuilder + .AddOptionalParameter("limit", limit?.ToString()) + .AddOptionalParameter("page_key", pageKey) + ; + var __path = __pathBuilder.ToString(); + __path = global::Vectara.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + if (requestTimeout != default) + { + __httpRequest.Headers.TryAddWithoutValidation("Request-Timeout", requestTimeout.ToString()); + } + if (requestTimeoutMillis != default) + { + __httpRequest.Headers.TryAddWithoutValidation("Request-Timeout-Millis", requestTimeoutMillis.ToString()); + } + + global::Vectara.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareListEventsRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + requestTimeout: requestTimeout, + requestTimeoutMillis: requestTimeoutMillis, + aliasKey: aliasKey!, + sessionKey: sessionKey!, + limit: limit, + pageKey: pageKey); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Vectara.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListEvents", + methodName: "ListEventsAsync", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}/sessions/{sessionKey}/events\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await global::Vectara.VectaraClient.AutoSDKOAuth2Helpers.SendAsync( + httpClient: HttpClient, + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + authorizations: __authorizations, + oAuth2Coordinator: AutoSDKOAuth2State, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListEvents", + methodName: "ListEventsAsync", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}/sessions/{sessionKey}/events\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListEvents", + methodName: "ListEventsAsync", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}/sessions/{sessionKey}/events\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessListEventsResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListEvents", + methodName: "ListEventsAsync", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}/sessions/{sessionKey}/events\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListEvents", + methodName: "ListEventsAsync", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}/sessions/{sessionKey}/events\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Permissions do not allow listing events on this session. + if ((int)__response.StatusCode == 403) + { + string? __content_403 = null; + global::System.Exception? __exception_403 = null; + global::Vectara.Error? __value_403 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_403 = global::Vectara.Error.FromJson(__content_403, JsonSerializerContext); + } + else + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_403 = global::Vectara.Error.FromJson(__content_403, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_403 = __ex; + } + + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_403, + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Alias or session not found. + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::System.Exception? __exception_404 = null; + global::Vectara.NotFoundError? __value_404 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_404 = global::Vectara.NotFoundError.FromJson(__content_404, JsonSerializerContext); + } + else + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_404 = global::Vectara.NotFoundError.FromJson(__content_404, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_404 = __ex; + } + + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_404, + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessListEventsResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Vectara.ListAgentEventsResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Vectara.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::Vectara.ListAgentEventsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Vectara.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.AgentAliasesSessionsClient.Update2.g.cs b/src/libs/Vectara/Generated/Vectara.AgentAliasesSessionsClient.Update2.g.cs new file mode 100644 index 00000000..2c3f6200 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.AgentAliasesSessionsClient.Update2.g.cs @@ -0,0 +1,700 @@ + +#nullable enable + +namespace Vectara +{ + public partial class AgentAliasesSessionsClient + { + + + private static readonly global::Vectara.EndPointSecurityRequirement s_Update2SecurityRequirement0 = + new global::Vectara.EndPointSecurityRequirement + { + Authorizations = new global::Vectara.EndPointAuthorizationRequirement[] + { new global::Vectara.EndPointAuthorizationRequirement + { + Type = "ApiKey", + SchemeId = "ApiKeyAuth", + Location = "Header", + Name = "x-api-key", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + + private static readonly global::Vectara.EndPointSecurityRequirement s_Update2SecurityRequirement1 = + new global::Vectara.EndPointSecurityRequirement + { + Authorizations = new global::Vectara.EndPointAuthorizationRequirement[] + { new global::Vectara.EndPointAuthorizationRequirement + { + Type = "OAuth2", + SchemeId = "OAuth2", + Location = "Header", + Name = "", + FriendlyName = "OAuth2", + }, + }, + }; + private static readonly global::Vectara.EndPointSecurityRequirement[] s_Update2SecurityRequirements = + new global::Vectara.EndPointSecurityRequirement[] + { s_Update2SecurityRequirement0, + s_Update2SecurityRequirement1, + }; + partial void PrepareUpdate2Arguments( + global::System.Net.Http.HttpClient httpClient, + ref int? requestTimeout, + ref int? requestTimeoutMillis, + ref string aliasKey, + ref string sessionKey, + global::Vectara.UpdateAgentSessionRequest request); + partial void PrepareUpdate2Request( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + int? requestTimeout, + int? requestTimeoutMillis, + string aliasKey, + string sessionKey, + global::Vectara.UpdateAgentSessionRequest request); + partial void ProcessUpdate2Response( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessUpdate2ResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Update alias-routed session
+ /// Update a session originally created via this alias. + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// + /// A unique key that identifies an agent session.
+ /// Example: customer_support_chat + /// + /// + /// 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 Update2Async( + string aliasKey, + string sessionKey, + + global::Vectara.UpdateAgentSessionRequest request, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await Update2AsResponseAsync( + aliasKey: aliasKey, + sessionKey: sessionKey, + + request: request, + requestTimeout: requestTimeout, + requestTimeoutMillis: requestTimeoutMillis, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Update alias-routed session
+ /// Update a session originally created via this alias. + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// + /// A unique key that identifies an agent session.
+ /// Example: customer_support_chat + /// + /// + /// 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> Update2AsResponseAsync( + string aliasKey, + string sessionKey, + + global::Vectara.UpdateAgentSessionRequest request, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareUpdate2Arguments( + httpClient: HttpClient, + requestTimeout: ref requestTimeout, + requestTimeoutMillis: ref requestTimeoutMillis, + aliasKey: ref aliasKey, + sessionKey: ref sessionKey, + request: request); + + + var __authorizations = global::Vectara.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_Update2SecurityRequirements, + operationName: "Update2Async"); + + using var __timeoutCancellationTokenSource = global::Vectara.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Vectara.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Vectara.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Vectara.PathBuilder( + path: $"/v2/agent_aliases/{aliasKey}/sessions/{sessionKey}", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Vectara.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: new global::System.Net.Http.HttpMethod("PATCH"), + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + if (requestTimeout != default) + { + __httpRequest.Headers.TryAddWithoutValidation("Request-Timeout", requestTimeout.ToString()); + } + if (requestTimeoutMillis != default) + { + __httpRequest.Headers.TryAddWithoutValidation("Request-Timeout-Millis", requestTimeoutMillis.ToString()); + } + + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + __httpRequest.Content = __httpRequestContent; + global::Vectara.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareUpdate2Request( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + requestTimeout: requestTimeout, + requestTimeoutMillis: requestTimeoutMillis, + aliasKey: aliasKey!, + sessionKey: sessionKey!, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Vectara.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Update2", + methodName: "Update2Async", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}/sessions/{sessionKey}\"", + httpMethod: "PATCH", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await global::Vectara.VectaraClient.AutoSDKOAuth2Helpers.SendAsync( + httpClient: HttpClient, + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + authorizations: __authorizations, + oAuth2Coordinator: AutoSDKOAuth2State, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Update2", + methodName: "Update2Async", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}/sessions/{sessionKey}\"", + httpMethod: "PATCH", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Update2", + methodName: "Update2Async", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}/sessions/{sessionKey}\"", + httpMethod: "PATCH", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessUpdate2Response( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Update2", + methodName: "Update2Async", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}/sessions/{sessionKey}\"", + httpMethod: "PATCH", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Update2", + methodName: "Update2Async", + pathTemplate: "$\"/v2/agent_aliases/{aliasKey}/sessions/{sessionKey}\"", + httpMethod: "PATCH", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Update request was malformed. + if ((int)__response.StatusCode == 400) + { + string? __content_400 = null; + global::System.Exception? __exception_400 = null; + global::Vectara.BadRequestError? __value_400 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_400 = global::Vectara.BadRequestError.FromJson(__content_400, JsonSerializerContext); + } + else + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_400 = global::Vectara.BadRequestError.FromJson(__content_400, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_400 = __ex; + } + + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_400, + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Permissions do not allow updating this session. + if ((int)__response.StatusCode == 403) + { + string? __content_403 = null; + global::System.Exception? __exception_403 = null; + global::Vectara.Error? __value_403 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_403 = global::Vectara.Error.FromJson(__content_403, JsonSerializerContext); + } + else + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_403 = global::Vectara.Error.FromJson(__content_403, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_403 = __ex; + } + + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_403, + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Alias or session not found. + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::System.Exception? __exception_404 = null; + global::Vectara.NotFoundError? __value_404 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_404 = global::Vectara.NotFoundError.FromJson(__content_404, JsonSerializerContext); + } + else + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_404 = global::Vectara.NotFoundError.FromJson(__content_404, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_404 = __ex; + } + + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_404, + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessUpdate2ResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Vectara.AgentSession.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Vectara.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::Vectara.AgentSession.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Vectara.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw global::Vectara.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + /// + /// Update alias-routed session
+ /// Update a session originally created via this alias. + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// + /// A unique key that identifies an agent session.
+ /// Example: customer_support_chat + /// + /// + /// Human-readable name for the session.
+ /// Example: Updated Session Name + /// + /// + /// Optional description of the session purpose or context.
+ /// Example: Updated session description + /// + /// + /// Arbitrary metadata associated with the session.
+ /// Example: {"customer_id":"12345","priority":"high","status":"escalated"} + /// + /// + /// Whether the session is enabled.
+ /// Example: false + /// + /// + /// Time-to-idle in minutes for the session. If no events occur in the session for this duration, the session will be automatically deleted. If set to 0, the session will not expire.
+ /// Example: 60 + /// + /// + /// Patch the session's secrets. Names present in the map are added or replaced; names absent from the map are left unchanged.
+ /// A name mapped to `null` is removed. Values are encrypted at rest with the owning agent's encryption key and returned masked on reads.
+ /// Example: {"slack_user_token":"xoxp-rotated-token","old_token_to_remove":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464"} + /// + /// 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 Update2Async( + string aliasKey, + string sessionKey, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + string? name = default, + string? description = default, + object? metadata = default, + bool? enabled = default, + long? ttiMinutes = default, + global::System.Collections.Generic.Dictionary? secrets = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::Vectara.UpdateAgentSessionRequest + { + Name = name, + Description = description, + Metadata = metadata, + Enabled = enabled, + TtiMinutes = ttiMinutes, + Secrets = secrets, + }; + + return await Update2Async( + requestTimeout: requestTimeout, + requestTimeoutMillis: requestTimeoutMillis, + aliasKey: aliasKey, + sessionKey: sessionKey, + request: __request, + requestOptions: requestOptions, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.AgentAliasesSessionsClient.g.cs b/src/libs/Vectara/Generated/Vectara.AgentAliasesSessionsClient.g.cs new file mode 100644 index 00000000..30a7ad4e --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.AgentAliasesSessionsClient.g.cs @@ -0,0 +1,139 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public sealed partial class AgentAliasesSessionsClient : global::Vectara.IAgentAliasesSessionsClient, global::System.IDisposable + { + /// + /// + /// + public const string DefaultBaseUrl = "https://api.vectara.io/"; + + private bool _disposeHttpClient = true; + + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + public System.Uri? BaseUri => HttpClient.BaseAddress; + + /// + public global::System.Collections.Generic.List Authorizations { get; } + + /// + public bool ReadResponseAsString { get; set; } +#if DEBUG + = true; +#endif + + /// + public global::Vectara.AutoSDKClientOptions Options { get; } + + + internal global::Vectara.VectaraClient.AutoSDKOAuth2Coordinator AutoSDKOAuth2State { get; set; } = new global::Vectara.VectaraClient.AutoSDKOAuth2Coordinator(); + /// + /// + /// + public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::Vectara.SourceGenerationContext.Default; + + + /// + /// Creates a new instance of the AgentAliasesSessionsClient. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used. + /// The authorizations to use for the requests. + /// Dispose the HttpClient when the instance is disposed. True by default. + public AgentAliasesSessionsClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::System.Collections.Generic.List? authorizations = null, + bool disposeHttpClient = true) : this( + httpClient, + baseUri, + authorizations, + options: null, + disposeHttpClient: disposeHttpClient) + { + } + + /// + /// Creates a new instance of the AgentAliasesSessionsClient with explicit options but no base URL override. + /// Skips passing baseUri so the default base URL from the OpenAPI spec applies. + /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The authorizations to use for the requests. + /// Client-wide request defaults such as headers, query parameters, retries, and timeout. + /// Dispose the HttpClient when the instance is disposed. True by default. + public AgentAliasesSessionsClient( + global::System.Net.Http.HttpClient? httpClient, + global::System.Collections.Generic.List? authorizations, + global::Vectara.AutoSDKClientOptions? options, + bool disposeHttpClient = true) : this( + httpClient, + baseUri: null, + authorizations, + options, + disposeHttpClient: disposeHttpClient) + { + } + + /// + /// Creates a new instance of the AgentAliasesSessionsClient. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used. + /// The authorizations to use for the requests. + /// Client-wide request defaults such as headers, query parameters, retries, and timeout. + /// Dispose the HttpClient when the instance is disposed. True by default. + public AgentAliasesSessionsClient( + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Vectara.AutoSDKClientOptions? options, + bool disposeHttpClient = true) + { + + HttpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + HttpClient.BaseAddress ??= baseUri ?? new global::System.Uri(DefaultBaseUrl); + Authorizations = authorizations ?? new global::System.Collections.Generic.List(); + Options = options ?? new global::Vectara.AutoSDKClientOptions(); + _disposeHttpClient = disposeHttpClient; + + Initialized(HttpClient); + } + + /// + public void Dispose() + { + if (_disposeHttpClient) + { + HttpClient.Dispose(); + } + } + + partial void Initialized( + global::System.Net.Http.HttpClient client); + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.AgentSessionsClient.Create.g.cs b/src/libs/Vectara/Generated/Vectara.AgentSessionsClient.Create.g.cs index 5667c5d7..5432ce5a 100644 --- a/src/libs/Vectara/Generated/Vectara.AgentSessionsClient.Create.g.cs +++ b/src/libs/Vectara/Generated/Vectara.AgentSessionsClient.Create.g.cs @@ -694,6 +694,12 @@ partial void ProcessCreateResponseContent( /// Default Value: 0
/// Example: 60 /// + /// + /// Session-scoped secrets to store on the new session. Map of secret name to plaintext value.
+ /// Encrypted at rest with the owning agent's encryption key. Referenced from tool `argument_override` via
+ /// `{"$ref": "session.secrets.<name>"}`. Returned masked (`****`) on reads.
+ /// Example: {"slack_user_token":"xoxp-your-token-here"} + /// /// /// Create a new session by forking an existing one. By default, copies all visible events
/// and artifacts from the source session without compaction. Optionally specify exactly one of
@@ -713,6 +719,7 @@ partial void ProcessCreateResponseContent( object? metadata = default, bool? enabled = default, long? ttiMinutes = default, + global::System.Collections.Generic.Dictionary? secrets = default, global::Vectara.CreateAgentSessionRequestFromSession? fromSession = default, global::Vectara.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -725,6 +732,7 @@ partial void ProcessCreateResponseContent( Metadata = metadata, Enabled = enabled, TtiMinutes = ttiMinutes, + Secrets = secrets, FromSession = fromSession, }; diff --git a/src/libs/Vectara/Generated/Vectara.AgentSessionsClient.Update.g.cs b/src/libs/Vectara/Generated/Vectara.AgentSessionsClient.Update.g.cs index 14691676..13d6a853 100644 --- a/src/libs/Vectara/Generated/Vectara.AgentSessionsClient.Update.g.cs +++ b/src/libs/Vectara/Generated/Vectara.AgentSessionsClient.Update.g.cs @@ -658,6 +658,11 @@ partial void ProcessUpdateResponseContent( /// Time-to-idle in minutes for the session. If no events occur in the session for this duration, the session will be automatically deleted. If set to 0, the session will not expire.
/// Example: 60 /// + /// + /// Patch the session's secrets. Names present in the map are added or replaced; names absent from the map are left unchanged.
+ /// A name mapped to `null` is removed. Values are encrypted at rest with the owning agent's encryption key and returned masked on reads.
+ /// Example: {"slack_user_token":"xoxp-rotated-token","old_token_to_remove":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464"} + /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// @@ -671,6 +676,7 @@ partial void ProcessUpdateResponseContent( object? metadata = default, bool? enabled = default, long? ttiMinutes = default, + global::System.Collections.Generic.Dictionary? secrets = default, global::Vectara.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) { @@ -681,6 +687,7 @@ partial void ProcessUpdateResponseContent( Metadata = metadata, Enabled = enabled, TtiMinutes = ttiMinutes, + Secrets = secrets, }; return await UpdateAsync( diff --git a/src/libs/Vectara/Generated/Vectara.IAgentAliasesArtifactsClient.Get3.g.cs b/src/libs/Vectara/Generated/Vectara.IAgentAliasesArtifactsClient.Get3.g.cs new file mode 100644 index 00000000..5fd0f37a --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.IAgentAliasesArtifactsClient.Get3.g.cs @@ -0,0 +1,64 @@ +#nullable enable + +namespace Vectara +{ + public partial interface IAgentAliasesArtifactsClient + { + /// + /// Get artifact on alias-routed session
+ /// Retrieve an artifact stored in a session originally created via this alias, including metadata and base64-encoded file content. + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// + /// A unique key that identifies an agent session.
+ /// Example: customer_support_chat + /// + /// + /// Example: art_report_pdf_a3f2 + /// + /// 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 Get3Async( + string aliasKey, + string sessionKey, + string artifactId, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get artifact on alias-routed session
+ /// Retrieve an artifact stored in a session originally created via this alias, including metadata and base64-encoded file content. + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// + /// A unique key that identifies an agent session.
+ /// Example: customer_support_chat + /// + /// + /// Example: art_report_pdf_a3f2 + /// + /// 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> Get3AsResponseAsync( + string aliasKey, + string sessionKey, + string artifactId, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.IAgentAliasesArtifactsClient.List3.g.cs b/src/libs/Vectara/Generated/Vectara.IAgentAliasesArtifactsClient.List3.g.cs new file mode 100644 index 00000000..1fb29ae9 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.IAgentAliasesArtifactsClient.List3.g.cs @@ -0,0 +1,84 @@ +#nullable enable + +namespace Vectara +{ + public partial interface IAgentAliasesArtifactsClient + { + /// + /// List artifacts on alias-routed session
+ /// List artifacts stored in a session originally created via this alias. Artifacts are files either uploaded by the user, or generated within the session. + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// + /// A unique key that identifies an agent session.
+ /// Example: customer_support_chat + /// + /// + /// Default Value: 10 + /// + /// + /// + /// Default Value: created_at + /// + /// + /// Default Value: desc + /// + /// 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 List3Async( + string aliasKey, + string sessionKey, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + int? limit = default, + string? pageKey = default, + global::Vectara.ListAliasRoutedSessionArtifactsSortBy? sortBy = default, + global::Vectara.ListAliasRoutedSessionArtifactsOrderBy? orderBy = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List artifacts on alias-routed session
+ /// List artifacts stored in a session originally created via this alias. Artifacts are files either uploaded by the user, or generated within the session. + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// + /// A unique key that identifies an agent session.
+ /// Example: customer_support_chat + /// + /// + /// Default Value: 10 + /// + /// + /// + /// Default Value: created_at + /// + /// + /// Default Value: desc + /// + /// 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> List3AsResponseAsync( + string aliasKey, + string sessionKey, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + int? limit = default, + string? pageKey = default, + global::Vectara.ListAliasRoutedSessionArtifactsSortBy? sortBy = default, + global::Vectara.ListAliasRoutedSessionArtifactsOrderBy? orderBy = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.IAgentAliasesArtifactsClient.g.cs b/src/libs/Vectara/Generated/Vectara.IAgentAliasesArtifactsClient.g.cs new file mode 100644 index 00000000..de661eea --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.IAgentAliasesArtifactsClient.g.cs @@ -0,0 +1,48 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public partial interface IAgentAliasesArtifactsClient : global::System.IDisposable + { + /// + /// The HttpClient instance. + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + /// The base URL for the API. + /// + public System.Uri? BaseUri { get; } + + /// + /// The authorizations to use for the requests. + /// + public global::System.Collections.Generic.List Authorizations { get; } + + /// + /// Gets or sets a value indicating whether the response content should be read as a string. + /// True by default in debug builds, false otherwise. + /// When false, successful responses are deserialized directly from the response stream for better performance. + /// Error responses are always read as strings regardless of this setting, + /// ensuring is populated. + /// + public bool ReadResponseAsString { get; set; } + /// + /// Client-wide request defaults such as headers, query parameters, retries, and timeout. + /// + public global::Vectara.AutoSDKClientOptions Options { get; } + + + /// + /// + /// + global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } + + + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.IAgentAliasesClient.Create.g.cs b/src/libs/Vectara/Generated/Vectara.IAgentAliasesClient.Create.g.cs new file mode 100644 index 00000000..76389ee2 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.IAgentAliasesClient.Create.g.cs @@ -0,0 +1,89 @@ +#nullable enable + +namespace Vectara +{ + public partial interface IAgentAliasesClient + { + /// + /// Create an alias
+ /// Create a new alias. Aliases are routing primitives that map a public name to one or more underlying agents under a configurable policy. When a session is created through an alias (via `POST /v2/agent_aliases/{alias_key}/sessions`), the alias's policy decides which underlying agent runs that session.
+ /// Common patterns:
+ /// - **Direct alias** — a `routed` policy with one rule and one target. Identical in behavior to invoking the agent directly.
+ /// - **Canary rollout** — a `routed` policy with one rule and multiple weighted targets (e.g. 90% v1, 10% v2).
+ /// - **Tenant routing** — a `routed` policy with multiple rules, each matching on session metadata (e.g. `session.metadata.tenant`). + ///
+ /// + /// + /// + /// 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 CreateAsync( + + global::Vectara.CreateAgentAliasRequest request, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Create an alias
+ /// Create a new alias. Aliases are routing primitives that map a public name to one or more underlying agents under a configurable policy. When a session is created through an alias (via `POST /v2/agent_aliases/{alias_key}/sessions`), the alias's policy decides which underlying agent runs that session.
+ /// Common patterns:
+ /// - **Direct alias** — a `routed` policy with one rule and one target. Identical in behavior to invoking the agent directly.
+ /// - **Canary rollout** — a `routed` policy with one rule and multiple weighted targets (e.g. 90% v1, 10% v2).
+ /// - **Tenant routing** — a `routed` policy with multiple rules, each matching on session metadata (e.g. `session.metadata.tenant`). + ///
+ /// + /// + /// + /// 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> CreateAsResponseAsync( + + global::Vectara.CreateAgentAliasRequest request, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Create an alias
+ /// Create a new alias. Aliases are routing primitives that map a public name to one or more underlying agents under a configurable policy. When a session is created through an alias (via `POST /v2/agent_aliases/{alias_key}/sessions`), the alias's policy decides which underlying agent runs that session.
+ /// Common patterns:
+ /// - **Direct alias** — a `routed` policy with one rule and one target. Identical in behavior to invoking the agent directly.
+ /// - **Canary rollout** — a `routed` policy with one rule and multiple weighted targets (e.g. 90% v1, 10% v2).
+ /// - **Tenant routing** — a `routed` policy with multiple rules, each matching on session metadata (e.g. `session.metadata.tenant`). + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// + /// + /// + /// A routing policy. The `type` discriminator determines which fields apply:
+ /// * `routed` — evaluate ordered rules; the first rule whose `match` expression evaluates to true is selected. The selected rule's `targets` are then used (one agent for `single`, hashed by `partition_by` for `weighted`). Rules with omitted `match` are catch-all rules (typically last).
+ /// Most use cases (direct, weighted/canary, conditional, conditional+canary) collapse into `routed`. + /// + /// + /// Default Value: true + /// + /// + /// 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 CreateAsync( + string key, + string name, + global::Vectara.RoutedAliasPolicy policy, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + string? description = default, + bool? enabled = default, + object? metadata = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.IAgentAliasesClient.Delete.g.cs b/src/libs/Vectara/Generated/Vectara.IAgentAliasesClient.Delete.g.cs new file mode 100644 index 00000000..f0e92e23 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.IAgentAliasesClient.Delete.g.cs @@ -0,0 +1,46 @@ +#nullable enable + +namespace Vectara +{ + public partial interface IAgentAliasesClient + { + /// + /// Delete an alias
+ /// Delete an alias. The underlying agents the alias points at are not affected. Returns 409 if any live resources still reference this alias. + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// 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 DeleteAsync( + string aliasKey, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Delete an alias
+ /// Delete an alias. The underlying agents the alias points at are not affected. Returns 409 if any live resources still reference this alias. + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// 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 DeleteAsResponseAsync( + string aliasKey, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.IAgentAliasesClient.Get.g.cs b/src/libs/Vectara/Generated/Vectara.IAgentAliasesClient.Get.g.cs new file mode 100644 index 00000000..df2132aa --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.IAgentAliasesClient.Get.g.cs @@ -0,0 +1,46 @@ +#nullable enable + +namespace Vectara +{ + public partial interface IAgentAliasesClient + { + /// + /// Get an alias
+ /// Retrieve a specific alias including its policy. + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// 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 GetAsync( + string aliasKey, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get an alias
+ /// Retrieve a specific alias including its policy. + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// 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> GetAsResponseAsync( + string aliasKey, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.IAgentAliasesClient.List.g.cs b/src/libs/Vectara/Generated/Vectara.IAgentAliasesClient.List.g.cs new file mode 100644 index 00000000..ff4d2803 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.IAgentAliasesClient.List.g.cs @@ -0,0 +1,64 @@ +#nullable enable + +namespace Vectara +{ + public partial interface IAgentAliasesClient + { + /// + /// List aliases
+ /// List all aliases owned by the current customer. + ///
+ /// + /// + /// + /// Default Value: 10 + /// + /// + /// + /// Example: support.* + /// + /// + /// Example: true + /// + /// 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, + int? limit = default, + string? pageKey = default, + string? filter = default, + bool? enabled = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List aliases
+ /// List all aliases owned by the current customer. + ///
+ /// + /// + /// + /// Default Value: 10 + /// + /// + /// + /// Example: support.* + /// + /// + /// Example: true + /// + /// 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, + int? limit = default, + string? pageKey = default, + string? filter = default, + bool? enabled = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.IAgentAliasesClient.ReplacePolicy.g.cs b/src/libs/Vectara/Generated/Vectara.IAgentAliasesClient.ReplacePolicy.g.cs new file mode 100644 index 00000000..101c81df --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.IAgentAliasesClient.ReplacePolicy.g.cs @@ -0,0 +1,80 @@ +#nullable enable + +namespace Vectara +{ + public partial interface IAgentAliasesClient + { + /// + /// Replace an alias's routing policy
+ /// Atomically replace the alias's routing policy and stickiness configuration. Replacement is whole-object; partial merging is not supported.
+ /// Use this endpoint to flip canary weights, change tenant routing, etc. The change is atomic: in-flight sessions resolved before the change keep their resolved agent (resolution is once-at-creation). + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// + /// 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 ReplacePolicyAsync( + string aliasKey, + + global::Vectara.ReplaceAliasPolicyRequest request, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Replace an alias's routing policy
+ /// Atomically replace the alias's routing policy and stickiness configuration. Replacement is whole-object; partial merging is not supported.
+ /// Use this endpoint to flip canary weights, change tenant routing, etc. The change is atomic: in-flight sessions resolved before the change keep their resolved agent (resolution is once-at-creation). + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// + /// 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> ReplacePolicyAsResponseAsync( + string aliasKey, + + global::Vectara.ReplaceAliasPolicyRequest request, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Replace an alias's routing policy
+ /// Atomically replace the alias's routing policy and stickiness configuration. Replacement is whole-object; partial merging is not supported.
+ /// Use this endpoint to flip canary weights, change tenant routing, etc. The change is atomic: in-flight sessions resolved before the change keep their resolved agent (resolution is once-at-creation). + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// + /// A routing policy. The `type` discriminator determines which fields apply:
+ /// * `routed` — evaluate ordered rules; the first rule whose `match` expression evaluates to true is selected. The selected rule's `targets` are then used (one agent for `single`, hashed by `partition_by` for `weighted`). Rules with omitted `match` are catch-all rules (typically last).
+ /// Most use cases (direct, weighted/canary, conditional, conditional+canary) collapse into `routed`. + /// + /// 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 ReplacePolicyAsync( + string aliasKey, + global::Vectara.RoutedAliasPolicy policy, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.IAgentAliasesClient.Update.g.cs b/src/libs/Vectara/Generated/Vectara.IAgentAliasesClient.Update.g.cs new file mode 100644 index 00000000..bffb7743 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.IAgentAliasesClient.Update.g.cs @@ -0,0 +1,79 @@ +#nullable enable + +namespace Vectara +{ + public partial interface IAgentAliasesClient + { + /// + /// Update an alias's metadata
+ /// Update an alias's metadata fields (name, description, enabled, metadata). To replace the routing policy, use `PUT /v2/agent_aliases/{alias_key}/policy` — policies are atomic and not partially updatable. + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// + /// 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 UpdateAsync( + string aliasKey, + + global::Vectara.UpdateAgentAliasRequest request, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Update an alias's metadata
+ /// Update an alias's metadata fields (name, description, enabled, metadata). To replace the routing policy, use `PUT /v2/agent_aliases/{alias_key}/policy` — policies are atomic and not partially updatable. + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// + /// 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> UpdateAsResponseAsync( + string aliasKey, + + global::Vectara.UpdateAgentAliasRequest request, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Update an alias's metadata
+ /// Update an alias's metadata fields (name, description, enabled, metadata). To replace the routing policy, use `PUT /v2/agent_aliases/{alias_key}/policy` — policies are atomic and not partially updatable. + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// + /// + /// + /// + /// 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 UpdateAsync( + string aliasKey, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + string? name = default, + string? description = default, + bool? enabled = default, + object? metadata = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.IAgentAliasesClient.g.cs b/src/libs/Vectara/Generated/Vectara.IAgentAliasesClient.g.cs new file mode 100644 index 00000000..7335dd13 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.IAgentAliasesClient.g.cs @@ -0,0 +1,48 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public partial interface IAgentAliasesClient : global::System.IDisposable + { + /// + /// The HttpClient instance. + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + /// The base URL for the API. + /// + public System.Uri? BaseUri { get; } + + /// + /// The authorizations to use for the requests. + /// + public global::System.Collections.Generic.List Authorizations { get; } + + /// + /// Gets or sets a value indicating whether the response content should be read as a string. + /// True by default in debug builds, false otherwise. + /// When false, successful responses are deserialized directly from the response stream for better performance. + /// Error responses are always read as strings regardless of this setting, + /// ensuring is populated. + /// + public bool ReadResponseAsString { get; set; } + /// + /// Client-wide request defaults such as headers, query parameters, retries, and timeout. + /// + public global::Vectara.AutoSDKClientOptions Options { get; } + + + /// + /// + /// + global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } + + + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.IAgentAliasesEventsClient.Hide.g.cs b/src/libs/Vectara/Generated/Vectara.IAgentAliasesEventsClient.Hide.g.cs new file mode 100644 index 00000000..7039f9d3 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.IAgentAliasesEventsClient.Hide.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Vectara +{ + public partial interface IAgentAliasesEventsClient + { + /// + /// Hide event on alias-routed session
+ /// Manually hide an event on a session originally created via this alias. Sets hide_reason to 'manual'. + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// + /// A unique key that identifies an agent session.
+ /// Example: customer_support_chat + /// + /// + /// 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 HideAsync( + string aliasKey, + string sessionKey, + string eventId, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Hide event on alias-routed session
+ /// Manually hide an event on a session originally created via this alias. Sets hide_reason to 'manual'. + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// + /// A unique key that identifies an agent session.
+ /// Example: customer_support_chat + /// + /// + /// 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> HideAsResponseAsync( + string aliasKey, + string sessionKey, + string eventId, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.IAgentAliasesEventsClient.Unhide.g.cs b/src/libs/Vectara/Generated/Vectara.IAgentAliasesEventsClient.Unhide.g.cs new file mode 100644 index 00000000..e0886650 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.IAgentAliasesEventsClient.Unhide.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Vectara +{ + public partial interface IAgentAliasesEventsClient + { + /// + /// Unhide event on alias-routed session
+ /// Unhide a hidden event on a session originally created via this alias. Clears the hide_reason. + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// + /// A unique key that identifies an agent session.
+ /// Example: customer_support_chat + /// + /// + /// 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 UnhideAsync( + string aliasKey, + string sessionKey, + string eventId, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Unhide event on alias-routed session
+ /// Unhide a hidden event on a session originally created via this alias. Clears the hide_reason. + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// + /// A unique key that identifies an agent session.
+ /// Example: customer_support_chat + /// + /// + /// 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> UnhideAsResponseAsync( + string aliasKey, + string sessionKey, + string eventId, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.IAgentAliasesEventsClient.g.cs b/src/libs/Vectara/Generated/Vectara.IAgentAliasesEventsClient.g.cs new file mode 100644 index 00000000..9c60cdca --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.IAgentAliasesEventsClient.g.cs @@ -0,0 +1,48 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public partial interface IAgentAliasesEventsClient : global::System.IDisposable + { + /// + /// The HttpClient instance. + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + /// The base URL for the API. + /// + public System.Uri? BaseUri { get; } + + /// + /// The authorizations to use for the requests. + /// + public global::System.Collections.Generic.List Authorizations { get; } + + /// + /// Gets or sets a value indicating whether the response content should be read as a string. + /// True by default in debug builds, false otherwise. + /// When false, successful responses are deserialized directly from the response stream for better performance. + /// Error responses are always read as strings regardless of this setting, + /// ensuring is populated. + /// + public bool ReadResponseAsString { get; set; } + /// + /// Client-wide request defaults such as headers, query parameters, retries, and timeout. + /// + public global::Vectara.AutoSDKClientOptions Options { get; } + + + /// + /// + /// + global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } + + + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.IAgentAliasesSessionsClient.Create2.g.cs b/src/libs/Vectara/Generated/Vectara.IAgentAliasesSessionsClient.Create2.g.cs new file mode 100644 index 00000000..45107d9f --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.IAgentAliasesSessionsClient.Create2.g.cs @@ -0,0 +1,118 @@ +#nullable enable + +namespace Vectara +{ + public partial interface IAgentAliasesSessionsClient + { + /// + /// Create session via alias
+ /// Create a new session by routing through an alias. The alias's policy is evaluated to pick the underlying agent that will own the session. Subsequent operations on the session can be addressed via this alias or directly via `/v2/agents/{resolved_agent_key}/sessions/{session_key}`. + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// + /// 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 Create2Async( + string aliasKey, + + global::Vectara.CreateAgentSessionRequest request, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Create session via alias
+ /// Create a new session by routing through an alias. The alias's policy is evaluated to pick the underlying agent that will own the session. Subsequent operations on the session can be addressed via this alias or directly via `/v2/agents/{resolved_agent_key}/sessions/{session_key}`. + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// + /// 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> Create2AsResponseAsync( + string aliasKey, + + global::Vectara.CreateAgentSessionRequest request, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Create session via alias
+ /// Create a new session by routing through an alias. The alias's policy is evaluated to pick the underlying agent that will own the session. Subsequent operations on the session can be addressed via this alias or directly via `/v2/agents/{resolved_agent_key}/sessions/{session_key}`. + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// + /// A unique key that identifies an agent session.
+ /// Example: customer_support_chat + /// + /// + /// Human-readable name for the session.
+ /// Example: Customer Support Session + /// + /// + /// Optional description of the session purpose or context.
+ /// Example: Helping customer troubleshoot issues + /// + /// + /// Arbitrary metadata associated with the session.
+ /// Default Value: {}
+ /// Example: {"customer_id":"12345","priority":"medium","channel":"web_chat"} + /// + /// + /// Whether the session should be enabled upon creation.
+ /// Default Value: true
+ /// Example: true + /// + /// + /// Time-to-idle in minutes for the session. If no events occur in the session for this duration, the session will be automatically deleted. If set to 0, the session will not expire.
+ /// Default Value: 0
+ /// Example: 60 + /// + /// + /// Session-scoped secrets to store on the new session. Map of secret name to plaintext value.
+ /// Encrypted at rest with the owning agent's encryption key. Referenced from tool `argument_override` via
+ /// `{"$ref": "session.secrets.<name>"}`. Returned masked (`****`) on reads.
+ /// Example: {"slack_user_token":"xoxp-your-token-here"} + /// + /// + /// Create a new session by forking an existing one. By default, copies all visible events
+ /// and artifacts from the source session without compaction. Optionally specify exactly one of
+ /// include_up_to_event_id or compact_up_to_event_id to control which events are included
+ /// and whether they are compacted. These two fields are mutually exclusive. + /// + /// 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 Create2Async( + string aliasKey, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + string? key = default, + string? name = default, + string? description = default, + object? metadata = default, + bool? enabled = default, + long? ttiMinutes = default, + global::System.Collections.Generic.Dictionary? secrets = default, + global::Vectara.CreateAgentSessionRequestFromSession? fromSession = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.IAgentAliasesSessionsClient.CreateInput.g.cs b/src/libs/Vectara/Generated/Vectara.IAgentAliasesSessionsClient.CreateInput.g.cs new file mode 100644 index 00000000..4882bb69 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.IAgentAliasesSessionsClient.CreateInput.g.cs @@ -0,0 +1,62 @@ +#nullable enable + +namespace Vectara +{ + public partial interface IAgentAliasesSessionsClient + { + /// + /// Submit input to alias-routed session
+ /// Submit an input event to a session originally created via this alias. The session's resolved agent runs the loop. + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// + /// A unique key that identifies an agent session.
+ /// Example: customer_support_chat + /// + /// + /// 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 CreateInputAsync( + string aliasKey, + string sessionKey, + + global::Vectara.CreateInputRequest request, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Submit input to alias-routed session
+ /// Submit an input event to a session originally created via this alias. The session's resolved agent runs the loop. + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// + /// A unique key that identifies an agent session.
+ /// Example: customer_support_chat + /// + /// + /// 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> CreateInputAsResponseAsync( + string aliasKey, + string sessionKey, + + global::Vectara.CreateInputRequest request, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.IAgentAliasesSessionsClient.CreateInputAsStream.g.cs b/src/libs/Vectara/Generated/Vectara.IAgentAliasesSessionsClient.CreateInputAsStream.g.cs new file mode 100644 index 00000000..595c106d --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.IAgentAliasesSessionsClient.CreateInputAsStream.g.cs @@ -0,0 +1,35 @@ +#nullable enable + +namespace Vectara +{ + public partial interface IAgentAliasesSessionsClient + { + /// + /// Submit input to alias-routed session
+ /// Submit an input event to a session originally created via this alias. The session's resolved agent runs the loop. + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// + /// A unique key that identifies an agent session.
+ /// Example: customer_support_chat + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Collections.Generic.IAsyncEnumerable CreateInputAsStreamAsync( + string aliasKey, + string sessionKey, + + global::Vectara.CreateInputRequest request, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.IAgentAliasesSessionsClient.Delete2.g.cs b/src/libs/Vectara/Generated/Vectara.IAgentAliasesSessionsClient.Delete2.g.cs new file mode 100644 index 00000000..e4410463 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.IAgentAliasesSessionsClient.Delete2.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace Vectara +{ + public partial interface IAgentAliasesSessionsClient + { + /// + /// Delete alias-routed session
+ /// Delete a session originally created via this alias. + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// + /// A unique key that identifies an agent session.
+ /// Example: customer_support_chat + /// + /// 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 Delete2Async( + string aliasKey, + string sessionKey, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Delete alias-routed session
+ /// Delete a session originally created via this alias. + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// + /// A unique key that identifies an agent session.
+ /// Example: customer_support_chat + /// + /// 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 Delete2AsResponseAsync( + string aliasKey, + string sessionKey, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.IAgentAliasesSessionsClient.DeleteEvent.g.cs b/src/libs/Vectara/Generated/Vectara.IAgentAliasesSessionsClient.DeleteEvent.g.cs new file mode 100644 index 00000000..a69dbdf9 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.IAgentAliasesSessionsClient.DeleteEvent.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Vectara +{ + public partial interface IAgentAliasesSessionsClient + { + /// + /// Delete event on alias-routed session
+ /// Delete a single event of a session originally created via this alias. + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// + /// A unique key that identifies an agent session.
+ /// Example: customer_support_chat + /// + /// + /// 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 DeleteEventAsync( + string aliasKey, + string sessionKey, + string eventId, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Delete event on alias-routed session
+ /// Delete a single event of a session originally created via this alias. + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// + /// A unique key that identifies an agent session.
+ /// Example: customer_support_chat + /// + /// + /// 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 DeleteEventAsResponseAsync( + string aliasKey, + string sessionKey, + string eventId, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.IAgentAliasesSessionsClient.Get2.g.cs b/src/libs/Vectara/Generated/Vectara.IAgentAliasesSessionsClient.Get2.g.cs new file mode 100644 index 00000000..614213d6 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.IAgentAliasesSessionsClient.Get2.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace Vectara +{ + public partial interface IAgentAliasesSessionsClient + { + /// + /// Get alias-routed session
+ /// Retrieve a session originally created via this alias. + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// + /// A unique key that identifies an agent session.
+ /// Example: customer_support_chat + /// + /// 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 Get2Async( + string aliasKey, + string sessionKey, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get alias-routed session
+ /// Retrieve a session originally created via this alias. + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// + /// A unique key that identifies an agent session.
+ /// Example: customer_support_chat + /// + /// 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> Get2AsResponseAsync( + string aliasKey, + string sessionKey, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.IAgentAliasesSessionsClient.GetEvent.g.cs b/src/libs/Vectara/Generated/Vectara.IAgentAliasesSessionsClient.GetEvent.g.cs new file mode 100644 index 00000000..23c8e21d --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.IAgentAliasesSessionsClient.GetEvent.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Vectara +{ + public partial interface IAgentAliasesSessionsClient + { + /// + /// Get event on alias-routed session
+ /// Get a single event of a session originally created via this alias. + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// + /// A unique key that identifies an agent session.
+ /// Example: customer_support_chat + /// + /// + /// 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 GetEventAsync( + string aliasKey, + string sessionKey, + string eventId, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get event on alias-routed session
+ /// Get a single event of a session originally created via this alias. + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// + /// A unique key that identifies an agent session.
+ /// Example: customer_support_chat + /// + /// + /// 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> GetEventAsResponseAsync( + string aliasKey, + string sessionKey, + string eventId, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.IAgentAliasesSessionsClient.List2.g.cs b/src/libs/Vectara/Generated/Vectara.IAgentAliasesSessionsClient.List2.g.cs new file mode 100644 index 00000000..c5233ae4 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.IAgentAliasesSessionsClient.List2.g.cs @@ -0,0 +1,62 @@ +#nullable enable + +namespace Vectara +{ + public partial interface IAgentAliasesSessionsClient + { + /// + /// List sessions routed via this alias
+ /// List sessions that were originally created via this alias (sessions whose `alias_key` matches). Sessions are also reachable under their resolved agent's URL; this endpoint is the alias-scoped view. + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// + /// + /// Default Value: 10 + /// + /// + /// 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 List2Async( + string aliasKey, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + string? filter = default, + int? limit = default, + string? pageKey = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List sessions routed via this alias
+ /// List sessions that were originally created via this alias (sessions whose `alias_key` matches). Sessions are also reachable under their resolved agent's URL; this endpoint is the alias-scoped view. + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// + /// + /// Default Value: 10 + /// + /// + /// 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> List2AsResponseAsync( + string aliasKey, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + string? filter = default, + int? limit = default, + string? pageKey = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.IAgentAliasesSessionsClient.ListEvents.g.cs b/src/libs/Vectara/Generated/Vectara.IAgentAliasesSessionsClient.ListEvents.g.cs new file mode 100644 index 00000000..f58425d1 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.IAgentAliasesSessionsClient.ListEvents.g.cs @@ -0,0 +1,68 @@ +#nullable enable + +namespace Vectara +{ + public partial interface IAgentAliasesSessionsClient + { + /// + /// List events on alias-routed session
+ /// List events of a session originally created via this alias. + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// + /// A unique key that identifies an agent session.
+ /// Example: customer_support_chat + /// + /// + /// Default Value: 10 + /// + /// + /// 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 ListEventsAsync( + string aliasKey, + string sessionKey, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + int? limit = default, + string? pageKey = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List events on alias-routed session
+ /// List events of a session originally created via this alias. + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// + /// A unique key that identifies an agent session.
+ /// Example: customer_support_chat + /// + /// + /// Default Value: 10 + /// + /// + /// 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> ListEventsAsResponseAsync( + string aliasKey, + string sessionKey, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + int? limit = default, + string? pageKey = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.IAgentAliasesSessionsClient.Update2.g.cs b/src/libs/Vectara/Generated/Vectara.IAgentAliasesSessionsClient.Update2.g.cs new file mode 100644 index 00000000..34347ecf --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.IAgentAliasesSessionsClient.Update2.g.cs @@ -0,0 +1,117 @@ +#nullable enable + +namespace Vectara +{ + public partial interface IAgentAliasesSessionsClient + { + /// + /// Update alias-routed session
+ /// Update a session originally created via this alias. + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// + /// A unique key that identifies an agent session.
+ /// Example: customer_support_chat + /// + /// + /// 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 Update2Async( + string aliasKey, + string sessionKey, + + global::Vectara.UpdateAgentSessionRequest request, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Update alias-routed session
+ /// Update a session originally created via this alias. + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// + /// A unique key that identifies an agent session.
+ /// Example: customer_support_chat + /// + /// + /// 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> Update2AsResponseAsync( + string aliasKey, + string sessionKey, + + global::Vectara.UpdateAgentSessionRequest request, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Update alias-routed session
+ /// Update a session originally created via this alias. + ///
+ /// + /// + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// + /// A unique key that identifies an agent session.
+ /// Example: customer_support_chat + /// + /// + /// Human-readable name for the session.
+ /// Example: Updated Session Name + /// + /// + /// Optional description of the session purpose or context.
+ /// Example: Updated session description + /// + /// + /// Arbitrary metadata associated with the session.
+ /// Example: {"customer_id":"12345","priority":"high","status":"escalated"} + /// + /// + /// Whether the session is enabled.
+ /// Example: false + /// + /// + /// Time-to-idle in minutes for the session. If no events occur in the session for this duration, the session will be automatically deleted. If set to 0, the session will not expire.
+ /// Example: 60 + /// + /// + /// Patch the session's secrets. Names present in the map are added or replaced; names absent from the map are left unchanged.
+ /// A name mapped to `null` is removed. Values are encrypted at rest with the owning agent's encryption key and returned masked on reads.
+ /// Example: {"slack_user_token":"xoxp-rotated-token","old_token_to_remove":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464"} + /// + /// 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 Update2Async( + string aliasKey, + string sessionKey, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + string? name = default, + string? description = default, + object? metadata = default, + bool? enabled = default, + long? ttiMinutes = default, + global::System.Collections.Generic.Dictionary? secrets = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.IAgentAliasesSessionsClient.g.cs b/src/libs/Vectara/Generated/Vectara.IAgentAliasesSessionsClient.g.cs new file mode 100644 index 00000000..1debe445 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.IAgentAliasesSessionsClient.g.cs @@ -0,0 +1,48 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public partial interface IAgentAliasesSessionsClient : global::System.IDisposable + { + /// + /// The HttpClient instance. + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + /// The base URL for the API. + /// + public System.Uri? BaseUri { get; } + + /// + /// The authorizations to use for the requests. + /// + public global::System.Collections.Generic.List Authorizations { get; } + + /// + /// Gets or sets a value indicating whether the response content should be read as a string. + /// True by default in debug builds, false otherwise. + /// When false, successful responses are deserialized directly from the response stream for better performance. + /// Error responses are always read as strings regardless of this setting, + /// ensuring is populated. + /// + public bool ReadResponseAsString { get; set; } + /// + /// Client-wide request defaults such as headers, query parameters, retries, and timeout. + /// + public global::Vectara.AutoSDKClientOptions Options { get; } + + + /// + /// + /// + global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } + + + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.IAgentSessionsClient.Create.g.cs b/src/libs/Vectara/Generated/Vectara.IAgentSessionsClient.Create.g.cs index ba494eb9..f82dca02 100644 --- a/src/libs/Vectara/Generated/Vectara.IAgentSessionsClient.Create.g.cs +++ b/src/libs/Vectara/Generated/Vectara.IAgentSessionsClient.Create.g.cs @@ -136,6 +136,12 @@ public partial interface IAgentSessionsClient /// Default Value: 0
/// Example: 60 /// + /// + /// Session-scoped secrets to store on the new session. Map of secret name to plaintext value.
+ /// Encrypted at rest with the owning agent's encryption key. Referenced from tool `argument_override` via
+ /// `{"$ref": "session.secrets.<name>"}`. Returned masked (`****`) on reads.
+ /// Example: {"slack_user_token":"xoxp-your-token-here"} + /// /// /// Create a new session by forking an existing one. By default, copies all visible events
/// and artifacts from the source session without compaction. Optionally specify exactly one of
@@ -155,6 +161,7 @@ public partial interface IAgentSessionsClient object? metadata = default, bool? enabled = default, long? ttiMinutes = default, + global::System.Collections.Generic.Dictionary? secrets = default, global::Vectara.CreateAgentSessionRequestFromSession? fromSession = default, global::Vectara.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); diff --git a/src/libs/Vectara/Generated/Vectara.IAgentSessionsClient.Update.g.cs b/src/libs/Vectara/Generated/Vectara.IAgentSessionsClient.Update.g.cs index 061e3f22..b76bfb03 100644 --- a/src/libs/Vectara/Generated/Vectara.IAgentSessionsClient.Update.g.cs +++ b/src/libs/Vectara/Generated/Vectara.IAgentSessionsClient.Update.g.cs @@ -95,6 +95,11 @@ public partial interface IAgentSessionsClient /// Time-to-idle in minutes for the session. If no events occur in the session for this duration, the session will be automatically deleted. If set to 0, the session will not expire.
/// Example: 60 /// + /// + /// Patch the session's secrets. Names present in the map are added or replaced; names absent from the map are left unchanged.
+ /// A name mapped to `null` is removed. Values are encrypted at rest with the owning agent's encryption key and returned masked on reads.
+ /// Example: {"slack_user_token":"xoxp-rotated-token","old_token_to_remove":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464"} + /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// @@ -108,6 +113,7 @@ public partial interface IAgentSessionsClient object? metadata = default, bool? enabled = default, long? ttiMinutes = default, + global::System.Collections.Generic.Dictionary? secrets = default, global::Vectara.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); } diff --git a/src/libs/Vectara/Generated/Vectara.IPipelineDeadLetterEntriesClient.Create.g.cs b/src/libs/Vectara/Generated/Vectara.IPipelineDeadLetterEntriesClient.Create.g.cs index 0d89cd82..100769dc 100644 --- a/src/libs/Vectara/Generated/Vectara.IPipelineDeadLetterEntriesClient.Create.g.cs +++ b/src/libs/Vectara/Generated/Vectara.IPipelineDeadLetterEntriesClient.Create.g.cs @@ -62,6 +62,7 @@ public partial interface IPipelineDeadLetterEntriesClient /// The identifier for the source record to add. Format depends on connector type:
/// - S3: the object key (e.g. `legal/contracts/doc.pdf`)
/// - SharePoint: the drive item ID
+ /// - Google Drive: the file ID
/// - Web: the canonicalized URL (e.g. `https://docs.example.com/page`) /// /// diff --git a/src/libs/Vectara/Generated/Vectara.IVectaraClient.g.cs b/src/libs/Vectara/Generated/Vectara.IVectaraClient.g.cs index 6e6f48fd..a48971d4 100644 --- a/src/libs/Vectara/Generated/Vectara.IVectaraClient.g.cs +++ b/src/libs/Vectara/Generated/Vectara.IVectaraClient.g.cs @@ -59,6 +59,26 @@ public partial interface IVectaraClient : global::System.IDisposable global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } + /// + /// + /// + public AgentAliasesClient AgentAliases { get; } + + /// + /// + /// + public AgentAliasesArtifactsClient AgentAliasesArtifacts { get; } + + /// + /// + /// + public AgentAliasesEventsClient AgentAliasesEvents { get; } + + /// + /// + /// + public AgentAliasesSessionsClient AgentAliasesSessions { get; } + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.AliasPolicy.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.AliasPolicy.g.cs new file mode 100644 index 00000000..7201768d --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.AliasPolicy.g.cs @@ -0,0 +1,57 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace Vectara.JsonConverters +{ + /// + public class AliasPolicyJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Vectara.AliasPolicy 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.AliasPolicyDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Vectara.AliasPolicyDiscriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); + + global::Vectara.RoutedAliasPolicy? routed = default; + if (discriminator?.Type == global::Vectara.AliasPolicyDiscriminatorType.Routed) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.RoutedAliasPolicy), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Vectara.RoutedAliasPolicy)}"); + routed = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + var __value = new global::Vectara.AliasPolicy( + discriminator?.Type, + routed + ); + + return __value; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Vectara.AliasPolicy 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.IsRouted) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.RoutedAliasPolicy), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.RoutedAliasPolicy).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Routed!, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.AliasPolicyDiscriminatorType.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.AliasPolicyDiscriminatorType.g.cs new file mode 100644 index 00000000..35b3374c --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.AliasPolicyDiscriminatorType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Vectara.JsonConverters +{ + /// + public sealed class AliasPolicyDiscriminatorTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Vectara.AliasPolicyDiscriminatorType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::Vectara.AliasPolicyDiscriminatorTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Vectara.AliasPolicyDiscriminatorType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Vectara.AliasPolicyDiscriminatorType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Vectara.AliasPolicyDiscriminatorType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Vectara.AliasPolicyDiscriminatorTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.AliasPolicyDiscriminatorTypeNullable.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.AliasPolicyDiscriminatorTypeNullable.g.cs new file mode 100644 index 00000000..b9ec9800 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.AliasPolicyDiscriminatorTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Vectara.JsonConverters +{ + /// + public sealed class AliasPolicyDiscriminatorTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Vectara.AliasPolicyDiscriminatorType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::Vectara.AliasPolicyDiscriminatorTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Vectara.AliasPolicyDiscriminatorType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Vectara.AliasPolicyDiscriminatorType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Vectara.AliasPolicyDiscriminatorType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::Vectara.AliasPolicyDiscriminatorTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.GoogleDriveScope.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.GoogleDriveScope.g.cs new file mode 100644 index 00000000..c9574e61 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.GoogleDriveScope.g.cs @@ -0,0 +1,72 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace Vectara.JsonConverters +{ + /// + public class GoogleDriveScopeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Vectara.GoogleDriveScope 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.GoogleDriveScopeDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Vectara.GoogleDriveScopeDiscriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); + + global::Vectara.SharedGoogleDriveScope? shared = default; + if (discriminator?.Type == global::Vectara.GoogleDriveScopeDiscriminatorType.Shared) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.SharedGoogleDriveScope), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Vectara.SharedGoogleDriveScope)}"); + shared = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::Vectara.MyGoogleDriveScope? myDrive = default; + if (discriminator?.Type == global::Vectara.GoogleDriveScopeDiscriminatorType.MyDrive) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.MyGoogleDriveScope), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Vectara.MyGoogleDriveScope)}"); + myDrive = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + var __value = new global::Vectara.GoogleDriveScope( + discriminator?.Type, + shared, + + myDrive + ); + + return __value; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Vectara.GoogleDriveScope 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.IsShared) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.SharedGoogleDriveScope), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.SharedGoogleDriveScope).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Shared!, typeInfo); + } + else if (value.IsMyDrive) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.MyGoogleDriveScope), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.MyGoogleDriveScope).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.MyDrive!, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.GoogleDriveScopeDiscriminatorType.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.GoogleDriveScopeDiscriminatorType.g.cs new file mode 100644 index 00000000..883fdd59 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.GoogleDriveScopeDiscriminatorType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Vectara.JsonConverters +{ + /// + public sealed class GoogleDriveScopeDiscriminatorTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Vectara.GoogleDriveScopeDiscriminatorType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::Vectara.GoogleDriveScopeDiscriminatorTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Vectara.GoogleDriveScopeDiscriminatorType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Vectara.GoogleDriveScopeDiscriminatorType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Vectara.GoogleDriveScopeDiscriminatorType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Vectara.GoogleDriveScopeDiscriminatorTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.GoogleDriveScopeDiscriminatorTypeNullable.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.GoogleDriveScopeDiscriminatorTypeNullable.g.cs new file mode 100644 index 00000000..95d94bd3 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.GoogleDriveScopeDiscriminatorTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Vectara.JsonConverters +{ + /// + public sealed class GoogleDriveScopeDiscriminatorTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Vectara.GoogleDriveScopeDiscriminatorType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::Vectara.GoogleDriveScopeDiscriminatorTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Vectara.GoogleDriveScopeDiscriminatorType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Vectara.GoogleDriveScopeDiscriminatorType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Vectara.GoogleDriveScopeDiscriminatorType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::Vectara.GoogleDriveScopeDiscriminatorTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.GoogleDriveSourceConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.GoogleDriveSourceConfiguration.g.cs new file mode 100644 index 00000000..2eece3dc --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.GoogleDriveSourceConfiguration.g.cs @@ -0,0 +1,143 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace Vectara.JsonConverters +{ + /// + public class GoogleDriveSourceConfigurationJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Vectara.GoogleDriveSourceConfiguration 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("client_email")) __score0++; + if (__jsonProps.Contains("private_key")) __score0++; + if (__jsonProps.Contains("scopes")) __score0++; + if (__jsonProps.Contains("type")) __score0++; + var __score1 = 0; + var __bestScore = 0; + var __bestIndex = -1; + if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; } + if (__score1 > __bestScore) { __bestScore = __score1; __bestIndex = 1; } + + global::Vectara.BaseGoogleDriveSourceConfiguration? @base = default; + object? googleDriveSourceConfigurationVariant2 = default; + if (__bestIndex >= 0) + { + if (__bestIndex == 0) + { + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.BaseGoogleDriveSourceConfiguration), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.BaseGoogleDriveSourceConfiguration).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(object), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(object).Name}"); + googleDriveSourceConfigurationVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + } + + if (@base == null && googleDriveSourceConfigurationVariant2 == null) + { + try + { + + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.BaseGoogleDriveSourceConfiguration), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.BaseGoogleDriveSourceConfiguration).Name}"); + @base = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + + if (@base == null && googleDriveSourceConfigurationVariant2 == null) + { + try + { + + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(object), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(object).Name}"); + googleDriveSourceConfigurationVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + + var __value = new global::Vectara.GoogleDriveSourceConfiguration( + @base, + + googleDriveSourceConfigurationVariant2 + ); + + return __value; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Vectara.GoogleDriveSourceConfiguration 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.BaseGoogleDriveSourceConfiguration), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.BaseGoogleDriveSourceConfiguration).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Base!, typeInfo); + } + else if (value.IsGoogleDriveSourceConfigurationVariant2) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(object), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(object).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.GoogleDriveSourceConfigurationVariant2!, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.LLMAuth.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.LLMAuth.g.cs new file mode 100644 index 00000000..39b07fe6 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.LLMAuth.g.cs @@ -0,0 +1,177 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace Vectara.JsonConverters +{ + /// + public class LLMAuthJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Vectara.LLMAuth 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.LLMAuthDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Vectara.LLMAuthDiscriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); + + global::Vectara.BearerAuth? bearer = default; + if (discriminator?.Type == global::Vectara.LLMAuthDiscriminatorType.Bearer) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.BearerAuth), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Vectara.BearerAuth)}"); + bearer = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::Vectara.HeaderAuth? header = default; + if (discriminator?.Type == global::Vectara.LLMAuthDiscriminatorType.Header) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.HeaderAuth), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Vectara.HeaderAuth)}"); + header = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::Vectara.OAuthClientCredentialsAuth? oauthClientCredentials = default; + if (discriminator?.Type == global::Vectara.LLMAuthDiscriminatorType.OauthClientCredentials) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.OAuthClientCredentialsAuth), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Vectara.OAuthClientCredentialsAuth)}"); + oauthClientCredentials = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::Vectara.BedrockStaticIAMAuth? bedrockStaticIam = default; + if (discriminator?.Type == global::Vectara.LLMAuthDiscriminatorType.BedrockStaticIam) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.BedrockStaticIAMAuth), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Vectara.BedrockStaticIAMAuth)}"); + bedrockStaticIam = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::Vectara.BedrockApiKeyAuth? bedrockApiKey = default; + if (discriminator?.Type == global::Vectara.LLMAuthDiscriminatorType.BedrockApiKey) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.BedrockApiKeyAuth), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Vectara.BedrockApiKeyAuth)}"); + bedrockApiKey = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::Vectara.VertexServiceAccountAuth? vertexServiceAccount = default; + if (discriminator?.Type == global::Vectara.LLMAuthDiscriminatorType.VertexServiceAccount) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.VertexServiceAccountAuth), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Vectara.VertexServiceAccountAuth)}"); + vertexServiceAccount = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::Vectara.VertexAccessTokenAuth? vertexAccessToken = default; + if (discriminator?.Type == global::Vectara.LLMAuthDiscriminatorType.VertexAccessToken) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.VertexAccessTokenAuth), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Vectara.VertexAccessTokenAuth)}"); + vertexAccessToken = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::Vectara.VertexAiApiKeyAuth? apiKey = default; + if (discriminator?.Type == global::Vectara.LLMAuthDiscriminatorType.ApiKey) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.VertexAiApiKeyAuth), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Vectara.VertexAiApiKeyAuth)}"); + apiKey = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::Vectara.VertexAiServiceAccountAuth? serviceAccount = default; + if (discriminator?.Type == global::Vectara.LLMAuthDiscriminatorType.ServiceAccount) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.VertexAiServiceAccountAuth), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Vectara.VertexAiServiceAccountAuth)}"); + serviceAccount = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + var __value = new global::Vectara.LLMAuth( + discriminator?.Type, + bearer, + + header, + + oauthClientCredentials, + + bedrockStaticIam, + + bedrockApiKey, + + vertexServiceAccount, + + vertexAccessToken, + + apiKey, + + serviceAccount + ); + + return __value; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Vectara.LLMAuth 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.IsBearer) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.BearerAuth), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.BearerAuth).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Bearer!, typeInfo); + } + else if (value.IsHeader) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.HeaderAuth), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.HeaderAuth).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Header!, typeInfo); + } + else if (value.IsOauthClientCredentials) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.OAuthClientCredentialsAuth), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.OAuthClientCredentialsAuth).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.OauthClientCredentials!, typeInfo); + } + else if (value.IsBedrockStaticIam) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.BedrockStaticIAMAuth), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.BedrockStaticIAMAuth).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.BedrockStaticIam!, typeInfo); + } + else if (value.IsBedrockApiKey) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.BedrockApiKeyAuth), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.BedrockApiKeyAuth).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.BedrockApiKey!, typeInfo); + } + else if (value.IsVertexServiceAccount) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.VertexServiceAccountAuth), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.VertexServiceAccountAuth).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.VertexServiceAccount!, typeInfo); + } + else if (value.IsVertexAccessToken) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.VertexAccessTokenAuth), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.VertexAccessTokenAuth).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.VertexAccessToken!, typeInfo); + } + else if (value.IsApiKey) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.VertexAiApiKeyAuth), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.VertexAiApiKeyAuth).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ApiKey!, typeInfo); + } + else if (value.IsServiceAccount) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.VertexAiServiceAccountAuth), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.VertexAiServiceAccountAuth).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ServiceAccount!, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.LLMAuthDiscriminatorType.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.LLMAuthDiscriminatorType.g.cs new file mode 100644 index 00000000..76fd7c5d --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.LLMAuthDiscriminatorType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Vectara.JsonConverters +{ + /// + public sealed class LLMAuthDiscriminatorTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Vectara.LLMAuthDiscriminatorType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::Vectara.LLMAuthDiscriminatorTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Vectara.LLMAuthDiscriminatorType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Vectara.LLMAuthDiscriminatorType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Vectara.LLMAuthDiscriminatorType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Vectara.LLMAuthDiscriminatorTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.LLMAuthDiscriminatorTypeNullable.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.LLMAuthDiscriminatorTypeNullable.g.cs new file mode 100644 index 00000000..7075b64f --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.LLMAuthDiscriminatorTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Vectara.JsonConverters +{ + /// + public sealed class LLMAuthDiscriminatorTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Vectara.LLMAuthDiscriminatorType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::Vectara.LLMAuthDiscriminatorTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Vectara.LLMAuthDiscriminatorType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Vectara.LLMAuthDiscriminatorType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Vectara.LLMAuthDiscriminatorType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::Vectara.LLMAuthDiscriminatorTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.ListAliasRoutedSessionArtifactsOrderBy.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.ListAliasRoutedSessionArtifactsOrderBy.g.cs new file mode 100644 index 00000000..d1c9094d --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.ListAliasRoutedSessionArtifactsOrderBy.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Vectara.JsonConverters +{ + /// + public sealed class ListAliasRoutedSessionArtifactsOrderByJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Vectara.ListAliasRoutedSessionArtifactsOrderBy Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::Vectara.ListAliasRoutedSessionArtifactsOrderByExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Vectara.ListAliasRoutedSessionArtifactsOrderBy)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Vectara.ListAliasRoutedSessionArtifactsOrderBy); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Vectara.ListAliasRoutedSessionArtifactsOrderBy value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Vectara.ListAliasRoutedSessionArtifactsOrderByExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.ListAliasRoutedSessionArtifactsOrderByNullable.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.ListAliasRoutedSessionArtifactsOrderByNullable.g.cs new file mode 100644 index 00000000..ab3d21ad --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.ListAliasRoutedSessionArtifactsOrderByNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Vectara.JsonConverters +{ + /// + public sealed class ListAliasRoutedSessionArtifactsOrderByNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Vectara.ListAliasRoutedSessionArtifactsOrderBy? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::Vectara.ListAliasRoutedSessionArtifactsOrderByExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Vectara.ListAliasRoutedSessionArtifactsOrderBy)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Vectara.ListAliasRoutedSessionArtifactsOrderBy?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Vectara.ListAliasRoutedSessionArtifactsOrderBy? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::Vectara.ListAliasRoutedSessionArtifactsOrderByExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.ListAliasRoutedSessionArtifactsSortBy.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.ListAliasRoutedSessionArtifactsSortBy.g.cs new file mode 100644 index 00000000..1a82e508 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.ListAliasRoutedSessionArtifactsSortBy.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Vectara.JsonConverters +{ + /// + public sealed class ListAliasRoutedSessionArtifactsSortByJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Vectara.ListAliasRoutedSessionArtifactsSortBy Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::Vectara.ListAliasRoutedSessionArtifactsSortByExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Vectara.ListAliasRoutedSessionArtifactsSortBy)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Vectara.ListAliasRoutedSessionArtifactsSortBy); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Vectara.ListAliasRoutedSessionArtifactsSortBy value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Vectara.ListAliasRoutedSessionArtifactsSortByExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.ListAliasRoutedSessionArtifactsSortByNullable.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.ListAliasRoutedSessionArtifactsSortByNullable.g.cs new file mode 100644 index 00000000..0ab4d3de --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.ListAliasRoutedSessionArtifactsSortByNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Vectara.JsonConverters +{ + /// + public sealed class ListAliasRoutedSessionArtifactsSortByNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Vectara.ListAliasRoutedSessionArtifactsSortBy? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::Vectara.ListAliasRoutedSessionArtifactsSortByExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Vectara.ListAliasRoutedSessionArtifactsSortBy)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Vectara.ListAliasRoutedSessionArtifactsSortBy?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Vectara.ListAliasRoutedSessionArtifactsSortBy? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::Vectara.ListAliasRoutedSessionArtifactsSortByExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.LlmType.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.LlmType.g.cs new file mode 100644 index 00000000..29675efd --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.LlmType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Vectara.JsonConverters +{ + /// + public sealed class LlmTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Vectara.LlmType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::Vectara.LlmTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Vectara.LlmType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Vectara.LlmType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Vectara.LlmType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Vectara.LlmTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.LlmTypeNullable.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.LlmTypeNullable.g.cs new file mode 100644 index 00000000..da1e9553 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.LlmTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Vectara.JsonConverters +{ + /// + public sealed class LlmTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Vectara.LlmType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::Vectara.LlmTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Vectara.LlmType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Vectara.LlmType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Vectara.LlmType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::Vectara.LlmTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.PipelineSource.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.PipelineSource.g.cs index a8d99300..9b6edaeb 100644 --- a/src/libs/Vectara/Generated/Vectara.JsonConverters.PipelineSource.g.cs +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.PipelineSource.g.cs @@ -28,6 +28,13 @@ public class PipelineSourceJsonConverter : global::System.Text.Json.Serializatio throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Vectara.S3SourceConfiguration)}"); s3 = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } + global::Vectara.GoogleDriveSourceConfiguration? googleDrive = default; + if (discriminator?.Type == global::Vectara.PipelineSourceDiscriminatorType.GoogleDrive) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.GoogleDriveSourceConfiguration), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Vectara.GoogleDriveSourceConfiguration)}"); + googleDrive = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } global::Vectara.WebSourceConfiguration? web = default; if (discriminator?.Type == global::Vectara.PipelineSourceDiscriminatorType.Web) { @@ -40,6 +47,8 @@ public class PipelineSourceJsonConverter : global::System.Text.Json.Serializatio discriminator?.Type, s3, + googleDrive, + web ); @@ -61,6 +70,12 @@ public override void Write( throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.S3SourceConfiguration).Name}"); global::System.Text.Json.JsonSerializer.Serialize(writer, value.S3!.Value, typeInfo); } + else if (value.IsGoogleDrive) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.GoogleDriveSourceConfiguration), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.GoogleDriveSourceConfiguration).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.GoogleDrive!.Value, typeInfo); + } else if (value.IsWeb) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.WebSourceConfiguration), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.RuleTargets.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.RuleTargets.g.cs new file mode 100644 index 00000000..4a600cda --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.RuleTargets.g.cs @@ -0,0 +1,72 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace Vectara.JsonConverters +{ + /// + public class RuleTargetsJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Vectara.RuleTargets 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.RuleTargetsDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Vectara.RuleTargetsDiscriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); + + global::Vectara.SingleRuleTargets? single = default; + if (discriminator?.Type == global::Vectara.RuleTargetsDiscriminatorType.Single) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.SingleRuleTargets), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Vectara.SingleRuleTargets)}"); + single = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::Vectara.WeightedRuleTargets? weighted = default; + if (discriminator?.Type == global::Vectara.RuleTargetsDiscriminatorType.Weighted) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.WeightedRuleTargets), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Vectara.WeightedRuleTargets)}"); + weighted = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + var __value = new global::Vectara.RuleTargets( + discriminator?.Type, + single, + + weighted + ); + + return __value; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Vectara.RuleTargets 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.IsSingle) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.SingleRuleTargets), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.SingleRuleTargets).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Single!, typeInfo); + } + else if (value.IsWeighted) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.WeightedRuleTargets), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.WeightedRuleTargets).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Weighted!, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.RuleTargetsDiscriminatorType.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.RuleTargetsDiscriminatorType.g.cs new file mode 100644 index 00000000..624a8e52 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.RuleTargetsDiscriminatorType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Vectara.JsonConverters +{ + /// + public sealed class RuleTargetsDiscriminatorTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Vectara.RuleTargetsDiscriminatorType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::Vectara.RuleTargetsDiscriminatorTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Vectara.RuleTargetsDiscriminatorType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Vectara.RuleTargetsDiscriminatorType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Vectara.RuleTargetsDiscriminatorType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Vectara.RuleTargetsDiscriminatorTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.RuleTargetsDiscriminatorTypeNullable.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.RuleTargetsDiscriminatorTypeNullable.g.cs new file mode 100644 index 00000000..2d87a54d --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.RuleTargetsDiscriminatorTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Vectara.JsonConverters +{ + /// + public sealed class RuleTargetsDiscriminatorTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Vectara.RuleTargetsDiscriminatorType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::Vectara.RuleTargetsDiscriminatorTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Vectara.RuleTargetsDiscriminatorType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Vectara.RuleTargetsDiscriminatorType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Vectara.RuleTargetsDiscriminatorType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::Vectara.RuleTargetsDiscriminatorTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.UpdateGoogleDriveSourceConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.UpdateGoogleDriveSourceConfiguration.g.cs new file mode 100644 index 00000000..bbd5b103 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.UpdateGoogleDriveSourceConfiguration.g.cs @@ -0,0 +1,100 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace Vectara.JsonConverters +{ + /// + public class UpdateGoogleDriveSourceConfigurationJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Vectara.UpdateGoogleDriveSourceConfiguration 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("client_email")) __score0++; + if (__jsonProps.Contains("private_key")) __score0++; + if (__jsonProps.Contains("scopes")) __score0++; + if (__jsonProps.Contains("type")) __score0++; + var __bestScore = 0; + var __bestIndex = -1; + if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; } + + global::Vectara.BaseGoogleDriveSourceConfiguration? @base = default; + if (__bestIndex >= 0) + { + if (__bestIndex == 0) + { + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.BaseGoogleDriveSourceConfiguration), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.BaseGoogleDriveSourceConfiguration).Name}"); + @base = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + } + + if (@base == null) + { + try + { + + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.BaseGoogleDriveSourceConfiguration), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.BaseGoogleDriveSourceConfiguration).Name}"); + @base = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + + var __value = new global::Vectara.UpdateGoogleDriveSourceConfiguration( + @base + ); + + return __value; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Vectara.UpdateGoogleDriveSourceConfiguration 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.BaseGoogleDriveSourceConfiguration), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.BaseGoogleDriveSourceConfiguration).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Base!, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.UpdatePipelineSource.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.UpdatePipelineSource.g.cs index c24070cf..eca862bd 100644 --- a/src/libs/Vectara/Generated/Vectara.JsonConverters.UpdatePipelineSource.g.cs +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.UpdatePipelineSource.g.cs @@ -28,6 +28,13 @@ public class UpdatePipelineSourceJsonConverter : global::System.Text.Json.Serial throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Vectara.UpdateS3SourceConfiguration)}"); s3 = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } + global::Vectara.UpdateGoogleDriveSourceConfiguration? googleDrive = default; + if (discriminator?.Type == global::Vectara.UpdatePipelineSourceDiscriminatorType.GoogleDrive) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.UpdateGoogleDriveSourceConfiguration), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Vectara.UpdateGoogleDriveSourceConfiguration)}"); + googleDrive = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } global::Vectara.UpdateWebSourceConfiguration? web = default; if (discriminator?.Type == global::Vectara.UpdatePipelineSourceDiscriminatorType.Web) { @@ -40,6 +47,8 @@ public class UpdatePipelineSourceJsonConverter : global::System.Text.Json.Serial discriminator?.Type, s3, + googleDrive, + web ); @@ -61,6 +70,12 @@ public override void Write( throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.UpdateS3SourceConfiguration).Name}"); global::System.Text.Json.JsonSerializer.Serialize(writer, value.S3!.Value, typeInfo); } + else if (value.IsGoogleDrive) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.UpdateGoogleDriveSourceConfiguration), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.UpdateGoogleDriveSourceConfiguration).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.GoogleDrive!.Value, typeInfo); + } else if (value.IsWeb) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.UpdateWebSourceConfiguration), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? diff --git a/src/libs/Vectara/Generated/Vectara.JsonSerializerContext.g.cs b/src/libs/Vectara/Generated/Vectara.JsonSerializerContext.g.cs index 54a063fc..adf67cd6 100644 --- a/src/libs/Vectara/Generated/Vectara.JsonSerializerContext.g.cs +++ b/src/libs/Vectara/Generated/Vectara.JsonSerializerContext.g.cs @@ -85,6 +85,14 @@ namespace Vectara typeof(global::Vectara.JsonConverters.LLMOwnershipNullableJsonConverter), + typeof(global::Vectara.JsonConverters.LLMAuthDiscriminatorTypeJsonConverter), + + typeof(global::Vectara.JsonConverters.LLMAuthDiscriminatorTypeNullableJsonConverter), + + typeof(global::Vectara.JsonConverters.LlmTypeJsonConverter), + + typeof(global::Vectara.JsonConverters.LlmTypeNullableJsonConverter), + typeof(global::Vectara.JsonConverters.RemoteAuthDiscriminatorTypeJsonConverter), typeof(global::Vectara.JsonConverters.RemoteAuthDiscriminatorTypeNullableJsonConverter), @@ -337,10 +345,22 @@ namespace Vectara typeof(global::Vectara.JsonConverters.CreateAgentConnectorRequestTypeNullableJsonConverter), + typeof(global::Vectara.JsonConverters.RuleTargetsDiscriminatorTypeJsonConverter), + + typeof(global::Vectara.JsonConverters.RuleTargetsDiscriminatorTypeNullableJsonConverter), + + typeof(global::Vectara.JsonConverters.AliasPolicyDiscriminatorTypeJsonConverter), + + typeof(global::Vectara.JsonConverters.AliasPolicyDiscriminatorTypeNullableJsonConverter), + typeof(global::Vectara.JsonConverters.PipelineStatusJsonConverter), typeof(global::Vectara.JsonConverters.PipelineStatusNullableJsonConverter), + typeof(global::Vectara.JsonConverters.GoogleDriveScopeDiscriminatorTypeJsonConverter), + + typeof(global::Vectara.JsonConverters.GoogleDriveScopeDiscriminatorTypeNullableJsonConverter), + typeof(global::Vectara.JsonConverters.WebPagesSourceDiscriminatorTypeJsonConverter), typeof(global::Vectara.JsonConverters.WebPagesSourceDiscriminatorTypeNullableJsonConverter), @@ -457,6 +477,14 @@ namespace Vectara typeof(global::Vectara.JsonConverters.ListAgentConnectorsTypeNullableJsonConverter), + typeof(global::Vectara.JsonConverters.ListAliasRoutedSessionArtifactsSortByJsonConverter), + + typeof(global::Vectara.JsonConverters.ListAliasRoutedSessionArtifactsSortByNullableJsonConverter), + + typeof(global::Vectara.JsonConverters.ListAliasRoutedSessionArtifactsOrderByJsonConverter), + + typeof(global::Vectara.JsonConverters.ListAliasRoutedSessionArtifactsOrderByNullableJsonConverter), + typeof(global::Vectara.JsonConverters.ListPipelinesSourceTypeJsonConverter), typeof(global::Vectara.JsonConverters.ListPipelinesSourceTypeNullableJsonConverter), @@ -501,6 +529,8 @@ namespace Vectara typeof(global::Vectara.JsonConverters.ChatStreamedResponseJsonConverter), + typeof(global::Vectara.JsonConverters.LLMAuthJsonConverter), + typeof(global::Vectara.JsonConverters.RemoteAuthJsonConverter), typeof(global::Vectara.JsonConverters.CreateOpenAILLMRequestJsonConverter), @@ -663,8 +693,16 @@ namespace Vectara typeof(global::Vectara.JsonConverters.ConnectorConfigurationJsonConverter), + typeof(global::Vectara.JsonConverters.RuleTargetsJsonConverter), + + typeof(global::Vectara.JsonConverters.AliasPolicyJsonConverter), + typeof(global::Vectara.JsonConverters.S3SourceConfigurationJsonConverter), + typeof(global::Vectara.JsonConverters.GoogleDriveScopeJsonConverter), + + typeof(global::Vectara.JsonConverters.GoogleDriveSourceConfigurationJsonConverter), + typeof(global::Vectara.JsonConverters.CrawlPagesSourceJsonConverter), typeof(global::Vectara.JsonConverters.SitemapCrawlPagesSourceJsonConverter), @@ -681,6 +719,8 @@ namespace Vectara typeof(global::Vectara.JsonConverters.UpdateS3SourceConfigurationJsonConverter), + typeof(global::Vectara.JsonConverters.UpdateGoogleDriveSourceConfigurationJsonConverter), + typeof(global::Vectara.JsonConverters.UpdateWebSourceConfigurationJsonConverter), typeof(global::Vectara.JsonConverters.UpdatePipelineSourceJsonConverter), @@ -949,14 +989,24 @@ namespace Vectara [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.UpdateTurnRequest))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.LLMCapabilities))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.LLMOwnership), TypeInfoPropertyName = "LLMOwnership2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.BearerAuth))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.HeaderAuth))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.OAuthClientCredentialsAuth))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.BedrockStaticIAMAuth))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.BedrockApiKeyAuth))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.VertexServiceAccountAuth))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.VertexAccessTokenAuth))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.VertexAiApiKeyAuth))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.VertexAiServiceAccountAuth))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.LLMAuth), TypeInfoPropertyName = "LLMAuth2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.LLMAuthDiscriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.LLMAuthDiscriminatorType), TypeInfoPropertyName = "LLMAuthDiscriminatorType2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.Prompt))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.Llm))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.LlmType), TypeInfoPropertyName = "LlmType2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.ListLLMsResponse))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.BearerAuth))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.HeaderAuth))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.OAuthClientCredentialsAuth))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.RemoteAuth), TypeInfoPropertyName = "RemoteAuth2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.RemoteAuthDiscriminator))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.RemoteAuthDiscriminatorType), TypeInfoPropertyName = "RemoteAuthDiscriminatorType2")] @@ -965,16 +1015,10 @@ namespace Vectara [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.CreateOpenAILLMRequestVariant2))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.CreateOpenAIResponsesLLMRequest), TypeInfoPropertyName = "CreateOpenAIResponsesLLMRequest2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.CreateOpenAIResponsesLLMRequestVariant2))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.VertexAiApiKeyAuth))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.VertexAiServiceAccountAuth))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.VertexAiAuth), TypeInfoPropertyName = "VertexAiAuth2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.VertexAiAuthDiscriminator))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.VertexAiAuthDiscriminatorType), TypeInfoPropertyName = "VertexAiAuthDiscriminatorType2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.CreateVertexAILLMRequest))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.BedrockStaticIAMAuth))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.BedrockApiKeyAuth))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.VertexServiceAccountAuth))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.VertexAccessTokenAuth))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.AnthropicAuth), TypeInfoPropertyName = "AnthropicAuth2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.AnthropicAuthDiscriminator))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.AnthropicAuthDiscriminatorType), TypeInfoPropertyName = "AnthropicAuthDiscriminatorType2")] @@ -1273,10 +1317,6 @@ namespace Vectara [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.ListAgentsResponse))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.CreateAgentRequest))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.UpdateFirstAgentStep))] internal sealed partial class SourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext { } @@ -1360,6 +1400,14 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex typeof(global::Vectara.JsonConverters.LLMOwnershipNullableJsonConverter), + typeof(global::Vectara.JsonConverters.LLMAuthDiscriminatorTypeJsonConverter), + + typeof(global::Vectara.JsonConverters.LLMAuthDiscriminatorTypeNullableJsonConverter), + + typeof(global::Vectara.JsonConverters.LlmTypeJsonConverter), + + typeof(global::Vectara.JsonConverters.LlmTypeNullableJsonConverter), + typeof(global::Vectara.JsonConverters.RemoteAuthDiscriminatorTypeJsonConverter), typeof(global::Vectara.JsonConverters.RemoteAuthDiscriminatorTypeNullableJsonConverter), @@ -1612,10 +1660,22 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex typeof(global::Vectara.JsonConverters.CreateAgentConnectorRequestTypeNullableJsonConverter), + typeof(global::Vectara.JsonConverters.RuleTargetsDiscriminatorTypeJsonConverter), + + typeof(global::Vectara.JsonConverters.RuleTargetsDiscriminatorTypeNullableJsonConverter), + + typeof(global::Vectara.JsonConverters.AliasPolicyDiscriminatorTypeJsonConverter), + + typeof(global::Vectara.JsonConverters.AliasPolicyDiscriminatorTypeNullableJsonConverter), + typeof(global::Vectara.JsonConverters.PipelineStatusJsonConverter), typeof(global::Vectara.JsonConverters.PipelineStatusNullableJsonConverter), + typeof(global::Vectara.JsonConverters.GoogleDriveScopeDiscriminatorTypeJsonConverter), + + typeof(global::Vectara.JsonConverters.GoogleDriveScopeDiscriminatorTypeNullableJsonConverter), + typeof(global::Vectara.JsonConverters.WebPagesSourceDiscriminatorTypeJsonConverter), typeof(global::Vectara.JsonConverters.WebPagesSourceDiscriminatorTypeNullableJsonConverter), @@ -1732,6 +1792,14 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex typeof(global::Vectara.JsonConverters.ListAgentConnectorsTypeNullableJsonConverter), + typeof(global::Vectara.JsonConverters.ListAliasRoutedSessionArtifactsSortByJsonConverter), + + typeof(global::Vectara.JsonConverters.ListAliasRoutedSessionArtifactsSortByNullableJsonConverter), + + typeof(global::Vectara.JsonConverters.ListAliasRoutedSessionArtifactsOrderByJsonConverter), + + typeof(global::Vectara.JsonConverters.ListAliasRoutedSessionArtifactsOrderByNullableJsonConverter), + typeof(global::Vectara.JsonConverters.ListPipelinesSourceTypeJsonConverter), typeof(global::Vectara.JsonConverters.ListPipelinesSourceTypeNullableJsonConverter), @@ -1776,6 +1844,8 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex typeof(global::Vectara.JsonConverters.ChatStreamedResponseJsonConverter), + typeof(global::Vectara.JsonConverters.LLMAuthJsonConverter), + typeof(global::Vectara.JsonConverters.RemoteAuthJsonConverter), typeof(global::Vectara.JsonConverters.CreateOpenAILLMRequestJsonConverter), @@ -1938,8 +2008,16 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex typeof(global::Vectara.JsonConverters.ConnectorConfigurationJsonConverter), + typeof(global::Vectara.JsonConverters.RuleTargetsJsonConverter), + + typeof(global::Vectara.JsonConverters.AliasPolicyJsonConverter), + typeof(global::Vectara.JsonConverters.S3SourceConfigurationJsonConverter), + typeof(global::Vectara.JsonConverters.GoogleDriveScopeJsonConverter), + + typeof(global::Vectara.JsonConverters.GoogleDriveSourceConfigurationJsonConverter), + typeof(global::Vectara.JsonConverters.CrawlPagesSourceJsonConverter), typeof(global::Vectara.JsonConverters.SitemapCrawlPagesSourceJsonConverter), @@ -1956,6 +2034,8 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex typeof(global::Vectara.JsonConverters.UpdateS3SourceConfigurationJsonConverter), + typeof(global::Vectara.JsonConverters.UpdateGoogleDriveSourceConfigurationJsonConverter), + typeof(global::Vectara.JsonConverters.UpdateWebSourceConfigurationJsonConverter), typeof(global::Vectara.JsonConverters.UpdatePipelineSourceJsonConverter), @@ -2052,6 +2132,10 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex typeof(global::Vectara.JsonConverters.UnixTimestampJsonConverter), })] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.ListAgentsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.CreateAgentRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.UpdateFirstAgentStep))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.UpdateAgentStep))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.UpdateAgentRequest))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] @@ -2064,6 +2148,7 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.CreateAgentSessionRequest))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.CreateAgentSessionRequestFromSession))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.UpdateAgentSessionRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary), TypeInfoPropertyName = "DictionaryStringString_System_Collections_Generic_Dictionary_string_string_3")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.AgentEventBase))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.AgentTextInput))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.AgentSkillInput))] @@ -2160,7 +2245,6 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.AgentSecrets))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.ReplaceAgentSecretsRequest))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.UpdateAgentSecretsRequest))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary), TypeInfoPropertyName = "DictionaryStringString_System_Collections_Generic_Dictionary_string_string_3")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.SlackConnectorConfiguration))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.ConnectorConfiguration), TypeInfoPropertyName = "ConnectorConfiguration2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.ConnectorConfigurationDiscriminator))] @@ -2173,9 +2257,36 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.CreateAgentConnectorRequest))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.CreateAgentConnectorRequestType), TypeInfoPropertyName = "CreateAgentConnectorRequestType2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.UpdateAgentConnectorRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.SingleRuleTargets))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.WeightedTarget))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.WeightedRuleTargets))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.RuleTargets), TypeInfoPropertyName = "RuleTargets2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.RuleTargetsDiscriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.RuleTargetsDiscriminatorType), TypeInfoPropertyName = "RuleTargetsDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.AliasRule))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.RoutedAliasPolicy))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.AliasPolicy), TypeInfoPropertyName = "AliasPolicy2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.AliasPolicyDiscriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.AliasPolicyDiscriminatorType), TypeInfoPropertyName = "AliasPolicyDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.AgentAlias))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.ListAgentAliasesResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.CreateAgentAliasRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.UpdateAgentAliasRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.ReplaceAliasPolicyRequest))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.PipelineStatus), TypeInfoPropertyName = "PipelineStatus2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.BaseS3SourceConfiguration))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.S3SourceConfiguration), TypeInfoPropertyName = "S3SourceConfiguration2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.SharedGoogleDriveScope))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.MyGoogleDriveScope))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.GoogleDriveScope), TypeInfoPropertyName = "GoogleDriveScope2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.GoogleDriveScopeDiscriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.GoogleDriveScopeDiscriminatorType), TypeInfoPropertyName = "GoogleDriveScopeDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.BaseGoogleDriveSourceConfiguration))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.GoogleDriveSourceConfiguration), TypeInfoPropertyName = "GoogleDriveSourceConfiguration2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.BaseWebSource))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.SitemapPagesSource))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.BaseCrawlPagesSource))] @@ -2213,6 +2324,7 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.CreatePipelineRequest))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.UpdateS3SourceConfiguration), TypeInfoPropertyName = "UpdateS3SourceConfiguration2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.UpdateGoogleDriveSourceConfiguration), TypeInfoPropertyName = "UpdateGoogleDriveSourceConfiguration2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.UpdateWebSourceConfiguration), TypeInfoPropertyName = "UpdateWebSourceConfiguration2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.UpdateWebSourceConfigurationVariant2))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.UpdatePipelineSource), TypeInfoPropertyName = "UpdatePipelineSource2")] @@ -2350,6 +2462,8 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.ListSessionArtifactsSortBy), TypeInfoPropertyName = "ListSessionArtifactsSortBy2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.ListSessionArtifactsOrderBy), TypeInfoPropertyName = "ListSessionArtifactsOrderBy2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.ListAgentConnectorsType), TypeInfoPropertyName = "ListAgentConnectorsType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.ListAliasRoutedSessionArtifactsSortBy), TypeInfoPropertyName = "ListAliasRoutedSessionArtifactsSortBy2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.ListAliasRoutedSessionArtifactsOrderBy), TypeInfoPropertyName = "ListAliasRoutedSessionArtifactsOrderBy2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.ListPipelinesSourceType), TypeInfoPropertyName = "ListPipelinesSourceType2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.ListTracesStatus), TypeInfoPropertyName = "ListTracesStatus2")] @@ -2426,6 +2540,10 @@ 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))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] @@ -2522,6 +2640,10 @@ private SourceGenerationContext(global::System.Text.Json.JsonSerializerOptions o options.Converters.Add(new global::Vectara.JsonConverters.ChatStreamedResponseDiscriminatorTypeNullableJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.LLMOwnershipJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.LLMOwnershipNullableJsonConverter()); + options.Converters.Add(new global::Vectara.JsonConverters.LLMAuthDiscriminatorTypeJsonConverter()); + options.Converters.Add(new global::Vectara.JsonConverters.LLMAuthDiscriminatorTypeNullableJsonConverter()); + options.Converters.Add(new global::Vectara.JsonConverters.LlmTypeJsonConverter()); + options.Converters.Add(new global::Vectara.JsonConverters.LlmTypeNullableJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.RemoteAuthDiscriminatorTypeJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.RemoteAuthDiscriminatorTypeNullableJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.VertexAiAuthDiscriminatorTypeJsonConverter()); @@ -2648,8 +2770,14 @@ private SourceGenerationContext(global::System.Text.Json.JsonSerializerOptions o options.Converters.Add(new global::Vectara.JsonConverters.AgentConnectorStatusNullableJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.CreateAgentConnectorRequestTypeJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.CreateAgentConnectorRequestTypeNullableJsonConverter()); + options.Converters.Add(new global::Vectara.JsonConverters.RuleTargetsDiscriminatorTypeJsonConverter()); + options.Converters.Add(new global::Vectara.JsonConverters.RuleTargetsDiscriminatorTypeNullableJsonConverter()); + options.Converters.Add(new global::Vectara.JsonConverters.AliasPolicyDiscriminatorTypeJsonConverter()); + options.Converters.Add(new global::Vectara.JsonConverters.AliasPolicyDiscriminatorTypeNullableJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.PipelineStatusJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.PipelineStatusNullableJsonConverter()); + options.Converters.Add(new global::Vectara.JsonConverters.GoogleDriveScopeDiscriminatorTypeJsonConverter()); + options.Converters.Add(new global::Vectara.JsonConverters.GoogleDriveScopeDiscriminatorTypeNullableJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.WebPagesSourceDiscriminatorTypeJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.WebPagesSourceDiscriminatorTypeNullableJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.PipelineSourceDiscriminatorTypeJsonConverter()); @@ -2708,6 +2836,10 @@ private SourceGenerationContext(global::System.Text.Json.JsonSerializerOptions o options.Converters.Add(new global::Vectara.JsonConverters.ListSessionArtifactsOrderByNullableJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.ListAgentConnectorsTypeJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.ListAgentConnectorsTypeNullableJsonConverter()); + options.Converters.Add(new global::Vectara.JsonConverters.ListAliasRoutedSessionArtifactsSortByJsonConverter()); + options.Converters.Add(new global::Vectara.JsonConverters.ListAliasRoutedSessionArtifactsSortByNullableJsonConverter()); + options.Converters.Add(new global::Vectara.JsonConverters.ListAliasRoutedSessionArtifactsOrderByJsonConverter()); + options.Converters.Add(new global::Vectara.JsonConverters.ListAliasRoutedSessionArtifactsOrderByNullableJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.ListPipelinesSourceTypeJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.ListPipelinesSourceTypeNullableJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.ListTracesStatusJsonConverter()); @@ -2730,6 +2862,7 @@ private SourceGenerationContext(global::System.Text.Json.JsonSerializerOptions o options.Converters.Add(new global::Vectara.JsonConverters.SearchCorporaParametersJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.QueryHistorySpanJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.ChatStreamedResponseJsonConverter()); + options.Converters.Add(new global::Vectara.JsonConverters.LLMAuthJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.RemoteAuthJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.CreateOpenAILLMRequestJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.CreateOpenAIResponsesLLMRequestJsonConverter()); @@ -2811,7 +2944,11 @@ private SourceGenerationContext(global::System.Text.Json.JsonSerializerOptions o options.Converters.Add(new global::Vectara.JsonConverters.AgentStreamedResponseJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.ScheduleConfigurationJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.ConnectorConfigurationJsonConverter()); + options.Converters.Add(new global::Vectara.JsonConverters.RuleTargetsJsonConverter()); + options.Converters.Add(new global::Vectara.JsonConverters.AliasPolicyJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.S3SourceConfigurationJsonConverter()); + options.Converters.Add(new global::Vectara.JsonConverters.GoogleDriveScopeJsonConverter()); + options.Converters.Add(new global::Vectara.JsonConverters.GoogleDriveSourceConfigurationJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.CrawlPagesSourceJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.SitemapCrawlPagesSourceJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.WebPagesSourceJsonConverter()); @@ -2820,6 +2957,7 @@ private SourceGenerationContext(global::System.Text.Json.JsonSerializerOptions o options.Converters.Add(new global::Vectara.JsonConverters.PipelineTriggerJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.PipelineVerificationJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.UpdateS3SourceConfigurationJsonConverter()); + options.Converters.Add(new global::Vectara.JsonConverters.UpdateGoogleDriveSourceConfigurationJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.UpdateWebSourceConfigurationJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.UpdatePipelineSourceJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.RunStartedEventJsonConverter()); diff --git a/src/libs/Vectara/Generated/Vectara.JsonSerializerContextTypes.g.cs b/src/libs/Vectara/Generated/Vectara.JsonSerializerContextTypes.g.cs index 378e5344..7be6bab2 100644 --- a/src/libs/Vectara/Generated/Vectara.JsonSerializerContextTypes.g.cs +++ b/src/libs/Vectara/Generated/Vectara.JsonSerializerContextTypes.g.cs @@ -708,2547 +708,2683 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::Vectara.Prompt? Type170 { get; set; } + public global::Vectara.BearerAuth? Type170 { get; set; } /// /// /// - public global::Vectara.Llm? Type171 { get; set; } + public global::Vectara.HeaderAuth? Type171 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type172 { get; set; } + public global::Vectara.OAuthClientCredentialsAuth? Type172 { get; set; } /// /// /// - public global::Vectara.ListLLMsResponse? Type173 { get; set; } + public global::Vectara.BedrockStaticIAMAuth? Type173 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type174 { get; set; } + public global::Vectara.BedrockApiKeyAuth? Type174 { get; set; } /// /// /// - public global::Vectara.BearerAuth? Type175 { get; set; } + public global::Vectara.VertexServiceAccountAuth? Type175 { get; set; } /// /// /// - public global::Vectara.HeaderAuth? Type176 { get; set; } + public global::Vectara.VertexAccessTokenAuth? Type176 { get; set; } /// /// /// - public global::Vectara.OAuthClientCredentialsAuth? Type177 { get; set; } + public global::Vectara.VertexAiApiKeyAuth? Type177 { get; set; } /// /// /// - public global::Vectara.RemoteAuth? Type178 { get; set; } + public global::Vectara.VertexAiServiceAccountAuth? Type178 { get; set; } /// /// /// - public global::Vectara.RemoteAuthDiscriminator? Type179 { get; set; } + public global::Vectara.LLMAuth? Type179 { get; set; } /// /// /// - public global::Vectara.RemoteAuthDiscriminatorType? Type180 { get; set; } + public global::Vectara.LLMAuthDiscriminator? Type180 { get; set; } /// /// /// - public global::Vectara.OpenAILLMRequestBase? Type181 { get; set; } + public global::Vectara.LLMAuthDiscriminatorType? Type181 { get; set; } /// /// /// - public global::Vectara.CreateOpenAILLMRequest? Type182 { get; set; } + public global::Vectara.Prompt? Type182 { get; set; } /// /// /// - public global::Vectara.CreateOpenAILLMRequestVariant2? Type183 { get; set; } + public global::Vectara.Llm? Type183 { get; set; } /// /// /// - public global::Vectara.CreateOpenAIResponsesLLMRequest? Type184 { get; set; } + public global::Vectara.LlmType? Type184 { get; set; } /// /// /// - public global::Vectara.CreateOpenAIResponsesLLMRequestVariant2? Type185 { get; set; } + public global::System.Collections.Generic.IList? Type185 { get; set; } /// /// /// - public global::Vectara.VertexAiApiKeyAuth? Type186 { get; set; } + public global::Vectara.ListLLMsResponse? Type186 { get; set; } /// /// /// - public global::Vectara.VertexAiServiceAccountAuth? Type187 { get; set; } + public global::System.Collections.Generic.IList? Type187 { get; set; } /// /// /// - public global::Vectara.VertexAiAuth? Type188 { get; set; } + public global::Vectara.RemoteAuth? Type188 { get; set; } /// /// /// - public global::Vectara.VertexAiAuthDiscriminator? Type189 { get; set; } + public global::Vectara.RemoteAuthDiscriminator? Type189 { get; set; } /// /// /// - public global::Vectara.VertexAiAuthDiscriminatorType? Type190 { get; set; } + public global::Vectara.RemoteAuthDiscriminatorType? Type190 { get; set; } /// /// /// - public global::Vectara.CreateVertexAILLMRequest? Type191 { get; set; } + public global::Vectara.OpenAILLMRequestBase? Type191 { get; set; } /// /// /// - public global::Vectara.BedrockStaticIAMAuth? Type192 { get; set; } + public global::Vectara.CreateOpenAILLMRequest? Type192 { get; set; } /// /// /// - public global::Vectara.BedrockApiKeyAuth? Type193 { get; set; } + public global::Vectara.CreateOpenAILLMRequestVariant2? Type193 { get; set; } /// /// /// - public global::Vectara.VertexServiceAccountAuth? Type194 { get; set; } + public global::Vectara.CreateOpenAIResponsesLLMRequest? Type194 { get; set; } /// /// /// - public global::Vectara.VertexAccessTokenAuth? Type195 { get; set; } + public global::Vectara.CreateOpenAIResponsesLLMRequestVariant2? Type195 { get; set; } /// /// /// - public global::Vectara.AnthropicAuth? Type196 { get; set; } + public global::Vectara.VertexAiAuth? Type196 { get; set; } /// /// /// - public global::Vectara.AnthropicAuthDiscriminator? Type197 { get; set; } + public global::Vectara.VertexAiAuthDiscriminator? Type197 { get; set; } /// /// /// - public global::Vectara.AnthropicAuthDiscriminatorType? Type198 { get; set; } + public global::Vectara.VertexAiAuthDiscriminatorType? Type198 { get; set; } /// /// /// - public global::Vectara.CreateAnthropicLLMRequest? Type199 { get; set; } + public global::Vectara.CreateVertexAILLMRequest? Type199 { get; set; } /// /// /// - public global::Vectara.CreateLLMRequest? Type200 { get; set; } + public global::Vectara.AnthropicAuth? Type200 { get; set; } /// /// /// - public global::Vectara.CreateLLMRequestDiscriminator? Type201 { get; set; } + public global::Vectara.AnthropicAuthDiscriminator? Type201 { get; set; } /// /// /// - public global::Vectara.CreateLLMRequestDiscriminatorType? Type202 { get; set; } + public global::Vectara.AnthropicAuthDiscriminatorType? Type202 { get; set; } /// /// /// - public global::Vectara.OpenAILLMUpdateBase? Type203 { get; set; } + public global::Vectara.CreateAnthropicLLMRequest? Type203 { get; set; } /// /// /// - public global::Vectara.UpdateOpenAILLMRequest? Type204 { get; set; } + public global::Vectara.CreateLLMRequest? Type204 { get; set; } /// /// /// - public global::Vectara.UpdateOpenAILLMRequestVariant2? Type205 { get; set; } + public global::Vectara.CreateLLMRequestDiscriminator? Type205 { get; set; } /// /// /// - public global::Vectara.UpdateOpenAIResponsesLLMRequest? Type206 { get; set; } + public global::Vectara.CreateLLMRequestDiscriminatorType? Type206 { get; set; } /// /// /// - public global::Vectara.UpdateOpenAIResponsesLLMRequestVariant2? Type207 { get; set; } + public global::Vectara.OpenAILLMUpdateBase? Type207 { get; set; } /// /// /// - public global::Vectara.UpdateVertexAILLMRequest? Type208 { get; set; } + public global::Vectara.UpdateOpenAILLMRequest? Type208 { get; set; } /// /// /// - public global::Vectara.UpdateAnthropicLLMRequest? Type209 { get; set; } + public global::Vectara.UpdateOpenAILLMRequestVariant2? Type209 { get; set; } /// /// /// - public global::Vectara.UpdateLLMRequest? Type210 { get; set; } + public global::Vectara.UpdateOpenAIResponsesLLMRequest? Type210 { get; set; } /// /// /// - public global::Vectara.UpdateLLMRequestDiscriminator? Type211 { get; set; } + public global::Vectara.UpdateOpenAIResponsesLLMRequestVariant2? Type211 { get; set; } /// /// /// - public global::Vectara.UpdateLLMRequestDiscriminatorType? Type212 { get; set; } + public global::Vectara.UpdateVertexAILLMRequest? Type212 { get; set; } /// /// /// - public global::Vectara.ChatCompletionRequestMessage? Type213 { get; set; } + public global::Vectara.UpdateAnthropicLLMRequest? Type213 { get; set; } /// /// /// - public global::Vectara.JsonSchemaDefinition? Type214 { get; set; } + public global::Vectara.UpdateLLMRequest? Type214 { get; set; } /// /// /// - public global::Vectara.JsonSchemaDefinitionType? Type215 { get; set; } + public global::Vectara.UpdateLLMRequestDiscriminator? Type215 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary? Type216 { get; set; } + public global::Vectara.UpdateLLMRequestDiscriminatorType? Type216 { get; set; } /// /// /// - public global::Vectara.JsonSchemaSpec? Type217 { get; set; } + public global::Vectara.ChatCompletionRequestMessage? Type217 { get; set; } /// /// /// - public global::Vectara.ResponseFormat? Type218 { get; set; } + public global::Vectara.JsonSchemaDefinition? Type218 { get; set; } /// /// /// - public global::Vectara.ResponseFormatType? Type219 { get; set; } + public global::Vectara.JsonSchemaDefinitionType? Type219 { get; set; } /// /// /// - public global::Vectara.CreateChatCompletionRequest? Type220 { get; set; } + public global::System.Collections.Generic.Dictionary? Type220 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type221 { get; set; } + public global::Vectara.JsonSchemaSpec? Type221 { get; set; } /// /// /// - public global::Vectara.ChatCompletionResponseMessage? Type222 { get; set; } + public global::Vectara.ResponseFormat? Type222 { get; set; } /// /// /// - public global::Vectara.ChatCompletionResponseChoice? Type223 { get; set; } + public global::Vectara.ResponseFormatType? Type223 { get; set; } /// /// /// - public global::Vectara.CreateChatCompletionResponse? Type224 { get; set; } + public global::Vectara.CreateChatCompletionRequest? Type224 { get; set; } /// /// /// - public global::Vectara.CreateChatCompletionResponseObject? Type225 { get; set; } + public global::System.Collections.Generic.IList? Type225 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type226 { get; set; } + public global::Vectara.ChatCompletionResponseMessage? Type226 { get; set; } /// /// /// - public global::Vectara.ChatCompletionStreamResponseDelta? Type227 { get; set; } + public global::Vectara.ChatCompletionResponseChoice? Type227 { get; set; } /// /// /// - public global::Vectara.ChatCompletionStreamResponseChoice? Type228 { get; set; } + public global::Vectara.CreateChatCompletionResponse? Type228 { get; set; } /// /// /// - public global::Vectara.CreateChatCompletionStreamResponse? Type229 { get; set; } + public global::Vectara.CreateChatCompletionResponseObject? Type229 { get; set; } /// /// /// - public global::Vectara.CreateChatCompletionStreamResponseObject? Type230 { get; set; } + public global::System.Collections.Generic.IList? Type230 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type231 { get; set; } + public global::Vectara.ChatCompletionStreamResponseDelta? Type231 { get; set; } /// /// /// - public global::Vectara.GenerationPresetOwnership? Type232 { get; set; } + public global::Vectara.ChatCompletionStreamResponseChoice? Type232 { get; set; } /// /// /// - public global::Vectara.GenerationPreset? Type233 { get; set; } + public global::Vectara.CreateChatCompletionStreamResponse? Type233 { get; set; } /// /// /// - public global::Vectara.ListGenerationPresetsResponse? Type234 { get; set; } + public global::Vectara.CreateChatCompletionStreamResponseObject? Type234 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type235 { get; set; } + public global::System.Collections.Generic.IList? Type235 { get; set; } /// /// /// - public global::Vectara.CreateGenerationPresetRequest? Type236 { get; set; } + public global::Vectara.GenerationPresetOwnership? Type236 { get; set; } /// /// /// - public global::Vectara.EvaluateFactualConsistencyRequest? Type237 { get; set; } + public global::Vectara.GenerationPreset? Type237 { get; set; } /// /// /// - public global::Vectara.EvaluateFactualConsistencyRequestModelParameters? Type238 { get; set; } + public global::Vectara.ListGenerationPresetsResponse? Type238 { get; set; } /// /// /// - public global::Vectara.EvaluateFactualConsistencyResponse? Type239 { get; set; } + public global::System.Collections.Generic.IList? Type239 { get; set; } /// /// /// - public global::Vectara.Encoder? Type240 { get; set; } + public global::Vectara.CreateGenerationPresetRequest? Type240 { get; set; } /// /// /// - public global::Vectara.ListEncodersResponse? Type241 { get; set; } + public global::Vectara.EvaluateFactualConsistencyRequest? Type241 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type242 { get; set; } + public global::Vectara.EvaluateFactualConsistencyRequestModelParameters? Type242 { get; set; } /// /// /// - public global::Vectara.CreateOpenAIEncoderRequest? Type243 { get; set; } + public global::Vectara.EvaluateFactualConsistencyResponse? Type243 { get; set; } /// /// /// - public global::Vectara.CreateEncoderRequest? Type244 { get; set; } + public global::Vectara.Encoder? Type244 { get; set; } /// /// /// - public global::Vectara.CreateEncoderRequestDiscriminator? Type245 { get; set; } + public global::Vectara.ListEncodersResponse? Type245 { get; set; } /// /// /// - public global::Vectara.CreateEncoderRequestDiscriminatorType? Type246 { get; set; } + public global::System.Collections.Generic.IList? Type246 { get; set; } /// /// /// - public global::Vectara.Reranker? Type247 { get; set; } + public global::Vectara.CreateOpenAIEncoderRequest? Type247 { get; set; } /// /// /// - public global::Vectara.ListRerankersResponse? Type248 { get; set; } + public global::Vectara.CreateEncoderRequest? Type248 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type249 { get; set; } + public global::Vectara.CreateEncoderRequestDiscriminator? Type249 { get; set; } /// /// /// - public global::Vectara.TableExtractor? Type250 { get; set; } + public global::Vectara.CreateEncoderRequestDiscriminatorType? Type250 { get; set; } /// /// /// - public global::Vectara.ListTableExtractorsResponse? Type251 { get; set; } + public global::Vectara.Reranker? Type251 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type252 { get; set; } + public global::Vectara.ListRerankersResponse? Type252 { get; set; } /// /// /// - public global::Vectara.HallucinationCorrector? Type253 { get; set; } + public global::System.Collections.Generic.IList? Type253 { get; set; } /// /// /// - public global::Vectara.ListHallucinationCorrectorsResponse? Type254 { get; set; } + public global::Vectara.TableExtractor? Type254 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type255 { get; set; } + public global::Vectara.ListTableExtractorsResponse? Type255 { get; set; } /// /// /// - public global::Vectara.HcmSourceDocument? Type256 { get; set; } + public global::System.Collections.Generic.IList? Type256 { get; set; } /// /// /// - public global::Vectara.HallucinationCorrectionRequest? Type257 { get; set; } + public global::Vectara.HallucinationCorrector? Type257 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type258 { get; set; } + public global::Vectara.ListHallucinationCorrectorsResponse? Type258 { get; set; } /// /// /// - public global::Vectara.CorrectionItem? Type259 { get; set; } + public global::System.Collections.Generic.IList? Type259 { get; set; } /// /// /// - public global::Vectara.HallucinationCorrectionResponse? Type260 { get; set; } + public global::Vectara.HcmSourceDocument? Type260 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type261 { get; set; } + public global::Vectara.HallucinationCorrectionRequest? Type261 { get; set; } /// /// /// - public global::Vectara.JobState? Type262 { get; set; } + public global::System.Collections.Generic.IList? Type262 { get; set; } /// /// /// - public global::Vectara.Job? Type263 { get; set; } + public global::Vectara.CorrectionItem? Type263 { get; set; } /// /// /// - public global::Vectara.JobType? Type264 { get; set; } + public global::Vectara.HallucinationCorrectionResponse? Type264 { get; set; } /// /// /// - public global::Vectara.ListJobsResponse? Type265 { get; set; } + public global::System.Collections.Generic.IList? Type265 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type266 { get; set; } + public global::Vectara.JobState? Type266 { get; set; } /// /// /// - public global::Vectara.ApiRole? Type267 { get; set; } + public global::Vectara.Job? Type267 { get; set; } /// /// /// - public global::Vectara.CorpusRole? Type268 { get; set; } + public global::Vectara.JobType? Type268 { get; set; } /// /// /// - public global::Vectara.CorpusRoleRole? Type269 { get; set; } + public global::Vectara.ListJobsResponse? Type269 { get; set; } /// /// /// - public global::Vectara.AgentRole? Type270 { get; set; } + public global::System.Collections.Generic.IList? Type270 { get; set; } /// /// /// - public global::Vectara.AgentRoleRole? Type271 { get; set; } + public global::Vectara.ApiRole? Type271 { get; set; } /// /// /// - public global::Vectara.ApiOperationPolicy? Type272 { get; set; } + public global::Vectara.CorpusRole? Type272 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary>? Type273 { get; set; } + public global::Vectara.CorpusRoleRole? Type273 { get; set; } /// /// /// - public global::Vectara.ApiPolicy? Type274 { get; set; } + public global::Vectara.AgentRole? Type274 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary? Type275 { get; set; } + public global::Vectara.AgentRoleRole? Type275 { get; set; } /// /// /// - public global::Vectara.User? Type276 { get; set; } + public global::Vectara.ApiOperationPolicy? Type276 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type277 { get; set; } + public global::System.Collections.Generic.Dictionary>? Type277 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type278 { get; set; } + public global::Vectara.ApiPolicy? Type278 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type279 { get; set; } + public global::System.Collections.Generic.Dictionary? Type279 { get; set; } /// /// /// - public global::Vectara.ListUsersResponse? Type280 { get; set; } + public global::Vectara.User? Type280 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type281 { get; set; } + public global::System.Collections.Generic.IList? Type281 { get; set; } /// /// /// - public global::Vectara.CreateUserRequest? Type282 { get; set; } + public global::System.Collections.Generic.IList? Type282 { get; set; } /// /// /// - public global::Vectara.UpdateUserRequest? Type283 { get; set; } + public global::System.Collections.Generic.IList? Type283 { get; set; } /// /// /// - public global::Vectara.ApiKeyRole? Type284 { get; set; } + public global::Vectara.ListUsersResponse? Type284 { get; set; } /// /// /// - public global::Vectara.ApiKey? Type285 { get; set; } + public global::System.Collections.Generic.IList? Type285 { get; set; } /// /// /// - public global::Vectara.ListApiKeysResponse? Type286 { get; set; } + public global::Vectara.CreateUserRequest? Type286 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type287 { get; set; } + public global::Vectara.UpdateUserRequest? Type287 { get; set; } /// /// /// - public global::Vectara.CreateApiKeyRequest? Type288 { get; set; } + public global::Vectara.ApiKeyRole? Type288 { get; set; } /// /// /// - public global::Vectara.UpdateApiKeyRequest? Type289 { get; set; } + public global::Vectara.ApiKey? Type289 { get; set; } /// /// /// - public global::Vectara.AppClient? Type290 { get; set; } + public global::Vectara.ListApiKeysResponse? Type290 { get; set; } /// /// /// - public global::Vectara.ListAppClientsResponse? Type291 { get; set; } + public global::System.Collections.Generic.IList? Type291 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type292 { get; set; } + public global::Vectara.CreateApiKeyRequest? Type292 { get; set; } /// /// /// - public global::Vectara.CreateClientCredentialsRequest? Type293 { get; set; } + public global::Vectara.UpdateApiKeyRequest? Type293 { get; set; } /// /// /// - public global::Vectara.CreateAppClientRequest? Type294 { get; set; } + public global::Vectara.AppClient? Type294 { get; set; } /// /// /// - public global::Vectara.CreateAppClientRequestDiscriminator? Type295 { get; set; } + public global::Vectara.ListAppClientsResponse? Type295 { get; set; } /// /// /// - public global::Vectara.CreateAppClientRequestDiscriminatorType? Type296 { get; set; } + public global::System.Collections.Generic.IList? Type296 { get; set; } /// /// /// - public global::Vectara.UpdateAppClientRequest? Type297 { get; set; } + public global::Vectara.CreateClientCredentialsRequest? Type297 { get; set; } /// /// /// - public global::Vectara.ToolServerType? Type298 { get; set; } + public global::Vectara.CreateAppClientRequest? Type298 { get; set; } /// /// /// - public global::Vectara.ToolServerTransport? Type299 { get; set; } + public global::Vectara.CreateAppClientRequestDiscriminator? Type299 { get; set; } /// /// /// - public global::Vectara.ToolServer? Type300 { get; set; } + public global::Vectara.CreateAppClientRequestDiscriminatorType? Type300 { get; set; } /// /// /// - public global::Vectara.ListToolServersResponse? Type301 { get; set; } + public global::Vectara.UpdateAppClientRequest? Type301 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type302 { get; set; } + public global::Vectara.ToolServerType? Type302 { get; set; } /// /// /// - public global::Vectara.CreateToolServerRequest? Type303 { get; set; } + public global::Vectara.ToolServerTransport? Type303 { get; set; } /// /// /// - public global::Vectara.UpdateToolServerRequest? Type304 { get; set; } + public global::Vectara.ToolServer? Type304 { get; set; } /// /// /// - public global::Vectara.ToolBase? Type305 { get; set; } + public global::Vectara.ListToolServersResponse? Type305 { get; set; } /// /// /// - public global::Vectara.DynamicVectaraTool? Type306 { get; set; } + public global::System.Collections.Generic.IList? Type306 { get; set; } /// /// /// - public global::Vectara.DynamicVectaraToolVariant2? Type307 { get; set; } + public global::Vectara.CreateToolServerRequest? Type307 { get; set; } /// /// /// - public global::Vectara.McpToolAnnotations? Type308 { get; set; } + public global::Vectara.UpdateToolServerRequest? Type308 { get; set; } /// /// /// - public global::Vectara.McpTool? Type309 { get; set; } + public global::Vectara.ToolBase? Type309 { get; set; } /// /// /// - public global::Vectara.McpToolVariant2? Type310 { get; set; } + public global::Vectara.DynamicVectaraTool? Type310 { get; set; } /// /// /// - public global::Vectara.CorporaSearchTool? Type311 { get; set; } + public global::Vectara.DynamicVectaraToolVariant2? Type311 { get; set; } /// /// /// - public global::Vectara.CorporaSearchToolVariant2? Type312 { get; set; } + public global::Vectara.McpToolAnnotations? Type312 { get; set; } /// /// /// - public global::Vectara.WebSearchTool? Type313 { get; set; } + public global::Vectara.McpTool? Type313 { get; set; } /// /// /// - public global::Vectara.WebSearchToolVariant2? Type314 { get; set; } + public global::Vectara.McpToolVariant2? Type314 { get; set; } /// /// /// - public global::Vectara.WebGetTool? Type315 { get; set; } + public global::Vectara.CorporaSearchTool? Type315 { get; set; } /// /// /// - public global::Vectara.WebGetToolVariant2? Type316 { get; set; } + public global::Vectara.CorporaSearchToolVariant2? Type316 { get; set; } /// /// /// - public global::Vectara.ExecutionConfiguration? Type317 { get; set; } + public global::Vectara.WebSearchTool? Type317 { get; set; } /// /// /// - public global::Vectara.FunctionDefinition? Type318 { get; set; } + public global::Vectara.WebSearchToolVariant2? Type318 { get; set; } /// /// /// - public global::Vectara.FunctionDefinitionLanguage? Type319 { get; set; } + public global::Vectara.WebGetTool? Type319 { get; set; } /// /// /// - public global::Vectara.FunctionDefinitionValidationStatus? Type320 { get; set; } + public global::Vectara.WebGetToolVariant2? Type320 { get; set; } /// /// /// - public global::Vectara.LambdaTool? Type321 { get; set; } + public global::Vectara.ExecutionConfiguration? Type321 { get; set; } /// /// /// - public global::Vectara.LambdaToolVariant2? Type322 { get; set; } + public global::Vectara.FunctionDefinition? Type322 { get; set; } /// /// /// - public global::Vectara.LambdaToolVariant2Language? Type323 { get; set; } + public global::Vectara.FunctionDefinitionLanguage? Type323 { get; set; } /// /// /// - public global::Vectara.SubAgentTool? Type324 { get; set; } + public global::Vectara.FunctionDefinitionValidationStatus? Type324 { get; set; } /// /// /// - public global::Vectara.SubAgentToolVariant2? Type325 { get; set; } + public global::Vectara.LambdaTool? Type325 { get; set; } /// /// /// - public global::Vectara.ArtifactCreateTool? Type326 { get; set; } + public global::Vectara.LambdaToolVariant2? Type326 { get; set; } /// /// /// - public global::Vectara.ArtifactCreateToolVariant2? Type327 { get; set; } + public global::Vectara.LambdaToolVariant2Language? Type327 { get; set; } /// /// /// - public global::Vectara.ArtifactReadTool? Type328 { get; set; } + public global::Vectara.SubAgentTool? Type328 { get; set; } /// /// /// - public global::Vectara.ArtifactReadToolVariant2? Type329 { get; set; } + public global::Vectara.SubAgentToolVariant2? Type329 { get; set; } /// /// /// - public global::Vectara.ArtifactGrepTool? Type330 { get; set; } + public global::Vectara.ArtifactCreateTool? Type330 { get; set; } /// /// /// - public global::Vectara.ArtifactGrepToolVariant2? Type331 { get; set; } + public global::Vectara.ArtifactCreateToolVariant2? Type331 { get; set; } /// /// /// - public global::Vectara.ImageReadTool? Type332 { get; set; } + public global::Vectara.ArtifactReadTool? Type332 { get; set; } /// /// /// - public global::Vectara.ImageReadToolVariant2? Type333 { get; set; } + public global::Vectara.ArtifactReadToolVariant2? Type333 { get; set; } /// /// /// - public global::Vectara.DocumentConversionTool? Type334 { get; set; } + public global::Vectara.ArtifactGrepTool? Type334 { get; set; } /// /// /// - public global::Vectara.DocumentConversionToolVariant2? Type335 { get; set; } + public global::Vectara.ArtifactGrepToolVariant2? Type335 { get; set; } /// /// /// - public global::Vectara.GetDocumentTextTool? Type336 { get; set; } + public global::Vectara.ImageReadTool? Type336 { get; set; } /// /// /// - public global::Vectara.GetDocumentTextToolVariant2? Type337 { get; set; } + public global::Vectara.ImageReadToolVariant2? Type337 { get; set; } /// /// /// - public global::Vectara.Tool? Type338 { get; set; } + public global::Vectara.DocumentConversionTool? Type338 { get; set; } /// /// /// - public global::Vectara.ToolDiscriminator? Type339 { get; set; } + public global::Vectara.DocumentConversionToolVariant2? Type339 { get; set; } /// /// /// - public global::Vectara.ToolDiscriminatorType? Type340 { get; set; } + public global::Vectara.GetDocumentTextTool? Type340 { get; set; } /// /// /// - public global::Vectara.ListToolsResponse? Type341 { get; set; } + public global::Vectara.GetDocumentTextToolVariant2? Type341 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type342 { get; set; } + public global::Vectara.Tool? Type342 { get; set; } /// /// /// - public global::Vectara.CreateLambdaToolRequest? Type343 { get; set; } + public global::Vectara.ToolDiscriminator? Type343 { get; set; } /// /// /// - public global::Vectara.CreateLambdaToolRequestLanguage? Type344 { get; set; } + public global::Vectara.ToolDiscriminatorType? Type344 { get; set; } /// /// /// - public global::Vectara.CreateToolRequest? Type345 { get; set; } + public global::Vectara.ListToolsResponse? Type345 { get; set; } /// /// /// - public global::Vectara.CreateToolRequestDiscriminator? Type346 { get; set; } + public global::System.Collections.Generic.IList? Type346 { get; set; } /// /// /// - public global::Vectara.CreateToolRequestDiscriminatorType? Type347 { get; set; } + public global::Vectara.CreateLambdaToolRequest? Type347 { get; set; } /// /// /// - public global::Vectara.TestLambdaToolRequest? Type348 { get; set; } + public global::Vectara.CreateLambdaToolRequestLanguage? Type348 { get; set; } /// /// /// - public global::Vectara.TestLambdaToolRequestLanguage? Type349 { get; set; } + public global::Vectara.CreateToolRequest? Type349 { get; set; } /// /// /// - public global::Vectara.TestLambdaToolResponse? Type350 { get; set; } + public global::Vectara.CreateToolRequestDiscriminator? Type350 { get; set; } /// /// /// - public global::Vectara.TestLambdaToolResponseValidation? Type351 { get; set; } + public global::Vectara.CreateToolRequestDiscriminatorType? Type351 { get; set; } /// /// /// - public global::Vectara.TestLambdaToolResponseValidationStatus? Type352 { get; set; } + public global::Vectara.TestLambdaToolRequest? Type352 { get; set; } /// /// /// - public global::Vectara.TestLambdaToolResponseExecution? Type353 { get; set; } + public global::Vectara.TestLambdaToolRequestLanguage? Type353 { get; set; } /// /// /// - public global::Vectara.TestLambdaToolResponseExecutionError? Type354 { get; set; } + public global::Vectara.TestLambdaToolResponse? Type354 { get; set; } /// /// /// - public global::Vectara.TestLambdaToolResponseExecutionValidationResults? Type355 { get; set; } + public global::Vectara.TestLambdaToolResponseValidation? Type355 { get; set; } /// /// /// - public global::Vectara.UpdateMcpToolRequest? Type356 { get; set; } + public global::Vectara.TestLambdaToolResponseValidationStatus? Type356 { get; set; } /// /// /// - public global::Vectara.UpdateLambdaToolRequest? Type357 { get; set; } + public global::Vectara.TestLambdaToolResponseExecution? Type357 { get; set; } /// /// /// - public global::Vectara.UpdateToolRequest? Type358 { get; set; } + public global::Vectara.TestLambdaToolResponseExecutionError? Type358 { get; set; } /// /// /// - public global::Vectara.UpdateToolRequestDiscriminator? Type359 { get; set; } + public global::Vectara.TestLambdaToolResponseExecutionValidationResults? Type359 { get; set; } /// /// /// - public global::Vectara.UpdateToolRequestDiscriminatorType? Type360 { get; set; } + public global::Vectara.UpdateMcpToolRequest? Type360 { get; set; } /// /// /// - public global::Vectara.TestToolRequest? Type361 { get; set; } + public global::Vectara.UpdateLambdaToolRequest? Type361 { get; set; } /// /// /// - public global::Vectara.TestToolSuccessResponse? Type362 { get; set; } + public global::Vectara.UpdateToolRequest? Type362 { get; set; } /// /// /// - public global::Vectara.TestToolSuccessResponseValidationResults? Type363 { get; set; } + public global::Vectara.UpdateToolRequestDiscriminator? Type363 { get; set; } /// /// /// - public global::Vectara.TestToolErrorResponse? Type364 { get; set; } + public global::Vectara.UpdateToolRequestDiscriminatorType? Type364 { get; set; } /// /// /// - public global::Vectara.TestToolErrorResponseError? Type365 { get; set; } + public global::Vectara.TestToolRequest? Type365 { get; set; } /// /// /// - public global::Vectara.TestToolResponse? Type366 { get; set; } + public global::Vectara.TestToolSuccessResponse? Type366 { get; set; } /// /// /// - public global::Vectara.TestToolResponseDiscriminator? Type367 { get; set; } + public global::Vectara.TestToolSuccessResponseValidationResults? Type367 { get; set; } /// /// /// - public global::Vectara.TestToolResponseDiscriminatorType? Type368 { get; set; } + public global::Vectara.TestToolErrorResponse? Type368 { get; set; } /// /// /// - public global::Vectara.TemplateType? Type369 { get; set; } + public global::Vectara.TestToolErrorResponseError? Type369 { get; set; } /// /// /// - public global::Vectara.InitialInstruction? Type370 { get; set; } + public global::Vectara.TestToolResponse? Type370 { get; set; } /// /// /// - public global::Vectara.Instruction? Type371 { get; set; } + public global::Vectara.TestToolResponseDiscriminator? Type371 { get; set; } /// /// /// - public global::Vectara.InstructionDiscriminator? Type372 { get; set; } + public global::Vectara.TestToolResponseDiscriminatorType? Type372 { get; set; } /// /// /// - public global::Vectara.InstructionDiscriminatorType? Type373 { get; set; } + public global::Vectara.TemplateType? Type373 { get; set; } /// /// /// - public global::Vectara.ListInstructionsResponse? Type374 { get; set; } + public global::Vectara.InitialInstruction? Type374 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type375 { get; set; } + public global::Vectara.Instruction? Type375 { get; set; } /// /// /// - public global::Vectara.InstructionRequestBase? Type376 { get; set; } + public global::Vectara.InstructionDiscriminator? Type376 { get; set; } /// /// /// - public global::Vectara.CreateInitialInstructionRequest? Type377 { get; set; } + public global::Vectara.InstructionDiscriminatorType? Type377 { get; set; } /// /// /// - public global::Vectara.CreateInitialInstructionRequestVariant2? Type378 { get; set; } + public global::Vectara.ListInstructionsResponse? Type378 { get; set; } /// /// /// - public global::Vectara.CreateInstructionRequest? Type379 { get; set; } + public global::System.Collections.Generic.IList? Type379 { get; set; } /// /// /// - public global::Vectara.CreateInstructionRequestDiscriminator? Type380 { get; set; } + public global::Vectara.InstructionRequestBase? Type380 { get; set; } /// /// /// - public global::Vectara.CreateInstructionRequestDiscriminatorType? Type381 { get; set; } + public global::Vectara.CreateInitialInstructionRequest? Type381 { get; set; } /// /// /// - public global::Vectara.UpdateInitialInstructionRequest? Type382 { get; set; } + public global::Vectara.CreateInitialInstructionRequestVariant2? Type382 { get; set; } /// /// /// - public global::Vectara.UpdateInstructionRequest? Type383 { get; set; } + public global::Vectara.CreateInstructionRequest? Type383 { get; set; } /// /// /// - public global::Vectara.UpdateInstructionRequestDiscriminator? Type384 { get; set; } + public global::Vectara.CreateInstructionRequestDiscriminator? Type384 { get; set; } /// /// /// - public global::Vectara.UpdateInstructionRequestDiscriminatorType? Type385 { get; set; } + public global::Vectara.CreateInstructionRequestDiscriminatorType? Type385 { get; set; } /// /// /// - public global::Vectara.TestInstructionRequest? Type386 { get; set; } + public global::Vectara.UpdateInitialInstructionRequest? Type386 { get; set; } /// /// /// - public global::Vectara.TestInstructionResponse? Type387 { get; set; } + public global::Vectara.UpdateInstructionRequest? Type387 { get; set; } /// /// /// - public global::Vectara.AgentToolConfigurationBase? Type388 { get; set; } + public global::Vectara.UpdateInstructionRequestDiscriminator? Type388 { get; set; } /// /// /// - public global::Vectara.InlineDynamicVectaraToolConfiguration? Type389 { get; set; } + public global::Vectara.UpdateInstructionRequestDiscriminatorType? Type389 { get; set; } /// /// /// - public global::Vectara.InlineDynamicVectaraToolConfigurationVariant2? Type390 { get; set; } + public global::Vectara.TestInstructionRequest? Type390 { get; set; } /// /// /// - public global::Vectara.InlineMcpToolConfiguration? Type391 { get; set; } + public global::Vectara.TestInstructionResponse? Type391 { get; set; } /// /// /// - public global::Vectara.InlineMcpToolConfigurationVariant2? Type392 { get; set; } + public global::Vectara.AgentToolConfigurationBase? Type392 { get; set; } /// /// /// - public global::Vectara.CorporaSearchToolParameters? Type393 { get; set; } + public global::Vectara.InlineDynamicVectaraToolConfiguration? Type393 { get; set; } /// /// /// - public global::Vectara.EagerReference? Type394 { get; set; } + public global::Vectara.InlineDynamicVectaraToolConfigurationVariant2? Type394 { get; set; } /// /// /// - public global::Vectara.AgentKeyedSearchCorpus? Type395 { get; set; } + public global::Vectara.InlineMcpToolConfiguration? Type395 { get; set; } /// /// /// - public global::Vectara.OneOf? Type396 { get; set; } + public global::Vectara.InlineMcpToolConfigurationVariant2? Type396 { get; set; } /// /// /// - public global::Vectara.AgentSearchCorporaParameters? Type397 { get; set; } + public global::Vectara.CorporaSearchToolParameters? Type397 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type398 { get; set; } + public global::Vectara.EagerReference? Type398 { get; set; } /// /// /// - public global::Vectara.AgentCorporaSearchQueryConfiguration? Type399 { get; set; } + public global::Vectara.AgentKeyedSearchCorpus? Type399 { get; set; } /// /// /// - public global::Vectara.InlineCorporaSearchToolConfiguration? Type400 { get; set; } + public global::Vectara.OneOf? Type400 { get; set; } /// /// /// - public global::Vectara.InlineCorporaSearchToolConfigurationVariant2? Type401 { get; set; } + public global::Vectara.AgentSearchCorporaParameters? Type401 { get; set; } /// /// /// - public global::Vectara.WebSearchToolParameters? Type402 { get; set; } + public global::System.Collections.Generic.IList? Type402 { get; set; } /// /// /// - public global::Vectara.WebSearchToolParametersProvider? Type403 { get; set; } + public global::Vectara.AgentCorporaSearchQueryConfiguration? Type403 { get; set; } /// /// /// - public global::Vectara.InlineWebSearchToolConfiguration? Type404 { get; set; } + public global::Vectara.InlineCorporaSearchToolConfiguration? Type404 { get; set; } /// /// /// - public global::Vectara.InlineWebSearchToolConfigurationVariant2? Type405 { get; set; } + public global::Vectara.InlineCorporaSearchToolConfigurationVariant2? Type405 { get; set; } /// /// /// - public global::Vectara.WebGetHeaderValue? Type406 { get; set; } + public global::Vectara.WebSearchToolParameters? Type406 { get; set; } /// /// /// - public global::Vectara.WebGetHeadersMap? Type407 { get; set; } + public global::Vectara.WebSearchToolParametersProvider? Type407 { get; set; } /// /// /// - public global::Vectara.WebGetNoAuth? Type408 { get; set; } + public global::Vectara.InlineWebSearchToolConfiguration? Type408 { get; set; } /// /// /// - public global::Vectara.WebGetBearerAuth? Type409 { get; set; } + public global::Vectara.InlineWebSearchToolConfigurationVariant2? Type409 { get; set; } /// /// /// - public global::Vectara.WebGetHeaderAuth? Type410 { get; set; } + public global::Vectara.WebGetHeaderValue? Type410 { get; set; } /// /// /// - public global::Vectara.WebGetOAuthClientCredentialsAuth? Type411 { get; set; } + public global::Vectara.WebGetHeadersMap? Type411 { get; set; } /// /// /// - public global::Vectara.WebGetOAuthRefreshTokenAuth? Type412 { get; set; } + public global::Vectara.WebGetNoAuth? Type412 { get; set; } /// /// /// - public global::Vectara.WebGetAuth? Type413 { get; set; } + public global::Vectara.WebGetBearerAuth? Type413 { get; set; } /// /// /// - public global::Vectara.WebGetAuthDiscriminator? Type414 { get; set; } + public global::Vectara.WebGetHeaderAuth? Type414 { get; set; } /// /// /// - public global::Vectara.WebGetAuthDiscriminatorType? Type415 { get; set; } + public global::Vectara.WebGetOAuthClientCredentialsAuth? Type415 { get; set; } /// /// /// - public global::Vectara.WebGetToolParameters? Type416 { get; set; } + public global::Vectara.WebGetOAuthRefreshTokenAuth? Type416 { get; set; } /// /// /// - public global::Vectara.WebGetToolParametersMethod? Type417 { get; set; } + public global::Vectara.WebGetAuth? Type417 { get; set; } /// /// /// - public global::Vectara.OneOf? Type418 { get; set; } + public global::Vectara.WebGetAuthDiscriminator? Type418 { get; set; } /// /// /// - public global::Vectara.OneOf? Type419 { get; set; } + public global::Vectara.WebGetAuthDiscriminatorType? Type419 { get; set; } /// /// /// - public global::Vectara.OneOf? Type420 { get; set; } + public global::Vectara.WebGetToolParameters? Type420 { get; set; } /// /// /// - public global::Vectara.OneOf? Type421 { get; set; } + public global::Vectara.WebGetToolParametersMethod? Type421 { get; set; } /// /// /// - public global::Vectara.InlineWebGetToolConfiguration? Type422 { get; set; } + public global::Vectara.OneOf? Type422 { get; set; } /// /// /// - public global::Vectara.InlineWebGetToolConfigurationVariant2? Type423 { get; set; } + public global::Vectara.OneOf? Type423 { get; set; } /// /// /// - public global::Vectara.InlineLambdaToolConfiguration? Type424 { get; set; } + public global::Vectara.OneOf? Type424 { get; set; } /// /// /// - public global::Vectara.InlineLambdaToolConfigurationVariant2? Type425 { get; set; } + public global::Vectara.OneOf? Type425 { get; set; } /// /// /// - public global::Vectara.SubAgentToolParameters? Type426 { get; set; } + public global::Vectara.InlineWebGetToolConfiguration? Type426 { get; set; } /// /// /// - public global::Vectara.SubAgentSessionMode? Type427 { get; set; } + public global::Vectara.InlineWebGetToolConfigurationVariant2? Type427 { get; set; } /// /// /// - public global::Vectara.SubAgentConfiguration? Type428 { get; set; } + public global::Vectara.InlineLambdaToolConfiguration? Type428 { get; set; } /// /// /// - public global::Vectara.InlineSubAgentToolConfiguration? Type429 { get; set; } + public global::Vectara.InlineLambdaToolConfigurationVariant2? Type429 { get; set; } /// /// /// - public global::Vectara.InlineSubAgentToolConfigurationVariant2? Type430 { get; set; } + public global::Vectara.SubAgentToolParameters? Type430 { get; set; } /// /// /// - public global::Vectara.InlineArtifactCreateToolConfiguration? Type431 { get; set; } + public global::Vectara.SubAgentSessionMode? Type431 { get; set; } /// /// /// - public global::Vectara.InlineArtifactCreateToolConfigurationVariant2? Type432 { get; set; } + public global::Vectara.SubAgentConfiguration? Type432 { get; set; } /// /// /// - public global::Vectara.ArtifactReadToolParameters? Type433 { get; set; } + public global::Vectara.InlineSubAgentToolConfiguration? Type433 { get; set; } /// /// /// - public global::Vectara.ArtifactReadToolParametersEncoding? Type434 { get; set; } + public global::Vectara.InlineSubAgentToolConfigurationVariant2? Type434 { get; set; } /// /// /// - public global::Vectara.ArtifactReadConfiguration? Type435 { get; set; } + public global::Vectara.InlineArtifactCreateToolConfiguration? Type435 { get; set; } /// /// /// - public global::Vectara.InlineArtifactReadToolConfiguration? Type436 { get; set; } + public global::Vectara.InlineArtifactCreateToolConfigurationVariant2? Type436 { get; set; } /// /// /// - public global::Vectara.InlineArtifactReadToolConfigurationVariant2? Type437 { get; set; } + public global::Vectara.ArtifactReadToolParameters? Type437 { get; set; } /// /// /// - public global::Vectara.ArtifactGrepToolParameters? Type438 { get; set; } + public global::Vectara.ArtifactReadToolParametersEncoding? Type438 { get; set; } /// /// /// - public global::Vectara.InlineArtifactGrepToolConfiguration? Type439 { get; set; } + public global::Vectara.ArtifactReadConfiguration? Type439 { get; set; } /// /// /// - public global::Vectara.InlineArtifactGrepToolConfigurationVariant2? Type440 { get; set; } + public global::Vectara.InlineArtifactReadToolConfiguration? Type440 { get; set; } /// /// /// - public global::Vectara.ImageReadToolParameters? Type441 { get; set; } + public global::Vectara.InlineArtifactReadToolConfigurationVariant2? Type441 { get; set; } /// /// /// - public global::Vectara.ImageReadToolParametersDetail? Type442 { get; set; } + public global::Vectara.ArtifactGrepToolParameters? Type442 { get; set; } /// /// /// - public global::Vectara.InlineImageReadToolConfiguration? Type443 { get; set; } + public global::Vectara.InlineArtifactGrepToolConfiguration? Type443 { get; set; } /// /// /// - public global::Vectara.InlineImageReadToolConfigurationVariant2? Type444 { get; set; } + public global::Vectara.InlineArtifactGrepToolConfigurationVariant2? Type444 { get; set; } /// /// /// - public global::Vectara.DocumentConversionToolParameters? Type445 { get; set; } + public global::Vectara.ImageReadToolParameters? Type445 { get; set; } /// /// /// - public global::Vectara.DocumentConversionToolParametersOutputFormat? Type446 { get; set; } + public global::Vectara.ImageReadToolParametersDetail? Type446 { get; set; } /// /// /// - public global::Vectara.InlineDocumentConversionToolConfiguration? Type447 { get; set; } + public global::Vectara.InlineImageReadToolConfiguration? Type447 { get; set; } /// /// /// - public global::Vectara.InlineDocumentConversionToolConfigurationVariant2? Type448 { get; set; } + public global::Vectara.InlineImageReadToolConfigurationVariant2? Type448 { get; set; } /// /// /// - public global::Vectara.GetDocumentTextParameters? Type449 { get; set; } + public global::Vectara.DocumentConversionToolParameters? Type449 { get; set; } /// /// /// - public global::Vectara.GetDocumentTextConfiguration? Type450 { get; set; } + public global::Vectara.DocumentConversionToolParametersOutputFormat? Type450 { get; set; } /// /// /// - public global::Vectara.GetDocumentTextConfigurationMetadata? Type451 { get; set; } + public global::Vectara.InlineDocumentConversionToolConfiguration? Type451 { get; set; } /// /// /// - public global::Vectara.InlineGetDocumentTextToolConfiguration? Type452 { get; set; } + public global::Vectara.InlineDocumentConversionToolConfigurationVariant2? Type452 { get; set; } /// /// /// - public global::Vectara.InlineGetDocumentTextToolConfigurationVariant2? Type453 { get; set; } + public global::Vectara.GetDocumentTextParameters? Type453 { get; set; } /// /// /// - public global::Vectara.AgentToolConfiguration? Type454 { get; set; } + public global::Vectara.GetDocumentTextConfiguration? Type454 { get; set; } /// /// /// - public global::Vectara.AgentToolConfigurationDiscriminator? Type455 { get; set; } + public global::Vectara.GetDocumentTextConfigurationMetadata? Type455 { get; set; } /// /// /// - public global::Vectara.AgentToolConfigurationDiscriminatorType? Type456 { get; set; } + public global::Vectara.InlineGetDocumentTextToolConfiguration? Type456 { get; set; } /// /// /// - public global::Vectara.AgentSkill? Type457 { get; set; } + public global::Vectara.InlineGetDocumentTextToolConfigurationVariant2? Type457 { get; set; } /// /// /// - public global::Vectara.RetryConfiguration? Type458 { get; set; } + public global::Vectara.AgentToolConfiguration? Type458 { get; set; } /// /// /// - public global::Vectara.AgentModel? Type459 { get; set; } + public global::Vectara.AgentToolConfigurationDiscriminator? Type459 { get; set; } /// /// /// - public global::Vectara.InstructionReference? Type460 { get; set; } + public global::Vectara.AgentToolConfigurationDiscriminatorType? Type460 { get; set; } /// /// /// - public global::Vectara.ReferenceInstruction? Type461 { get; set; } + public global::Vectara.AgentSkill? Type461 { get; set; } /// /// /// - public global::Vectara.ReferenceInstructionVariant2? Type462 { get; set; } + public global::Vectara.RetryConfiguration? Type462 { get; set; } /// /// /// - public global::Vectara.InlineInstruction? Type463 { get; set; } + public global::Vectara.AgentModel? Type463 { get; set; } /// /// /// - public global::Vectara.InlineInstructionVariant2? Type464 { get; set; } + public global::Vectara.InstructionReference? Type464 { get; set; } /// /// /// - public global::Vectara.AgentStepInstruction? Type465 { get; set; } + public global::Vectara.ReferenceInstruction? Type465 { get; set; } /// /// /// - public global::Vectara.AgentStepInstructionDiscriminator? Type466 { get; set; } + public global::Vectara.ReferenceInstructionVariant2? Type466 { get; set; } /// /// /// - public global::Vectara.AgentStepInstructionDiscriminatorType? Type467 { get; set; } + public global::Vectara.InlineInstruction? Type467 { get; set; } /// /// /// - public global::Vectara.DefaultOutputParser? Type468 { get; set; } + public global::Vectara.InlineInstructionVariant2? Type468 { get; set; } /// /// /// - public global::Vectara.StructuredOutputParser? Type469 { get; set; } + public global::Vectara.AgentStepInstruction? Type469 { get; set; } /// /// /// - public global::Vectara.AgentOutputParser? Type470 { get; set; } + public global::Vectara.AgentStepInstructionDiscriminator? Type470 { get; set; } /// /// /// - public global::Vectara.AgentOutputParserDiscriminator? Type471 { get; set; } + public global::Vectara.AgentStepInstructionDiscriminatorType? Type471 { get; set; } /// /// /// - public global::Vectara.AgentOutputParserDiscriminatorType? Type472 { get; set; } + public global::Vectara.DefaultOutputParser? Type472 { get; set; } /// /// /// - public global::Vectara.TemplatedReminder? Type473 { get; set; } + public global::Vectara.StructuredOutputParser? Type473 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type474 { get; set; } + public global::Vectara.AgentOutputParser? Type474 { get; set; } /// /// /// - public global::Vectara.TemplatedReminderHook? Type475 { get; set; } + public global::Vectara.AgentOutputParserDiscriminator? Type475 { get; set; } /// /// /// - public global::Vectara.GlossaryExpansionReminder? Type476 { get; set; } + public global::Vectara.AgentOutputParserDiscriminatorType? Type476 { get; set; } /// /// /// - public global::Vectara.AgentStepReminder? Type477 { get; set; } + public global::Vectara.TemplatedReminder? Type477 { get; set; } /// /// /// - public global::Vectara.AgentStepReminderDiscriminator? Type478 { get; set; } + public global::System.Collections.Generic.IList? Type478 { get; set; } /// /// /// - public global::Vectara.AgentStepReminderDiscriminatorType? Type479 { get; set; } + public global::Vectara.TemplatedReminderHook? Type479 { get; set; } /// /// /// - public global::Vectara.NextStep? Type480 { get; set; } + public global::Vectara.GlossaryExpansionReminder? Type480 { get; set; } /// /// /// - public global::Vectara.FirstAgentStep? Type481 { get; set; } + public global::Vectara.AgentStepReminder? Type481 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type482 { get; set; } + public global::Vectara.AgentStepReminderDiscriminator? Type482 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type483 { get; set; } + public global::Vectara.AgentStepReminderDiscriminatorType? Type483 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type484 { get; set; } + public global::Vectara.NextStep? Type484 { get; set; } /// /// /// - public global::Vectara.AgentStep? Type485 { get; set; } + public global::Vectara.FirstAgentStep? Type485 { get; set; } /// /// /// - public global::Vectara.CompactionConfig? Type486 { get; set; } + public global::System.Collections.Generic.IList? Type486 { get; set; } /// /// /// - public global::Vectara.CompactionConfigToolEventPolicy? Type487 { get; set; } + public global::System.Collections.Generic.IList? Type487 { get; set; } /// /// /// - public global::Vectara.ToolOutputOffloadingConfiguration? Type488 { get; set; } + public global::System.Collections.Generic.IList? Type488 { get; set; } /// /// /// - public global::Vectara.ToolOutputOffloadingConfigurationMode? Type489 { get; set; } + public global::Vectara.AgentStep? Type489 { get; set; } /// /// /// - public global::Vectara.Agent? Type490 { get; set; } + public global::Vectara.CompactionConfig? Type490 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary? Type491 { get; set; } + public global::Vectara.CompactionConfigToolEventPolicy? Type491 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary? Type492 { get; set; } + public global::Vectara.ToolOutputOffloadingConfiguration? Type492 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary? Type493 { get; set; } + public global::Vectara.ToolOutputOffloadingConfigurationMode? Type493 { get; set; } /// /// /// - public global::Vectara.ListAgentsResponse? Type494 { get; set; } + public global::Vectara.Agent? Type494 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type495 { get; set; } + public global::System.Collections.Generic.Dictionary? Type495 { get; set; } /// /// /// - public global::Vectara.CreateAgentRequest? Type496 { get; set; } + public global::System.Collections.Generic.Dictionary? Type496 { get; set; } /// /// /// - public global::Vectara.UpdateFirstAgentStep? Type497 { get; set; } + public global::System.Collections.Generic.Dictionary? Type497 { get; set; } /// /// /// - public global::Vectara.UpdateAgentStep? Type498 { get; set; } + public global::Vectara.ListAgentsResponse? Type498 { get; set; } /// /// /// - public global::Vectara.UpdateAgentRequest? Type499 { get; set; } + public global::System.Collections.Generic.IList? Type499 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary? Type500 { get; set; } + public global::Vectara.CreateAgentRequest? Type500 { get; set; } /// /// /// - public global::Vectara.InputTokens? Type501 { get; set; } + public global::Vectara.UpdateFirstAgentStep? Type501 { get; set; } /// /// /// - public global::Vectara.OutputTokens? Type502 { get; set; } + public global::Vectara.UpdateAgentStep? Type502 { get; set; } /// /// /// - public global::Vectara.SessionContextUsage? Type503 { get; set; } + public global::Vectara.UpdateAgentRequest? Type503 { get; set; } /// /// /// - public global::Vectara.AgentSession? Type504 { get; set; } + public global::System.Collections.Generic.Dictionary? Type504 { get; set; } /// /// /// - public global::Vectara.ListAgentSessionsResponse? Type505 { get; set; } + public global::Vectara.InputTokens? Type505 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type506 { get; set; } + public global::Vectara.OutputTokens? Type506 { get; set; } /// /// /// - public global::Vectara.CreateAgentSessionRequest? Type507 { get; set; } + public global::Vectara.SessionContextUsage? Type507 { get; set; } /// /// /// - public global::Vectara.CreateAgentSessionRequestFromSession? Type508 { get; set; } + public global::Vectara.AgentSession? Type508 { get; set; } /// /// /// - public global::Vectara.UpdateAgentSessionRequest? Type509 { get; set; } + public global::Vectara.ListAgentSessionsResponse? Type509 { get; set; } /// /// /// - public global::Vectara.AgentEventBase? Type510 { get; set; } + public global::System.Collections.Generic.IList? Type510 { get; set; } /// /// /// - public global::Vectara.AgentTextInput? Type511 { get; set; } + public global::Vectara.CreateAgentSessionRequest? Type511 { get; set; } /// /// /// - public global::Vectara.AgentSkillInput? Type512 { get; set; } + public global::Vectara.CreateAgentSessionRequestFromSession? Type512 { get; set; } /// /// /// - public global::Vectara.AgentInput? Type513 { get; set; } + public global::Vectara.UpdateAgentSessionRequest? Type513 { get; set; } /// /// /// - public global::Vectara.AgentInputDiscriminator? Type514 { get; set; } + public global::Vectara.AgentEventBase? Type514 { get; set; } /// /// /// - public global::Vectara.AgentInputDiscriminatorType? Type515 { get; set; } + public global::Vectara.AgentTextInput? Type515 { get; set; } /// /// /// - public global::Vectara.InputMessageEvent? Type516 { get; set; } + public global::Vectara.AgentSkillInput? Type516 { get; set; } /// /// /// - public global::Vectara.InputMessageEventVariant2? Type517 { get; set; } + public global::Vectara.AgentInput? Type517 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type518 { get; set; } + public global::Vectara.AgentInputDiscriminator? Type518 { get; set; } /// /// /// - public global::Vectara.SkillLoadEvent? Type519 { get; set; } + public global::Vectara.AgentInputDiscriminatorType? Type519 { get; set; } /// /// /// - public global::Vectara.SkillLoadEventVariant2? Type520 { get; set; } + public global::Vectara.InputMessageEvent? Type520 { get; set; } /// /// /// - public global::Vectara.ArtifactReference? Type521 { get; set; } + public global::Vectara.InputMessageEventVariant2? Type521 { get; set; } /// /// /// - public global::Vectara.ArtifactUploadEvent? Type522 { get; set; } + public global::System.Collections.Generic.IList? Type522 { get; set; } /// /// /// - public global::Vectara.ArtifactUploadEventVariant2? Type523 { get; set; } + public global::Vectara.SkillLoadEvent? Type523 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type524 { get; set; } + public global::Vectara.SkillLoadEventVariant2? Type524 { get; set; } /// /// /// - public global::Vectara.ToolInputEvent? Type525 { get; set; } + public global::Vectara.ArtifactReference? Type525 { get; set; } /// /// /// - public global::Vectara.ToolInputEventVariant2? Type526 { get; set; } + public global::Vectara.ArtifactUploadEvent? Type526 { get; set; } /// /// /// - public global::Vectara.ToolOutputEvent? Type527 { get; set; } + public global::Vectara.ArtifactUploadEventVariant2? Type527 { get; set; } /// /// /// - public global::Vectara.ToolOutputEventVariant2? Type528 { get; set; } + public global::System.Collections.Generic.IList? Type528 { get; set; } /// /// /// - public global::Vectara.ThinkingEvent? Type529 { get; set; } + public global::Vectara.ToolInputEvent? Type529 { get; set; } /// /// /// - public global::Vectara.ThinkingEventVariant2? Type530 { get; set; } + public global::Vectara.ToolInputEventVariant2? Type530 { get; set; } /// /// /// - public global::Vectara.AgentOutputEvent? Type531 { get; set; } + public global::Vectara.ToolOutputEvent? Type531 { get; set; } /// /// /// - public global::Vectara.AgentOutputEventVariant2? Type532 { get; set; } + public global::Vectara.ToolOutputEventVariant2? Type532 { get; set; } /// /// /// - public global::Vectara.StructuredOutputEvent? Type533 { get; set; } + public global::Vectara.ThinkingEvent? Type533 { get; set; } /// /// /// - public global::Vectara.StructuredOutputEventVariant2? Type534 { get; set; } + public global::Vectara.ThinkingEventVariant2? Type534 { get; set; } /// /// /// - public global::Vectara.ContextLimitExceededEvent? Type535 { get; set; } + public global::Vectara.AgentOutputEvent? Type535 { get; set; } /// /// /// - public global::Vectara.ContextLimitExceededEventVariant2? Type536 { get; set; } + public global::Vectara.AgentOutputEventVariant2? Type536 { get; set; } /// /// /// - public global::Vectara.StepTransitionLimitExceededEvent? Type537 { get; set; } + public global::Vectara.StructuredOutputEvent? Type537 { get; set; } /// /// /// - public global::Vectara.StepTransitionLimitExceededEventVariant2? Type538 { get; set; } + public global::Vectara.StructuredOutputEventVariant2? Type538 { get; set; } /// /// /// - public global::Vectara.SessionInterruptedEvent? Type539 { get; set; } + public global::Vectara.ContextLimitExceededEvent? Type539 { get; set; } /// /// /// - public global::Vectara.SessionInterruptedEventVariant2? Type540 { get; set; } + public global::Vectara.ContextLimitExceededEventVariant2? Type540 { get; set; } /// /// /// - public global::Vectara.ImageReadEvent? Type541 { get; set; } + public global::Vectara.StepTransitionLimitExceededEvent? Type541 { get; set; } /// /// /// - public global::Vectara.ImageReadEventVariant2? Type542 { get; set; } + public global::Vectara.StepTransitionLimitExceededEventVariant2? Type542 { get; set; } /// /// /// - public global::Vectara.ImageReadEventVariant2Detail? Type543 { get; set; } + public global::Vectara.SessionInterruptedEvent? Type543 { get; set; } /// /// /// - public global::Vectara.StepTransitionEvent? Type544 { get; set; } + public global::Vectara.SessionInterruptedEventVariant2? Type544 { get; set; } /// /// /// - public global::Vectara.StepTransitionEventVariant2? Type545 { get; set; } + public global::Vectara.ImageReadEvent? Type545 { get; set; } /// /// /// - public global::Vectara.CompactionEvent? Type546 { get; set; } + public global::Vectara.ImageReadEventVariant2? Type546 { get; set; } /// /// /// - public global::Vectara.CompactionEventVariant2? Type547 { get; set; } + public global::Vectara.ImageReadEventVariant2Detail? Type547 { get; set; } /// /// /// - public global::Vectara.AgentEvent? Type548 { get; set; } + public global::Vectara.StepTransitionEvent? Type548 { get; set; } /// /// /// - public global::Vectara.AgentEventDiscriminator? Type549 { get; set; } + public global::Vectara.StepTransitionEventVariant2? Type549 { get; set; } /// /// /// - public global::Vectara.AgentEventDiscriminatorType? Type550 { get; set; } + public global::Vectara.CompactionEvent? Type550 { get; set; } /// /// /// - public global::Vectara.ListAgentEventsResponse? Type551 { get; set; } + public global::Vectara.CompactionEventVariant2? Type551 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type552 { get; set; } + public global::Vectara.AgentEvent? Type552 { get; set; } /// /// /// - public global::Vectara.CreateInputRequestBase? Type553 { get; set; } + public global::Vectara.AgentEventDiscriminator? Type553 { get; set; } /// /// /// - public global::Vectara.InputBehavior? Type554 { get; set; } + public global::Vectara.AgentEventDiscriminatorType? Type554 { get; set; } /// /// /// - public global::Vectara.CreateInputMessageRequest? Type555 { get; set; } + public global::Vectara.ListAgentEventsResponse? Type555 { get; set; } /// /// /// - public global::Vectara.CreateInputMessageRequestVariant2? Type556 { get; set; } + public global::System.Collections.Generic.IList? Type556 { get; set; } /// /// /// - public global::Vectara.CreateInterruptRequest? Type557 { get; set; } + public global::Vectara.CreateInputRequestBase? Type557 { get; set; } /// /// /// - public global::Vectara.CreateInterruptRequestVariant2? Type558 { get; set; } + public global::Vectara.InputBehavior? Type558 { get; set; } /// /// /// - public global::Vectara.CreateCompactRequest? Type559 { get; set; } + public global::Vectara.CreateInputMessageRequest? Type559 { get; set; } /// /// /// - public global::Vectara.CreateCompactRequestVariant2? Type560 { get; set; } + public global::Vectara.CreateInputMessageRequestVariant2? Type560 { get; set; } /// /// /// - public global::Vectara.CreateInputRequest? Type561 { get; set; } + public global::Vectara.CreateInterruptRequest? Type561 { get; set; } /// /// /// - public global::Vectara.CreateInputRequestDiscriminator? Type562 { get; set; } + public global::Vectara.CreateInterruptRequestVariant2? Type562 { get; set; } /// /// /// - public global::Vectara.CreateInputRequestDiscriminatorType? Type563 { get; set; } + public global::Vectara.CreateCompactRequest? Type563 { get; set; } /// /// /// - public global::Vectara.AgentResponse? Type564 { get; set; } + public global::Vectara.CreateCompactRequestVariant2? Type564 { get; set; } /// /// /// - public global::Vectara.StreamingAgentOutput? Type565 { get; set; } + public global::Vectara.CreateInputRequest? Type565 { get; set; } /// /// /// - public global::Vectara.StreamingAgentOutputEnd? Type566 { get; set; } + public global::Vectara.CreateInputRequestDiscriminator? Type566 { get; set; } /// /// /// - public global::Vectara.StreamingThinking? Type567 { get; set; } + public global::Vectara.CreateInputRequestDiscriminatorType? Type567 { get; set; } /// /// /// - public global::Vectara.StreamingThinkingEnd? Type568 { get; set; } + public global::Vectara.AgentResponse? Type568 { get; set; } /// /// /// - public global::Vectara.ContextConsumedEvent? Type569 { get; set; } + public global::Vectara.StreamingAgentOutput? Type569 { get; set; } /// /// /// - public global::Vectara.CompactionStartedEvent? Type570 { get; set; } + public global::Vectara.StreamingAgentOutputEnd? Type570 { get; set; } /// /// /// - public global::Vectara.CompactionStartedEventVariant2? Type571 { get; set; } + public global::Vectara.StreamingThinking? Type571 { get; set; } /// /// /// - public global::Vectara.ToolActivityEventBase? Type572 { get; set; } + public global::Vectara.StreamingThinkingEnd? Type572 { get; set; } /// /// /// - public global::Vectara.GenericToolActivityEvent? Type573 { get; set; } + public global::Vectara.ContextConsumedEvent? Type573 { get; set; } /// /// /// - public global::Vectara.GenericToolActivityEventVariant2? Type574 { get; set; } + public global::Vectara.CompactionStartedEvent? Type574 { get; set; } /// /// /// - public global::Vectara.SubAgentToolActivityEvent? Type575 { get; set; } + public global::Vectara.CompactionStartedEventVariant2? Type575 { get; set; } /// /// /// - public global::Vectara.SubAgentToolActivityEventVariant2? Type576 { get; set; } + public global::Vectara.ToolActivityEventBase? Type576 { get; set; } /// /// /// - public global::Vectara.ToolActivityEvent? Type577 { get; set; } + public global::Vectara.GenericToolActivityEvent? Type577 { get; set; } /// /// /// - public global::Vectara.ToolActivityEventDiscriminator? Type578 { get; set; } + public global::Vectara.GenericToolActivityEventVariant2? Type578 { get; set; } /// /// /// - public global::Vectara.ToolActivityEventDiscriminatorActivityType? Type579 { get; set; } + public global::Vectara.SubAgentToolActivityEvent? Type579 { get; set; } /// /// /// - public global::Vectara.AgentStreamedResponse? Type580 { get; set; } + public global::Vectara.SubAgentToolActivityEventVariant2? Type580 { get; set; } /// /// /// - public global::Vectara.AgentStreamedResponseDiscriminator? Type581 { get; set; } + public global::Vectara.ToolActivityEvent? Type581 { get; set; } /// /// /// - public global::Vectara.AgentStreamedResponseDiscriminatorType? Type582 { get; set; } + public global::Vectara.ToolActivityEventDiscriminator? Type582 { get; set; } /// /// /// - public global::Vectara.SessionArtifact? Type583 { get; set; } + public global::Vectara.ToolActivityEventDiscriminatorActivityType? Type583 { get; set; } /// /// /// - public global::Vectara.ListSessionArtifactsResponse? Type584 { get; set; } + public global::Vectara.AgentStreamedResponse? Type584 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type585 { get; set; } + public global::Vectara.AgentStreamedResponseDiscriminator? Type585 { get; set; } /// /// /// - public global::Vectara.IntervalScheduleConfiguration? Type586 { get; set; } + public global::Vectara.AgentStreamedResponseDiscriminatorType? Type586 { get; set; } /// /// /// - public global::Vectara.IntervalScheduleConfigurationType? Type587 { get; set; } + public global::Vectara.SessionArtifact? Type587 { get; set; } /// /// /// - public global::Vectara.CronScheduleConfiguration? Type588 { get; set; } + public global::Vectara.ListSessionArtifactsResponse? Type588 { get; set; } /// /// /// - public global::Vectara.CronScheduleConfigurationType? Type589 { get; set; } + public global::System.Collections.Generic.IList? Type589 { get; set; } /// /// /// - public global::Vectara.ScheduleConfiguration? Type590 { get; set; } + public global::Vectara.IntervalScheduleConfiguration? Type590 { get; set; } /// /// /// - public global::Vectara.AgentSchedule? Type591 { get; set; } + public global::Vectara.IntervalScheduleConfigurationType? Type591 { get; set; } /// /// /// - public global::Vectara.ListAgentSchedulesResponse? Type592 { get; set; } + public global::Vectara.CronScheduleConfiguration? Type592 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type593 { get; set; } + public global::Vectara.CronScheduleConfigurationType? Type593 { get; set; } /// /// /// - public global::Vectara.CreateAgentScheduleRequest? Type594 { get; set; } + public global::Vectara.ScheduleConfiguration? Type594 { get; set; } /// /// /// - public global::Vectara.UpdateAgentScheduleRequest? Type595 { get; set; } + public global::Vectara.AgentSchedule? Type595 { get; set; } /// /// /// - public global::Vectara.AgentScheduleExecution? Type596 { get; set; } + public global::Vectara.ListAgentSchedulesResponse? Type596 { get; set; } /// /// /// - public global::Vectara.AgentScheduleExecutionStatus? Type597 { get; set; } + public global::System.Collections.Generic.IList? Type597 { get; set; } /// /// /// - public global::Vectara.ListAgentScheduleExecutionsResponse? Type598 { get; set; } + public global::Vectara.CreateAgentScheduleRequest? Type598 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type599 { get; set; } + public global::Vectara.UpdateAgentScheduleRequest? Type599 { get; set; } /// /// /// - public global::Vectara.AgentIdentityMode? Type600 { get; set; } + public global::Vectara.AgentScheduleExecution? Type600 { get; set; } /// /// /// - public global::Vectara.AgentIdentity? Type601 { get; set; } + public global::Vectara.AgentScheduleExecutionStatus? Type601 { get; set; } /// /// /// - public global::Vectara.UpdateAgentIdentityRequest? Type602 { get; set; } + public global::Vectara.ListAgentScheduleExecutionsResponse? Type602 { get; set; } /// /// /// - public global::Vectara.AgentSecrets? Type603 { get; set; } + public global::System.Collections.Generic.IList? Type603 { get; set; } /// /// /// - public global::Vectara.ReplaceAgentSecretsRequest? Type604 { get; set; } + public global::Vectara.AgentIdentityMode? Type604 { get; set; } /// /// /// - public global::Vectara.UpdateAgentSecretsRequest? Type605 { get; set; } + public global::Vectara.AgentIdentity? Type605 { get; set; } /// /// /// - public global::Vectara.SlackConnectorConfiguration? Type606 { get; set; } + public global::Vectara.UpdateAgentIdentityRequest? Type606 { get; set; } /// /// /// - public global::Vectara.ConnectorConfiguration? Type607 { get; set; } + public global::Vectara.AgentSecrets? Type607 { get; set; } /// /// /// - public global::Vectara.ConnectorConfigurationDiscriminator? Type608 { get; set; } + public global::Vectara.ReplaceAgentSecretsRequest? Type608 { get; set; } /// /// /// - public global::Vectara.ConnectorConfigurationDiscriminatorType? Type609 { get; set; } + public global::Vectara.UpdateAgentSecretsRequest? Type609 { get; set; } /// /// /// - public global::Vectara.AgentConnector? Type610 { get; set; } + public global::Vectara.SlackConnectorConfiguration? Type610 { get; set; } /// /// /// - public global::Vectara.AgentConnectorType? Type611 { get; set; } + public global::Vectara.ConnectorConfiguration? Type611 { get; set; } /// /// /// - public global::Vectara.AgentConnectorStatus? Type612 { get; set; } + public global::Vectara.ConnectorConfigurationDiscriminator? Type612 { get; set; } /// /// /// - public global::Vectara.ListAgentConnectorsResponse? Type613 { get; set; } + public global::Vectara.ConnectorConfigurationDiscriminatorType? Type613 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type614 { get; set; } + public global::Vectara.AgentConnector? Type614 { get; set; } /// /// /// - public global::Vectara.CreateAgentConnectorRequest? Type615 { get; set; } + public global::Vectara.AgentConnectorType? Type615 { get; set; } /// /// /// - public global::Vectara.CreateAgentConnectorRequestType? Type616 { get; set; } + public global::Vectara.AgentConnectorStatus? Type616 { get; set; } /// /// /// - public global::Vectara.UpdateAgentConnectorRequest? Type617 { get; set; } + public global::Vectara.ListAgentConnectorsResponse? Type617 { get; set; } /// /// /// - public global::Vectara.PipelineStatus? Type618 { get; set; } + public global::System.Collections.Generic.IList? Type618 { get; set; } /// /// /// - public global::Vectara.BaseS3SourceConfiguration? Type619 { get; set; } + public global::Vectara.CreateAgentConnectorRequest? Type619 { get; set; } /// /// /// - public global::Vectara.S3SourceConfiguration? Type620 { get; set; } + public global::Vectara.CreateAgentConnectorRequestType? Type620 { get; set; } /// /// /// - public global::Vectara.BaseWebSource? Type621 { get; set; } + public global::Vectara.UpdateAgentConnectorRequest? Type621 { get; set; } /// /// /// - public global::Vectara.SitemapPagesSource? Type622 { get; set; } + public global::Vectara.SingleRuleTargets? Type622 { get; set; } /// /// /// - public global::Vectara.BaseCrawlPagesSource? Type623 { get; set; } + public global::Vectara.WeightedTarget? Type623 { get; set; } /// /// /// - public global::Vectara.CrawlPagesSource? Type624 { get; set; } + public global::Vectara.WeightedRuleTargets? Type624 { get; set; } /// /// /// - public global::Vectara.CrawlPagesSourceVariant2? Type625 { get; set; } + public global::System.Collections.Generic.IList? Type625 { get; set; } /// /// /// - public global::Vectara.SitemapCrawlPagesSource? Type626 { get; set; } + public global::Vectara.RuleTargets? Type626 { get; set; } /// /// /// - public global::Vectara.SitemapCrawlPagesSourceVariant2? Type627 { get; set; } + public global::Vectara.RuleTargetsDiscriminator? Type627 { get; set; } /// /// /// - public global::Vectara.WebPagesSource? Type628 { get; set; } + public global::Vectara.RuleTargetsDiscriminatorType? Type628 { get; set; } /// /// /// - public global::Vectara.WebPagesSourceDiscriminator? Type629 { get; set; } + public global::Vectara.AliasRule? Type629 { get; set; } /// /// /// - public global::Vectara.WebPagesSourceDiscriminatorType? Type630 { get; set; } + public global::Vectara.RoutedAliasPolicy? Type630 { get; set; } /// /// /// - public global::Vectara.WebSourceConfiguration? Type631 { get; set; } + public global::System.Collections.Generic.IList? Type631 { get; set; } /// /// /// - public global::Vectara.WebSourceConfigurationVariant2? Type632 { get; set; } + public global::Vectara.AliasPolicy? Type632 { get; set; } /// /// /// - public global::Vectara.PipelineSource? Type633 { get; set; } + public global::Vectara.AliasPolicyDiscriminator? Type633 { get; set; } /// /// /// - public global::Vectara.PipelineSourceDiscriminator? Type634 { get; set; } + public global::Vectara.AliasPolicyDiscriminatorType? Type634 { get; set; } /// /// /// - public global::Vectara.PipelineSourceDiscriminatorType? Type635 { get; set; } + public global::Vectara.AgentAlias? Type635 { get; set; } /// /// /// - public global::Vectara.CronTriggerConfiguration? Type636 { get; set; } + public global::Vectara.ListAgentAliasesResponse? Type636 { get; set; } /// /// /// - public global::Vectara.IntervalTriggerConfiguration? Type637 { get; set; } + public global::System.Collections.Generic.IList? Type637 { get; set; } /// /// /// - public global::Vectara.ManualTriggerConfiguration? Type638 { get; set; } + public global::Vectara.CreateAgentAliasRequest? Type638 { get; set; } /// /// /// - public global::Vectara.PipelineTrigger? Type639 { get; set; } + public global::Vectara.UpdateAgentAliasRequest? Type639 { get; set; } /// /// /// - public global::Vectara.PipelineTriggerDiscriminator? Type640 { get; set; } + public global::Vectara.ReplaceAliasPolicyRequest? Type640 { get; set; } /// /// /// - public global::Vectara.PipelineTriggerDiscriminatorType? Type641 { get; set; } + public global::Vectara.PipelineStatus? Type641 { get; set; } /// /// /// - public global::Vectara.ConditionVerification? Type642 { get; set; } + public global::Vectara.BaseS3SourceConfiguration? Type642 { get; set; } /// /// /// - public global::Vectara.AgentVerification? Type643 { get; set; } + public global::Vectara.S3SourceConfiguration? Type643 { get; set; } /// /// /// - public global::Vectara.PipelineVerification? Type644 { get; set; } + public global::Vectara.SharedGoogleDriveScope? Type644 { get; set; } /// /// /// - public global::Vectara.PipelineVerificationDiscriminator? Type645 { get; set; } + public global::Vectara.MyGoogleDriveScope? Type645 { get; set; } /// /// /// - public global::Vectara.PipelineVerificationDiscriminatorType? Type646 { get; set; } + public global::Vectara.GoogleDriveScope? Type646 { get; set; } /// /// /// - public global::Vectara.AgentTransformConfiguration? Type647 { get; set; } + public global::Vectara.GoogleDriveScopeDiscriminator? Type647 { get; set; } /// /// /// - public global::Vectara.PipelineTransform? Type648 { get; set; } + public global::Vectara.GoogleDriveScopeDiscriminatorType? Type648 { get; set; } /// /// /// - public global::Vectara.PipelineTransformDiscriminator? Type649 { get; set; } + public global::Vectara.BaseGoogleDriveSourceConfiguration? Type649 { get; set; } /// /// /// - public global::Vectara.PipelineTransformDiscriminatorType? Type650 { get; set; } + public global::System.Collections.Generic.IList? Type650 { get; set; } /// /// /// - public global::Vectara.PipelineSyncMode? Type651 { get; set; } + public global::Vectara.GoogleDriveSourceConfiguration? Type651 { get; set; } /// /// /// - public global::Vectara.PipelineWatermark? Type652 { get; set; } + public global::Vectara.BaseWebSource? Type652 { get; set; } /// /// /// - public global::Vectara.Pipeline? Type653 { get; set; } + public global::Vectara.SitemapPagesSource? Type653 { get; set; } /// /// /// - public global::Vectara.ListPipelinesResponse? Type654 { get; set; } + public global::Vectara.BaseCrawlPagesSource? Type654 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type655 { get; set; } + public global::Vectara.CrawlPagesSource? Type655 { get; set; } /// /// /// - public global::Vectara.CreatePipelineRequest? Type656 { get; set; } + public global::Vectara.CrawlPagesSourceVariant2? Type656 { get; set; } /// /// /// - public global::Vectara.UpdateS3SourceConfiguration? Type657 { get; set; } + public global::Vectara.SitemapCrawlPagesSource? Type657 { get; set; } /// /// /// - public global::Vectara.UpdateWebSourceConfiguration? Type658 { get; set; } + public global::Vectara.SitemapCrawlPagesSourceVariant2? Type658 { get; set; } /// /// /// - public global::Vectara.UpdateWebSourceConfigurationVariant2? Type659 { get; set; } + public global::Vectara.WebPagesSource? Type659 { get; set; } /// /// /// - public global::Vectara.UpdatePipelineSource? Type660 { get; set; } + public global::Vectara.WebPagesSourceDiscriminator? Type660 { get; set; } /// /// /// - public global::Vectara.UpdatePipelineSourceDiscriminator? Type661 { get; set; } + public global::Vectara.WebPagesSourceDiscriminatorType? Type661 { get; set; } /// /// /// - public global::Vectara.UpdatePipelineSourceDiscriminatorType? Type662 { get; set; } + public global::Vectara.WebSourceConfiguration? Type662 { get; set; } /// /// /// - public global::Vectara.UpdatePipelineRequest? Type663 { get; set; } + public global::Vectara.WebSourceConfigurationVariant2? Type663 { get; set; } /// /// /// - public global::Vectara.PipelineRunStatus? Type664 { get; set; } + public global::Vectara.PipelineSource? Type664 { get; set; } /// /// /// - public global::Vectara.PipelineRunTriggerType? Type665 { get; set; } + public global::Vectara.PipelineSourceDiscriminator? Type665 { get; set; } /// /// /// - public global::Vectara.PipelineRun? Type666 { get; set; } + public global::Vectara.PipelineSourceDiscriminatorType? Type666 { get; set; } /// /// /// - public global::Vectara.DeadLetterStatus? Type667 { get; set; } + public global::Vectara.CronTriggerConfiguration? Type667 { get; set; } /// /// /// - public global::Vectara.DeadLetterOrigin? Type668 { get; set; } + public global::Vectara.IntervalTriggerConfiguration? Type668 { get; set; } /// /// /// - public global::Vectara.PipelineDeadLetterEntry? Type669 { get; set; } + public global::Vectara.ManualTriggerConfiguration? Type669 { get; set; } /// /// /// - public global::Vectara.ListPipelineDeadLetterEntriesResponse? Type670 { get; set; } + public global::Vectara.PipelineTrigger? Type670 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type671 { get; set; } + public global::Vectara.PipelineTriggerDiscriminator? Type671 { get; set; } /// /// /// - public global::Vectara.CreatePipelineDeadLetterEntryRequest? Type672 { get; set; } + public global::Vectara.PipelineTriggerDiscriminatorType? Type672 { get; set; } /// /// /// - public global::Vectara.ProcessPipelineDeadLetterEntriesRequest? Type673 { get; set; } + public global::Vectara.ConditionVerification? Type673 { get; set; } /// /// /// - public global::Vectara.ListPipelineRunsResponse? Type674 { get; set; } + public global::Vectara.AgentVerification? Type674 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type675 { get; set; } + public global::Vectara.PipelineVerification? Type675 { get; set; } /// /// /// - public global::Vectara.PipelineRunEventType? Type676 { get; set; } + public global::Vectara.PipelineVerificationDiscriminator? Type676 { get; set; } /// /// /// - public global::Vectara.SortOrder? Type677 { get; set; } + public global::Vectara.PipelineVerificationDiscriminatorType? Type677 { get; set; } /// /// /// - public global::Vectara.PipelineRunEventBase? Type678 { get; set; } + public global::Vectara.AgentTransformConfiguration? Type678 { get; set; } /// /// /// - public global::Vectara.RunStartedEvent? Type679 { get; set; } + public global::Vectara.PipelineTransform? Type679 { get; set; } /// /// /// - public global::Vectara.RunStartedEventVariant2? Type680 { get; set; } + public global::Vectara.PipelineTransformDiscriminator? Type680 { get; set; } /// /// /// - public global::Vectara.RunCompletedEventStatus? Type681 { get; set; } + public global::Vectara.PipelineTransformDiscriminatorType? Type681 { get; set; } /// /// /// - public global::Vectara.RunCompletedEvent? Type682 { get; set; } + public global::Vectara.PipelineSyncMode? Type682 { get; set; } /// /// /// - public global::Vectara.RunCompletedEventVariant2? Type683 { get; set; } + public global::Vectara.PipelineWatermark? Type683 { get; set; } /// /// /// - public global::Vectara.RecordProcessingEventStatus? Type684 { get; set; } + public global::Vectara.Pipeline? Type684 { get; set; } /// /// /// - public global::Vectara.RecordProcessingEvent? Type685 { get; set; } + public global::Vectara.ListPipelinesResponse? Type685 { get; set; } /// /// /// - public global::Vectara.RecordProcessingEventVariant2? Type686 { get; set; } + public global::System.Collections.Generic.IList? Type686 { get; set; } /// /// /// - public global::Vectara.WatermarkAdvancedEvent? Type687 { get; set; } + public global::Vectara.CreatePipelineRequest? Type687 { get; set; } /// /// /// - public global::Vectara.WatermarkAdvancedEventVariant2? Type688 { get; set; } + public global::Vectara.UpdateS3SourceConfiguration? Type688 { get; set; } /// /// /// - public global::Vectara.PipelineRunEvent? Type689 { get; set; } + public global::Vectara.UpdateGoogleDriveSourceConfiguration? Type689 { get; set; } /// /// /// - public global::Vectara.PipelineRunEventDiscriminator? Type690 { get; set; } + public global::Vectara.UpdateWebSourceConfiguration? Type690 { get; set; } /// /// /// - public global::Vectara.PipelineRunEventDiscriminatorType? Type691 { get; set; } + public global::Vectara.UpdateWebSourceConfigurationVariant2? Type691 { get; set; } /// /// /// - public global::Vectara.ListPipelineRunEventsResponse? Type692 { get; set; } + public global::Vectara.UpdatePipelineSource? Type692 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type693 { get; set; } + public global::Vectara.UpdatePipelineSourceDiscriminator? Type693 { get; set; } /// /// /// - public global::Vectara.MetricDescriptorBase? Type694 { get; set; } + public global::Vectara.UpdatePipelineSourceDiscriminatorType? Type694 { get; set; } /// /// /// - public global::Vectara.CounterMetricDescriptor? Type695 { get; set; } + public global::Vectara.UpdatePipelineRequest? Type695 { get; set; } /// /// /// - public global::Vectara.CounterMetricDescriptorVariant2? Type696 { get; set; } + public global::Vectara.PipelineRunStatus? Type696 { get; set; } /// /// /// - public global::Vectara.GaugeMetricDescriptor? Type697 { get; set; } + public global::Vectara.PipelineRunTriggerType? Type697 { get; set; } /// /// /// - public global::Vectara.GaugeMetricDescriptorVariant2? Type698 { get; set; } + public global::Vectara.PipelineRun? Type698 { get; set; } /// /// /// - public global::Vectara.PercentileEntry? Type699 { get; set; } + public global::Vectara.DeadLetterStatus? Type699 { get; set; } /// /// /// - public global::Vectara.PercentilesMetricDescriptor? Type700 { get; set; } + public global::Vectara.DeadLetterOrigin? Type700 { get; set; } /// /// /// - public global::Vectara.PercentilesMetricDescriptorVariant2? Type701 { get; set; } + public global::Vectara.PipelineDeadLetterEntry? Type701 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type702 { get; set; } + public global::Vectara.ListPipelineDeadLetterEntriesResponse? Type702 { get; set; } /// /// /// - public global::Vectara.DistributionBinDescriptor? Type703 { get; set; } + public global::System.Collections.Generic.IList? Type703 { get; set; } /// /// /// - public global::Vectara.DistributionMetricDescriptor? Type704 { get; set; } + public global::Vectara.CreatePipelineDeadLetterEntryRequest? Type704 { get; set; } /// /// /// - public global::Vectara.DistributionMetricDescriptorVariant2? Type705 { get; set; } + public global::Vectara.ProcessPipelineDeadLetterEntriesRequest? Type705 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type706 { get; set; } + public global::Vectara.ListPipelineRunsResponse? Type706 { get; set; } /// /// /// - public global::Vectara.MetricDescriptor? Type707 { get; set; } + public global::System.Collections.Generic.IList? Type707 { get; set; } /// /// /// - public global::Vectara.MetricDescriptorDiscriminator? Type708 { get; set; } + public global::Vectara.PipelineRunEventType? Type708 { get; set; } /// /// /// - public global::Vectara.MetricDescriptorDiscriminatorKind? Type709 { get; set; } + public global::Vectara.SortOrder? Type709 { get; set; } /// /// /// - public global::Vectara.ListMetricsResponse? Type710 { get; set; } + public global::Vectara.PipelineRunEventBase? Type710 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type711 { get; set; } + public global::Vectara.RunStartedEvent? Type711 { get; set; } /// /// /// - public global::Vectara.MetricSeriesBase? Type712 { get; set; } + public global::Vectara.RunStartedEventVariant2? Type712 { get; set; } /// /// /// - public global::Vectara.ScalarMetricPoint? Type713 { get; set; } + public global::Vectara.RunCompletedEventStatus? Type713 { get; set; } /// /// /// - public global::Vectara.CounterMetricSeries? Type714 { get; set; } + public global::Vectara.RunCompletedEvent? Type714 { get; set; } /// /// /// - public global::Vectara.CounterMetricSeriesVariant2? Type715 { get; set; } + public global::Vectara.RunCompletedEventVariant2? Type715 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type716 { get; set; } + public global::Vectara.RecordProcessingEventStatus? Type716 { get; set; } /// /// /// - public global::Vectara.GaugeMetricSeries? Type717 { get; set; } + public global::Vectara.RecordProcessingEvent? Type717 { get; set; } /// /// /// - public global::Vectara.GaugeMetricSeriesVariant2? Type718 { get; set; } + public global::Vectara.RecordProcessingEventVariant2? Type718 { get; set; } /// /// /// - public global::Vectara.PercentilesMetricPoint? Type719 { get; set; } + public global::Vectara.WatermarkAdvancedEvent? Type719 { get; set; } /// /// /// - public global::Vectara.PercentilesMetricSeries? Type720 { get; set; } + public global::Vectara.WatermarkAdvancedEventVariant2? Type720 { get; set; } /// /// /// - public global::Vectara.PercentilesMetricSeriesVariant2? Type721 { get; set; } + public global::Vectara.PipelineRunEvent? Type721 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type722 { get; set; } + public global::Vectara.PipelineRunEventDiscriminator? Type722 { get; set; } /// /// /// - public global::Vectara.HistogramBin? Type723 { get; set; } + public global::Vectara.PipelineRunEventDiscriminatorType? Type723 { get; set; } /// /// /// - public global::Vectara.DistributionMetricPoint? Type724 { get; set; } + public global::Vectara.ListPipelineRunEventsResponse? Type724 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type725 { get; set; } + public global::System.Collections.Generic.IList? Type725 { get; set; } /// /// /// - public global::Vectara.DistributionMetricSeries? Type726 { get; set; } + public global::Vectara.MetricDescriptorBase? Type726 { get; set; } /// /// /// - public global::Vectara.DistributionMetricSeriesVariant2? Type727 { get; set; } + public global::Vectara.CounterMetricDescriptor? Type727 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type728 { get; set; } + public global::Vectara.CounterMetricDescriptorVariant2? Type728 { get; set; } /// /// /// - public global::Vectara.MetricSeries? Type729 { get; set; } + public global::Vectara.GaugeMetricDescriptor? Type729 { get; set; } /// /// /// - public global::Vectara.MetricSeriesDiscriminator? Type730 { get; set; } + public global::Vectara.GaugeMetricDescriptorVariant2? Type730 { get; set; } /// /// /// - public global::Vectara.MetricSeriesDiscriminatorKind? Type731 { get; set; } + public global::Vectara.PercentileEntry? Type731 { get; set; } /// /// /// - public global::Vectara.AgentTrace? Type732 { get; set; } + public global::Vectara.PercentilesMetricDescriptor? Type732 { get; set; } /// /// /// - public global::Vectara.AgentTraceStatus? Type733 { get; set; } + public global::Vectara.PercentilesMetricDescriptorVariant2? Type733 { get; set; } /// /// /// - public global::Vectara.ListAgentTracesResponse? Type734 { get; set; } + public global::System.Collections.Generic.IList? Type734 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type735 { get; set; } + public global::Vectara.DistributionBinDescriptor? Type735 { get; set; } /// /// /// - public global::Vectara.AgentTraceSpanStatus? Type736 { get; set; } + public global::Vectara.DistributionMetricDescriptor? Type736 { get; set; } /// /// /// - public global::Vectara.AgentTraceSpanBase? Type737 { get; set; } + public global::Vectara.DistributionMetricDescriptorVariant2? Type737 { get; set; } /// /// /// - public global::Vectara.AgentTraceInputFile? Type738 { get; set; } + public global::System.Collections.Generic.IList? Type738 { get; set; } /// /// /// - public global::Vectara.InvokeAgentSpanAttributes? Type739 { get; set; } + public global::Vectara.MetricDescriptor? Type739 { get; set; } /// /// /// - public global::Vectara.InvokeAgentSpanAttributesOutputType? Type740 { get; set; } + public global::Vectara.MetricDescriptorDiscriminator? Type740 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type741 { get; set; } + public global::Vectara.MetricDescriptorDiscriminatorKind? Type741 { get; set; } /// /// /// - public global::Vectara.InvokeAgentSpanContent? Type742 { get; set; } + public global::Vectara.ListMetricsResponse? Type742 { get; set; } /// /// /// - public global::Vectara.InvokeAgentTraceSpan? Type743 { get; set; } + public global::System.Collections.Generic.IList? Type743 { get; set; } /// /// /// - public global::Vectara.InvokeAgentTraceSpanVariant2? Type744 { get; set; } + public global::Vectara.MetricSeriesBase? Type744 { get; set; } /// /// /// - public global::Vectara.ChatSpanAttributes? Type745 { get; set; } + public global::Vectara.ScalarMetricPoint? Type745 { get; set; } /// /// /// - public global::Vectara.ChatTraceSpan? Type746 { get; set; } + public global::Vectara.CounterMetricSeries? Type746 { get; set; } /// /// /// - public global::Vectara.ChatTraceSpanVariant2? Type747 { get; set; } + public global::Vectara.CounterMetricSeriesVariant2? Type747 { get; set; } /// /// /// - public global::Vectara.ExecuteToolSpanAttributes? Type748 { get; set; } + public global::System.Collections.Generic.IList? Type748 { get; set; } /// /// /// - public global::Vectara.ExecuteToolSpanContent? Type749 { get; set; } + public global::Vectara.GaugeMetricSeries? Type749 { get; set; } /// /// /// - public global::Vectara.ExecuteToolTraceSpan? Type750 { get; set; } + public global::Vectara.GaugeMetricSeriesVariant2? Type750 { get; set; } /// /// /// - public global::Vectara.ExecuteToolTraceSpanVariant2? Type751 { get; set; } + public global::Vectara.PercentilesMetricPoint? Type751 { get; set; } /// /// /// - public global::Vectara.ThinkingSpanContent? Type752 { get; set; } + public global::Vectara.PercentilesMetricSeries? Type752 { get; set; } /// /// /// - public global::Vectara.ThinkingTraceSpan? Type753 { get; set; } + public global::Vectara.PercentilesMetricSeriesVariant2? Type753 { get; set; } /// /// /// - public global::Vectara.ThinkingTraceSpanVariant2? Type754 { get; set; } + public global::System.Collections.Generic.IList? Type754 { get; set; } /// /// /// - public global::Vectara.OutputSpanContent? Type755 { get; set; } + public global::Vectara.HistogramBin? Type755 { get; set; } /// /// /// - public global::Vectara.OutputTraceSpan? Type756 { get; set; } + public global::Vectara.DistributionMetricPoint? Type756 { get; set; } /// /// /// - public global::Vectara.OutputTraceSpanVariant2? Type757 { get; set; } + public global::System.Collections.Generic.IList? Type757 { get; set; } /// /// /// - public global::Vectara.GuardrailSpanAttributes? Type758 { get; set; } + public global::Vectara.DistributionMetricSeries? Type758 { get; set; } /// /// /// - public global::Vectara.GuardrailSpanContent? Type759 { get; set; } + public global::Vectara.DistributionMetricSeriesVariant2? Type759 { get; set; } /// /// /// - public global::Vectara.GuardrailTraceSpan? Type760 { get; set; } + public global::System.Collections.Generic.IList? Type760 { get; set; } /// /// /// - public global::Vectara.GuardrailTraceSpanVariant2? Type761 { get; set; } + public global::Vectara.MetricSeries? Type761 { get; set; } /// /// /// - public global::Vectara.StepTransitionSpanAttributes? Type762 { get; set; } + public global::Vectara.MetricSeriesDiscriminator? Type762 { get; set; } /// /// /// - public global::Vectara.StepTransitionTraceSpan? Type763 { get; set; } + public global::Vectara.MetricSeriesDiscriminatorKind? Type763 { get; set; } /// /// /// - public global::Vectara.StepTransitionTraceSpanVariant2? Type764 { get; set; } + public global::Vectara.AgentTrace? Type764 { get; set; } /// /// /// - public global::Vectara.ImageReadSpanAttributes? Type765 { get; set; } + public global::Vectara.AgentTraceStatus? Type765 { get; set; } /// /// /// - public global::Vectara.ImageReadTraceSpan? Type766 { get; set; } + public global::Vectara.ListAgentTracesResponse? Type766 { get; set; } /// /// /// - public global::Vectara.ImageReadTraceSpanVariant2? Type767 { get; set; } + public global::System.Collections.Generic.IList? Type767 { get; set; } /// /// /// - public global::Vectara.CompactionSpanAttributes? Type768 { get; set; } + public global::Vectara.AgentTraceSpanStatus? Type768 { get; set; } /// /// /// - public global::Vectara.CompactionTraceSpan? Type769 { get; set; } + public global::Vectara.AgentTraceSpanBase? Type769 { get; set; } /// /// /// - public global::Vectara.CompactionTraceSpanVariant2? Type770 { get; set; } + public global::Vectara.AgentTraceInputFile? Type770 { get; set; } /// /// /// - public global::Vectara.AgentTraceSpan? Type771 { get; set; } + public global::Vectara.InvokeAgentSpanAttributes? Type771 { get; set; } /// /// /// - public global::Vectara.AgentTraceSpanDiscriminator? Type772 { get; set; } + public global::Vectara.InvokeAgentSpanAttributesOutputType? Type772 { get; set; } /// /// /// - public global::Vectara.AgentTraceSpanDiscriminatorOperation? Type773 { get; set; } + public global::System.Collections.Generic.IList? Type773 { get; set; } /// /// /// - public global::Vectara.ListAgentTraceSpansResponse? Type774 { get; set; } + public global::Vectara.InvokeAgentSpanContent? Type774 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type775 { get; set; } + public global::Vectara.InvokeAgentTraceSpan? Type775 { get; set; } /// /// /// - public global::Vectara.Glossary? Type776 { get; set; } + public global::Vectara.InvokeAgentTraceSpanVariant2? Type776 { get; set; } /// /// /// - public global::Vectara.ListGlossariesResponse? Type777 { get; set; } + public global::Vectara.ChatSpanAttributes? Type777 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type778 { get; set; } + public global::Vectara.ChatTraceSpan? Type778 { get; set; } /// /// /// - public global::Vectara.CreateGlossaryRequest? Type779 { get; set; } + public global::Vectara.ChatTraceSpanVariant2? Type779 { get; set; } /// /// /// - public global::Vectara.UpdateGlossaryRequest? Type780 { get; set; } + public global::Vectara.ExecuteToolSpanAttributes? Type780 { get; set; } /// /// /// - public global::Vectara.GlossaryEntry? Type781 { get; set; } + public global::Vectara.ExecuteToolSpanContent? Type781 { get; set; } /// /// /// - public global::Vectara.GlossaryEntriesResponse? Type782 { get; set; } + public global::Vectara.ExecuteToolTraceSpan? Type782 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type783 { get; set; } + public global::Vectara.ExecuteToolTraceSpanVariant2? Type783 { get; set; } /// /// /// - public global::Vectara.UpsertGlossaryEntriesRequest? Type784 { get; set; } + public global::Vectara.ThinkingSpanContent? Type784 { get; set; } /// /// /// - public global::Vectara.DeleteGlossaryEntriesRequest? Type785 { get; set; } + public global::Vectara.ThinkingTraceSpan? Type785 { get; set; } /// /// /// - public global::Vectara.GetOAuthTokenRequest? Type786 { get; set; } + public global::Vectara.ThinkingTraceSpanVariant2? Type786 { get; set; } /// /// /// - public global::Vectara.CreateCorpusDocumentWaitFor? Type787 { get; set; } + public global::Vectara.OutputSpanContent? Type787 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type788 { get; set; } + public global::Vectara.OutputTraceSpan? Type788 { get; set; } /// /// /// - public global::Vectara.ListToolServersType? Type789 { get; set; } + public global::Vectara.OutputTraceSpanVariant2? Type789 { get; set; } /// /// /// - public global::Vectara.ListToolsType? Type790 { get; set; } + public global::Vectara.GuardrailSpanAttributes? Type790 { get; set; } /// /// /// - public global::Vectara.ListInstructionsType? Type791 { get; set; } + public global::Vectara.GuardrailSpanContent? Type791 { get; set; } /// /// /// - public global::Vectara.ListSessionArtifactsSortBy? Type792 { get; set; } + public global::Vectara.GuardrailTraceSpan? Type792 { get; set; } /// /// /// - public global::Vectara.ListSessionArtifactsOrderBy? Type793 { get; set; } + public global::Vectara.GuardrailTraceSpanVariant2? Type793 { get; set; } /// /// /// - public global::Vectara.ListAgentConnectorsType? Type794 { get; set; } + public global::Vectara.StepTransitionSpanAttributes? Type794 { get; set; } /// /// /// - public global::Vectara.ListPipelinesSourceType? Type795 { get; set; } + public global::Vectara.StepTransitionTraceSpan? Type795 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type796 { get; set; } + public global::Vectara.StepTransitionTraceSpanVariant2? Type796 { get; set; } /// /// /// - public global::Vectara.ListTracesStatus? Type797 { get; set; } + public global::Vectara.ImageReadSpanAttributes? Type797 { get; set; } /// /// /// - public global::Vectara.ListTracesErrorType? Type798 { get; set; } + public global::Vectara.ImageReadTraceSpan? Type798 { get; set; } /// /// /// - public global::Vectara.ListTracesOperation? Type799 { get; set; } + public global::Vectara.ImageReadTraceSpanVariant2? Type799 { get; set; } /// /// /// - public global::Vectara.ListTracesToolErrorType? Type800 { get; set; } + public global::Vectara.CompactionSpanAttributes? Type800 { get; set; } /// /// /// - public global::Vectara.ListTraceSpansOperation? Type801 { get; set; } + public global::Vectara.CompactionTraceSpan? Type801 { get; set; } /// /// /// - public global::Vectara.AllOf? Type802 { get; set; } + public global::Vectara.CompactionTraceSpanVariant2? Type802 { get; set; } /// /// /// - public global::Vectara.CreateUserResponse2? Type803 { get; set; } + public global::Vectara.AgentTraceSpan? Type803 { get; set; } /// /// /// - public global::Vectara.ResetUserPasswordResponse? Type804 { get; set; } + public global::Vectara.AgentTraceSpanDiscriminator? Type804 { get; set; } /// /// /// - public global::Vectara.GetTokenResponse? Type805 { get; set; } + public global::Vectara.AgentTraceSpanDiscriminatorOperation? Type805 { get; set; } + /// + /// + /// + public global::Vectara.ListAgentTraceSpansResponse? Type806 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type807 { get; set; } + /// + /// + /// + public global::Vectara.Glossary? Type808 { get; set; } + /// + /// + /// + public global::Vectara.ListGlossariesResponse? Type809 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type810 { get; set; } + /// + /// + /// + public global::Vectara.CreateGlossaryRequest? Type811 { get; set; } + /// + /// + /// + public global::Vectara.UpdateGlossaryRequest? Type812 { get; set; } + /// + /// + /// + public global::Vectara.GlossaryEntry? Type813 { get; set; } + /// + /// + /// + public global::Vectara.GlossaryEntriesResponse? Type814 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type815 { get; set; } + /// + /// + /// + public global::Vectara.UpsertGlossaryEntriesRequest? Type816 { get; set; } + /// + /// + /// + public global::Vectara.DeleteGlossaryEntriesRequest? Type817 { get; set; } + /// + /// + /// + public global::Vectara.GetOAuthTokenRequest? Type818 { get; set; } + /// + /// + /// + public global::Vectara.CreateCorpusDocumentWaitFor? Type819 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type820 { get; set; } + /// + /// + /// + public global::Vectara.ListToolServersType? Type821 { get; set; } + /// + /// + /// + public global::Vectara.ListToolsType? Type822 { get; set; } + /// + /// + /// + public global::Vectara.ListInstructionsType? Type823 { get; set; } + /// + /// + /// + public global::Vectara.ListSessionArtifactsSortBy? Type824 { get; set; } + /// + /// + /// + public global::Vectara.ListSessionArtifactsOrderBy? Type825 { get; set; } + /// + /// + /// + public global::Vectara.ListAgentConnectorsType? Type826 { get; set; } + /// + /// + /// + public global::Vectara.ListAliasRoutedSessionArtifactsSortBy? Type827 { get; set; } + /// + /// + /// + public global::Vectara.ListAliasRoutedSessionArtifactsOrderBy? Type828 { get; set; } + /// + /// + /// + public global::Vectara.ListPipelinesSourceType? Type829 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type830 { get; set; } + /// + /// + /// + public global::Vectara.ListTracesStatus? Type831 { get; set; } + /// + /// + /// + public global::Vectara.ListTracesErrorType? Type832 { get; set; } + /// + /// + /// + public global::Vectara.ListTracesOperation? Type833 { get; set; } + /// + /// + /// + public global::Vectara.ListTracesToolErrorType? Type834 { get; set; } + /// + /// + /// + public global::Vectara.ListTraceSpansOperation? Type835 { get; set; } + /// + /// + /// + public global::Vectara.AllOf? Type836 { get; set; } + /// + /// + /// + public global::Vectara.CreateUserResponse2? Type837 { get; set; } + /// + /// + /// + public global::Vectara.ResetUserPasswordResponse? Type838 { get; set; } + /// + /// + /// + public global::Vectara.GetTokenResponse? Type839 { get; set; } /// /// @@ -3513,74 +3649,90 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::System.Collections.Generic.List? ListType65 { get; set; } + public global::System.Collections.Generic.List? ListType65 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType66 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType67 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType68 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType69 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType66 { get; set; } + public global::System.Collections.Generic.List? ListType70 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType67 { get; set; } + public global::System.Collections.Generic.List? ListType71 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType68 { get; set; } + public global::System.Collections.Generic.List? ListType72 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType69 { get; set; } + public global::System.Collections.Generic.List? ListType73 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType70 { get; set; } + public global::System.Collections.Generic.List? ListType74 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType71 { get; set; } + public global::System.Collections.Generic.List? ListType75 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType72 { get; set; } + public global::System.Collections.Generic.List? ListType76 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType73 { get; set; } + public global::System.Collections.Generic.List? ListType77 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType74 { get; set; } + public global::System.Collections.Generic.List? ListType78 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType75 { get; set; } + public global::System.Collections.Generic.List? ListType79 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType76 { get; set; } + public global::System.Collections.Generic.List? ListType80 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType77 { get; set; } + public global::System.Collections.Generic.List? ListType81 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType78 { get; set; } + public global::System.Collections.Generic.List? ListType82 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType79 { get; set; } + public global::System.Collections.Generic.List? ListType83 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType80 { get; set; } + public global::System.Collections.Generic.List? ListType84 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType81 { get; set; } + public global::System.Collections.Generic.List? ListType85 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType82 { get; set; } + public global::System.Collections.Generic.List? ListType86 { get; set; } } } \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.AgentAlias.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.AgentAlias.Json.g.cs new file mode 100644 index 00000000..883b0f72 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.AgentAlias.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public sealed partial class AgentAlias + { + /// + /// 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.AgentAlias? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.AgentAlias), + jsonSerializerContext) as global::Vectara.AgentAlias; + } + + /// + /// 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.AgentAlias? 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.AgentAlias), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.AgentAlias; + } + + /// + /// 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.AgentAlias.g.cs b/src/libs/Vectara/Generated/Vectara.Models.AgentAlias.g.cs new file mode 100644 index 00000000..d43e7c21 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.AgentAlias.g.cs @@ -0,0 +1,140 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// A routing primitive that maps a public name to one or more agents under a configurable policy. When a session is created through an alias (via `POST /v2/agent_aliases/{alias_key}/sessions`), the alias's policy decides which underlying agent runs that session.
+ /// Use aliases for canary rollouts (weighted between two agents), tenant routing (different agents for different customers in your tenant metadata), or as a stable handle in front of agents whose configuration evolves.
+ /// Routing rules use userfn expressions — see the `AliasRule.match` field for the context shape and example expressions. + ///
+ public sealed partial class AgentAlias + { + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + ///
+ /// support + [global::System.Text.Json.Serialization.JsonPropertyName("key")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Key { get; set; } + + /// + /// A human-readable name for the alias.
+ /// Example: Customer Support + ///
+ /// Customer Support + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Name { get; set; } + + /// + /// A longer description of what this alias represents. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("description")] + public string? Description { get; set; } + + /// + /// A routing policy. The `type` discriminator determines which fields apply:
+ /// * `routed` — evaluate ordered rules; the first rule whose `match` expression evaluates to true is selected. The selected rule's `targets` are then used (one agent for `single`, hashed by `partition_by` for `weighted`). Rules with omitted `match` are catch-all rules (typically last).
+ /// Most use cases (direct, weighted/canary, conditional, conditional+canary) collapse into `routed`. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("policy")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Vectara.RoutedAliasPolicy Policy { get; set; } + + /// + /// Whether this alias is currently invocable. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("enabled")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool Enabled { get; set; } + + /// + /// Arbitrary metadata associated with the alias. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] + public object? Metadata { get; set; } + + /// + /// Timestamp when the alias was created. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTime CreatedAt { get; set; } + + /// + /// Timestamp when the alias was last updated. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("updated_at")] + public global::System.DateTime? UpdatedAt { 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 key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// + /// A human-readable name for the alias.
+ /// Example: Customer Support + /// + /// + /// A routing policy. The `type` discriminator determines which fields apply:
+ /// * `routed` — evaluate ordered rules; the first rule whose `match` expression evaluates to true is selected. The selected rule's `targets` are then used (one agent for `single`, hashed by `partition_by` for `weighted`). Rules with omitted `match` are catch-all rules (typically last).
+ /// Most use cases (direct, weighted/canary, conditional, conditional+canary) collapse into `routed`. + /// + /// + /// Whether this alias is currently invocable. + /// + /// + /// Timestamp when the alias was created. + /// + /// + /// A longer description of what this alias represents. + /// + /// + /// Arbitrary metadata associated with the alias. + /// + /// + /// Timestamp when the alias was last updated. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public AgentAlias( + string key, + string name, + global::Vectara.RoutedAliasPolicy policy, + bool enabled, + global::System.DateTime createdAt, + string? description, + object? metadata, + global::System.DateTime? updatedAt) + { + this.Key = key ?? throw new global::System.ArgumentNullException(nameof(key)); + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.Description = description; + this.Policy = policy ?? throw new global::System.ArgumentNullException(nameof(policy)); + this.Enabled = enabled; + this.Metadata = metadata; + this.CreatedAt = createdAt; + this.UpdatedAt = updatedAt; + } + + /// + /// Initializes a new instance of the class. + /// + public AgentAlias() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.AgentAliasMetadata.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.AgentAliasMetadata.Json.g.cs new file mode 100644 index 00000000..9f2de0b6 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.AgentAliasMetadata.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public sealed partial class AgentAliasMetadata + { + /// + /// 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.AgentAliasMetadata? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.AgentAliasMetadata), + jsonSerializerContext) as global::Vectara.AgentAliasMetadata; + } + + /// + /// 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.AgentAliasMetadata? 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.AgentAliasMetadata), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.AgentAliasMetadata; + } + + /// + /// 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.AgentAliasMetadata.g.cs b/src/libs/Vectara/Generated/Vectara.Models.AgentAliasMetadata.g.cs new file mode 100644 index 00000000..52636293 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.AgentAliasMetadata.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// Arbitrary metadata associated with the alias. + /// + public sealed partial class AgentAliasMetadata + { + + /// + /// 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.AgentSession.g.cs b/src/libs/Vectara/Generated/Vectara.Models.AgentSession.g.cs index ab4d1af3..d47ccfa9 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.AgentSession.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.AgentSession.g.cs @@ -100,6 +100,24 @@ public sealed partial class AgentSession [global::System.Text.Json.Serialization.JsonPropertyName("effective_compaction")] public global::Vectara.CompactionConfig? EffectiveCompaction { get; set; } + /// + /// If this session was created through an alias (`POST /v2/agent_aliases/{alias_key}/sessions`), the alias key the caller used. The `agent_key` field above is the resolved agent the alias's policy picked. Null when the session was created directly under an agent (`POST /v2/agents/{agent_key}/sessions`).
+ /// Example: support + ///
+ /// support + [global::System.Text.Json.Serialization.JsonPropertyName("alias_key")] + public string? AliasKey { get; set; } + + /// + /// Session-scoped secrets, with values masked as `"****"`. Plaintext is never returned on read;
+ /// tools resolve the real value via `argument_override` with `{"$ref": "session.secrets.<name>"}`.
+ /// Set or rotate via the session create or update request.
+ /// Example: {"slack_user_token":"****"} + ///
+ /// {"slack_user_token":"****"} + [global::System.Text.Json.Serialization.JsonPropertyName("secrets")] + public global::System.Collections.Generic.Dictionary? Secrets { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -154,6 +172,16 @@ public sealed partial class AgentSession /// /// Configuration for automatic context compaction. /// + /// + /// If this session was created through an alias (`POST /v2/agent_aliases/{alias_key}/sessions`), the alias key the caller used. The `agent_key` field above is the resolved agent the alias's policy picked. Null when the session was created directly under an agent (`POST /v2/agents/{agent_key}/sessions`).
+ /// Example: support + /// + /// + /// Session-scoped secrets, with values masked as `"****"`. Plaintext is never returned on read;
+ /// tools resolve the real value via `argument_override` with `{"$ref": "session.secrets.<name>"}`.
+ /// Set or rotate via the session create or update request.
+ /// Example: {"slack_user_token":"****"} + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif @@ -168,7 +196,9 @@ public AgentSession( string? currentStepName, long? ttiMinutes, global::Vectara.SessionContextUsage? sessionContextUsage, - global::Vectara.CompactionConfig? effectiveCompaction) + global::Vectara.CompactionConfig? effectiveCompaction, + string? aliasKey, + global::System.Collections.Generic.Dictionary? secrets) { this.Key = key ?? throw new global::System.ArgumentNullException(nameof(key)); this.AgentKey = agentKey ?? throw new global::System.ArgumentNullException(nameof(agentKey)); @@ -181,6 +211,8 @@ public AgentSession( this.CreatedAt = createdAt; this.SessionContextUsage = sessionContextUsage; this.EffectiveCompaction = effectiveCompaction; + this.AliasKey = aliasKey; + this.Secrets = secrets; } /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.AgentSessionSecrets.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.AgentSessionSecrets.Json.g.cs new file mode 100644 index 00000000..97d3adbb --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.AgentSessionSecrets.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public sealed partial class AgentSessionSecrets + { + /// + /// 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.AgentSessionSecrets? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.AgentSessionSecrets), + jsonSerializerContext) as global::Vectara.AgentSessionSecrets; + } + + /// + /// 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.AgentSessionSecrets? 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.AgentSessionSecrets), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.AgentSessionSecrets; + } + + /// + /// 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.AgentSessionSecrets.g.cs b/src/libs/Vectara/Generated/Vectara.Models.AgentSessionSecrets.g.cs new file mode 100644 index 00000000..7e21aeca --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.AgentSessionSecrets.g.cs @@ -0,0 +1,22 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// Session-scoped secrets, with values masked as `"****"`. Plaintext is never returned on read;
+ /// tools resolve the real value via `argument_override` with `{"$ref": "session.secrets.<name>"}`.
+ /// Set or rotate via the session create or update request.
+ /// Example: {"slack_user_token":"****"} + ///
+ public sealed partial class AgentSessionSecrets + { + + /// + /// 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.AliasPolicy.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.AliasPolicy.Json.g.cs new file mode 100644 index 00000000..f72511d6 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.AliasPolicy.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public readonly partial struct AliasPolicy + { + /// + /// 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.AliasPolicy? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.AliasPolicy), + jsonSerializerContext) as global::Vectara.AliasPolicy?; + } + + /// + /// 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.AliasPolicy? 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.AliasPolicy), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.AliasPolicy?; + } + + /// + /// 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.AliasPolicy.g.cs b/src/libs/Vectara/Generated/Vectara.Models.AliasPolicy.g.cs new file mode 100644 index 00000000..d4516073 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.AliasPolicy.g.cs @@ -0,0 +1,223 @@ +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace Vectara +{ + /// + /// A routing policy. The `type` discriminator determines which fields apply:
+ /// * `routed` — evaluate ordered rules; the first rule whose `match` expression evaluates to true is selected. The selected rule's `targets` are then used (one agent for `single`, hashed by `partition_by` for `weighted`). Rules with omitted `match` are catch-all rules (typically last).
+ /// Most use cases (direct, weighted/canary, conditional, conditional+canary) collapse into `routed`. + ///
+ public readonly partial struct AliasPolicy : global::System.IEquatable + { + /// + /// + /// + public global::Vectara.AliasPolicyDiscriminatorType? Type { get; } + + /// + /// Evaluates ordered rules against the session context. The first rule whose `match` expression evaluates to true is selected. The selected rule's `targets` shape determines what runs: `single` routes directly to one agent, `weighted` picks one of several agents by hashing the rule's `partition_by` expression. A rule with no `match` always matches (catch-all) and is conventionally placed last.
+ /// This single shape covers direct routing (one rule, single target), weighted/canary rollouts (one rule, weighted targets), conditional routing (multiple rules with matches), and conditional+canary combinations (multiple rules, each independently single or weighted). + ///
+#if NET6_0_OR_GREATER + public global::Vectara.RoutedAliasPolicy? Routed { get; init; } +#else + public global::Vectara.RoutedAliasPolicy? Routed { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Routed))] +#endif + public bool IsRouted => Routed != null; + + /// + /// + /// + public bool TryPickRouted( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.RoutedAliasPolicy? value) + { + value = Routed; + return IsRouted; + } + + /// + /// + /// + public global::Vectara.RoutedAliasPolicy PickRouted() => IsRouted + ? Routed! + : throw new global::System.InvalidOperationException($"Expected union variant 'Routed' but the value was {ToString()}."); + /// + /// + /// + public static implicit operator AliasPolicy(global::Vectara.RoutedAliasPolicy value) => new AliasPolicy((global::Vectara.RoutedAliasPolicy?)value); + + /// + /// + /// + public static implicit operator global::Vectara.RoutedAliasPolicy?(AliasPolicy @this) => @this.Routed; + + /// + /// + /// + public AliasPolicy(global::Vectara.RoutedAliasPolicy? value) + { + Routed = value; + } + + /// + /// + /// + public static AliasPolicy FromRouted(global::Vectara.RoutedAliasPolicy? value) => new AliasPolicy(value); + + /// + /// + /// + public AliasPolicy( + global::Vectara.AliasPolicyDiscriminatorType? type, + global::Vectara.RoutedAliasPolicy? routed + ) + { + Type = type; + + Routed = routed; + } + + /// + /// + /// + public object? Object => + Routed as object + ; + + /// + /// + /// + public override string? ToString() => + Routed?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsRouted; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? routed = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsRouted && routed != null) + { + return routed(Routed!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? routed = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsRouted) + { + routed?.Invoke(Routed!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? routed = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsRouted) + { + routed?.Invoke(Routed!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Routed, + typeof(global::Vectara.RoutedAliasPolicy), + }; + 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(AliasPolicy other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Routed, other.Routed) + ; + } + + /// + /// + /// + public static bool operator ==(AliasPolicy obj1, AliasPolicy obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(AliasPolicy obj1, AliasPolicy obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is AliasPolicy o && Equals(o); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.AliasPolicyDiscriminator.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.AliasPolicyDiscriminator.Json.g.cs new file mode 100644 index 00000000..debfaacf --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.AliasPolicyDiscriminator.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public sealed partial class AliasPolicyDiscriminator + { + /// + /// 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.AliasPolicyDiscriminator? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.AliasPolicyDiscriminator), + jsonSerializerContext) as global::Vectara.AliasPolicyDiscriminator; + } + + /// + /// 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.AliasPolicyDiscriminator? 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.AliasPolicyDiscriminator), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.AliasPolicyDiscriminator; + } + + /// + /// 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.AliasPolicyDiscriminator.g.cs b/src/libs/Vectara/Generated/Vectara.Models.AliasPolicyDiscriminator.g.cs new file mode 100644 index 00000000..2f050586 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.AliasPolicyDiscriminator.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// + /// + public sealed partial class AliasPolicyDiscriminator + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Vectara.JsonConverters.AliasPolicyDiscriminatorTypeJsonConverter))] + public global::Vectara.AliasPolicyDiscriminatorType? Type { 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 AliasPolicyDiscriminator( + global::Vectara.AliasPolicyDiscriminatorType? type) + { + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public AliasPolicyDiscriminator() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.AliasPolicyDiscriminatorType.g.cs b/src/libs/Vectara/Generated/Vectara.Models.AliasPolicyDiscriminatorType.g.cs new file mode 100644 index 00000000..1dab137b --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.AliasPolicyDiscriminatorType.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// + /// + public enum AliasPolicyDiscriminatorType + { + /// + /// + /// + Routed, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class AliasPolicyDiscriminatorTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this AliasPolicyDiscriminatorType value) + { + return value switch + { + AliasPolicyDiscriminatorType.Routed => "routed", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static AliasPolicyDiscriminatorType? ToEnum(string value) + { + return value switch + { + "routed" => AliasPolicyDiscriminatorType.Routed, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.AliasRule.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.AliasRule.Json.g.cs new file mode 100644 index 00000000..2f1107aa --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.AliasRule.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public sealed partial class AliasRule + { + /// + /// 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.AliasRule? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.AliasRule), + jsonSerializerContext) as global::Vectara.AliasRule; + } + + /// + /// 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.AliasRule? 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.AliasRule), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.AliasRule; + } + + /// + /// 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.AliasRule.g.cs b/src/libs/Vectara/Generated/Vectara.Models.AliasRule.g.cs new file mode 100644 index 00000000..c5818de4 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.AliasRule.g.cs @@ -0,0 +1,100 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// A single routing rule consisting of an optional `match` expression and a `targets` shape. A rule with `match` omitted is a catch-all that always applies. + /// + public sealed partial class AliasRule + { + /// + /// UserFn expression evaluating to boolean.
+ /// Uses the `get()` function with JSONPath to access the context.
+ /// See https://docs.vectara.com/docs/search-and-retrieval/rerankers/user-defined-function-reranker for the UserFn language reference.
+ /// Omit for a catch-all rule.
+ /// Missing paths return `null`; comparing against `null` is falsy, so the rule falls through to the next one in the policy. Use `get('$.path', default)` for an explicit fallback.
+ /// Context shape — note that at resolution time the underlying agent has NOT been picked yet, so the `agent.*` fields reflect the *alias's* metadata (name, description, metadata), with the alias's URL key in `agent.key`. Use these for alias-level context (e.g. `$.agent.metadata.region`); use `session.*` for per-call routing inputs (tenant, user_id, etc.) which is what most rules dispatch on.
+ /// ```
+ /// {
+ /// "agent": { "name", "key", "description", "metadata": { ... } }, // alias's metadata at resolution time
+ /// "session": { "key", "name", "description", "metadata": { ... } }, // the session being created
+ /// "currentDate": "2026-01-15T10:35:00Z"
+ /// }
+ /// ```
+ /// Examples:
+ /// * `get('$.session.metadata.tenant') == 'us'`
+ /// * `(get('$.session.metadata.tenant') == 'us') and (get('$.session.metadata.tier') == 'gold')`
+ /// * `(get('$.session.metadata.region') == 'us-west') or (get('$.session.metadata.region') == 'us-east')`
+ /// * `get('$.session.metadata.tier', 'free') != 'free'`
+ /// Example: (get('$.session.metadata.tenant') == 'us') and (get('$.session.metadata.tier') == 'gold') + ///
+ /// (get('$.session.metadata.tenant') == 'us') and (get('$.session.metadata.tier') == 'gold') + [global::System.Text.Json.Serialization.JsonPropertyName("match")] + public string? Match { get; set; } + + /// + /// The shape of a rule's targets. The `type` discriminator selects which fields apply:
+ /// * `single` — a direct route to one agent. No weight, no partition function.
+ /// * `weighted` — a weighted selection among several agents. Requires a `partition_by` userfn expression naming what to hash on; different rules can use different partition functions. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("targets")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Vectara.JsonConverters.RuleTargetsJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Vectara.RuleTargets Targets { 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 shape of a rule's targets. The `type` discriminator selects which fields apply:
+ /// * `single` — a direct route to one agent. No weight, no partition function.
+ /// * `weighted` — a weighted selection among several agents. Requires a `partition_by` userfn expression naming what to hash on; different rules can use different partition functions. + /// + /// + /// UserFn expression evaluating to boolean.
+ /// Uses the `get()` function with JSONPath to access the context.
+ /// See https://docs.vectara.com/docs/search-and-retrieval/rerankers/user-defined-function-reranker for the UserFn language reference.
+ /// Omit for a catch-all rule.
+ /// Missing paths return `null`; comparing against `null` is falsy, so the rule falls through to the next one in the policy. Use `get('$.path', default)` for an explicit fallback.
+ /// Context shape — note that at resolution time the underlying agent has NOT been picked yet, so the `agent.*` fields reflect the *alias's* metadata (name, description, metadata), with the alias's URL key in `agent.key`. Use these for alias-level context (e.g. `$.agent.metadata.region`); use `session.*` for per-call routing inputs (tenant, user_id, etc.) which is what most rules dispatch on.
+ /// ```
+ /// {
+ /// "agent": { "name", "key", "description", "metadata": { ... } }, // alias's metadata at resolution time
+ /// "session": { "key", "name", "description", "metadata": { ... } }, // the session being created
+ /// "currentDate": "2026-01-15T10:35:00Z"
+ /// }
+ /// ```
+ /// Examples:
+ /// * `get('$.session.metadata.tenant') == 'us'`
+ /// * `(get('$.session.metadata.tenant') == 'us') and (get('$.session.metadata.tier') == 'gold')`
+ /// * `(get('$.session.metadata.region') == 'us-west') or (get('$.session.metadata.region') == 'us-east')`
+ /// * `get('$.session.metadata.tier', 'free') != 'free'`
+ /// Example: (get('$.session.metadata.tenant') == 'us') and (get('$.session.metadata.tier') == 'gold') + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public AliasRule( + global::Vectara.RuleTargets targets, + string? match) + { + this.Match = match; + this.Targets = targets; + } + + /// + /// Initializes a new instance of the class. + /// + public AliasRule() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.BaseGoogleDriveSourceConfiguration.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.BaseGoogleDriveSourceConfiguration.Json.g.cs new file mode 100644 index 00000000..43f2dd82 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.BaseGoogleDriveSourceConfiguration.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public sealed partial class BaseGoogleDriveSourceConfiguration + { + /// + /// 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.BaseGoogleDriveSourceConfiguration? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.BaseGoogleDriveSourceConfiguration), + jsonSerializerContext) as global::Vectara.BaseGoogleDriveSourceConfiguration; + } + + /// + /// 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.BaseGoogleDriveSourceConfiguration? 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.BaseGoogleDriveSourceConfiguration), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.BaseGoogleDriveSourceConfiguration; + } + + /// + /// 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.BaseGoogleDriveSourceConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.Models.BaseGoogleDriveSourceConfiguration.g.cs new file mode 100644 index 00000000..bb06352d --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.BaseGoogleDriveSourceConfiguration.g.cs @@ -0,0 +1,102 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// Base Google Drive source configuration. The `scopes` list enumerates one or more starting
+ /// points — each entry is either a shared drive (`shared`) or a single user's My Drive accessed
+ /// via domain-wide delegation (`my_drive`). The service account configured here must have read
+ /// access to every listed drive and be authorized for each impersonated user. + ///
+ public sealed partial class BaseGoogleDriveSourceConfiguration + { + /// + /// Default Value: google_drive
+ /// Example: google_drive + ///
+ /// "google_drive" + /// google_drive + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Type { get; set; } = "google_drive"; + + /// + /// Drive starting points to ingest under this pipeline. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("scopes")] + public global::System.Collections.Generic.IList? Scopes { get; set; } + + /// + /// The Google Cloud service account's email address (the `client_email` field of
+ /// the service account JSON key). For `shared` scopes, grant this email read access
+ /// to each drive or folder you want to ingest.
+ /// Example: drive-ingest@my-project.iam.gserviceaccount.com + ///
+ /// drive-ingest@my-project.iam.gserviceaccount.com + [global::System.Text.Json.Serialization.JsonPropertyName("client_email")] + public string? ClientEmail { get; set; } + + /// + /// The service account's PEM-formatted RSA private key (the `private_key` field
+ /// of the service account JSON key, including the `-----BEGIN PRIVATE KEY-----`
+ /// and `-----END PRIVATE KEY-----` markers and embedded newlines). Encrypted at
+ /// rest and not returned in responses.
+ /// Included only in requests + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("private_key")] + public string? PrivateKey { 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. + /// + /// + /// Default Value: google_drive
+ /// Example: google_drive + /// + /// + /// Drive starting points to ingest under this pipeline. + /// + /// + /// The Google Cloud service account's email address (the `client_email` field of
+ /// the service account JSON key). For `shared` scopes, grant this email read access
+ /// to each drive or folder you want to ingest.
+ /// Example: drive-ingest@my-project.iam.gserviceaccount.com + /// + /// + /// The service account's PEM-formatted RSA private key (the `private_key` field
+ /// of the service account JSON key, including the `-----BEGIN PRIVATE KEY-----`
+ /// and `-----END PRIVATE KEY-----` markers and embedded newlines). Encrypted at
+ /// rest and not returned in responses.
+ /// Included only in requests + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public BaseGoogleDriveSourceConfiguration( + string type, + global::System.Collections.Generic.IList? scopes, + string? clientEmail, + string? privateKey) + { + this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); + this.Scopes = scopes; + this.ClientEmail = clientEmail; + this.PrivateKey = privateKey; + } + + /// + /// Initializes a new instance of the class. + /// + public BaseGoogleDriveSourceConfiguration() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.CreateAgentAliasRequest.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.CreateAgentAliasRequest.Json.g.cs new file mode 100644 index 00000000..3498944d --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.CreateAgentAliasRequest.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public sealed partial class CreateAgentAliasRequest + { + /// + /// 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.CreateAgentAliasRequest? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.CreateAgentAliasRequest), + jsonSerializerContext) as global::Vectara.CreateAgentAliasRequest; + } + + /// + /// 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.CreateAgentAliasRequest? 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.CreateAgentAliasRequest), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.CreateAgentAliasRequest; + } + + /// + /// 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.CreateAgentAliasRequest.g.cs b/src/libs/Vectara/Generated/Vectara.Models.CreateAgentAliasRequest.g.cs new file mode 100644 index 00000000..f64ef118 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.CreateAgentAliasRequest.g.cs @@ -0,0 +1,105 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// Request body for creating a new alias. + /// + public sealed partial class CreateAgentAliasRequest + { + /// + /// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + ///
+ /// support + [global::System.Text.Json.Serialization.JsonPropertyName("key")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Key { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Name { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("description")] + public string? Description { get; set; } + + /// + /// A routing policy. The `type` discriminator determines which fields apply:
+ /// * `routed` — evaluate ordered rules; the first rule whose `match` expression evaluates to true is selected. The selected rule's `targets` are then used (one agent for `single`, hashed by `partition_by` for `weighted`). Rules with omitted `match` are catch-all rules (typically last).
+ /// Most use cases (direct, weighted/canary, conditional, conditional+canary) collapse into `routed`. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("policy")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Vectara.RoutedAliasPolicy Policy { get; set; } + + /// + /// Default Value: true + /// + [global::System.Text.Json.Serialization.JsonPropertyName("enabled")] + public bool? Enabled { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] + public object? Metadata { 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 key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.
+ /// Example: support + /// + /// + /// + /// A routing policy. The `type` discriminator determines which fields apply:
+ /// * `routed` — evaluate ordered rules; the first rule whose `match` expression evaluates to true is selected. The selected rule's `targets` are then used (one agent for `single`, hashed by `partition_by` for `weighted`). Rules with omitted `match` are catch-all rules (typically last).
+ /// Most use cases (direct, weighted/canary, conditional, conditional+canary) collapse into `routed`. + /// + /// + /// + /// Default Value: true + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CreateAgentAliasRequest( + string key, + string name, + global::Vectara.RoutedAliasPolicy policy, + string? description, + bool? enabled, + object? metadata) + { + this.Key = key ?? throw new global::System.ArgumentNullException(nameof(key)); + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.Description = description; + this.Policy = policy ?? throw new global::System.ArgumentNullException(nameof(policy)); + this.Enabled = enabled; + this.Metadata = metadata; + } + + /// + /// Initializes a new instance of the class. + /// + public CreateAgentAliasRequest() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.CreateAgentAliasRequestMetadata.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.CreateAgentAliasRequestMetadata.Json.g.cs new file mode 100644 index 00000000..33e66aa5 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.CreateAgentAliasRequestMetadata.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public sealed partial class CreateAgentAliasRequestMetadata + { + /// + /// 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.CreateAgentAliasRequestMetadata? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.CreateAgentAliasRequestMetadata), + jsonSerializerContext) as global::Vectara.CreateAgentAliasRequestMetadata; + } + + /// + /// 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.CreateAgentAliasRequestMetadata? 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.CreateAgentAliasRequestMetadata), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.CreateAgentAliasRequestMetadata; + } + + /// + /// 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.CreateAgentAliasRequestMetadata.g.cs b/src/libs/Vectara/Generated/Vectara.Models.CreateAgentAliasRequestMetadata.g.cs new file mode 100644 index 00000000..ec33c198 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.CreateAgentAliasRequestMetadata.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// + /// + public sealed partial class CreateAgentAliasRequestMetadata + { + + /// + /// 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.CreateAgentSessionRequest.g.cs b/src/libs/Vectara/Generated/Vectara.Models.CreateAgentSessionRequest.g.cs index d4cbfd57..8b38b092 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.CreateAgentSessionRequest.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.CreateAgentSessionRequest.g.cs @@ -59,6 +59,16 @@ public sealed partial class CreateAgentSessionRequest [global::System.Text.Json.Serialization.JsonPropertyName("tti_minutes")] public long? TtiMinutes { get; set; } + /// + /// Session-scoped secrets to store on the new session. Map of secret name to plaintext value.
+ /// Encrypted at rest with the owning agent's encryption key. Referenced from tool `argument_override` via
+ /// `{"$ref": "session.secrets.<name>"}`. Returned masked (`****`) on reads.
+ /// Example: {"slack_user_token":"xoxp-your-token-here"} + ///
+ /// {"slack_user_token":"xoxp-your-token-here"} + [global::System.Text.Json.Serialization.JsonPropertyName("secrets")] + public global::System.Collections.Generic.Dictionary? Secrets { get; set; } + /// /// Create a new session by forking an existing one. By default, copies all visible events
/// and artifacts from the source session without compaction. Optionally specify exactly one of
@@ -104,6 +114,12 @@ public sealed partial class CreateAgentSessionRequest /// Default Value: 0
/// Example: 60 /// + /// + /// Session-scoped secrets to store on the new session. Map of secret name to plaintext value.
+ /// Encrypted at rest with the owning agent's encryption key. Referenced from tool `argument_override` via
+ /// `{"$ref": "session.secrets.<name>"}`. Returned masked (`****`) on reads.
+ /// Example: {"slack_user_token":"xoxp-your-token-here"} + /// /// /// Create a new session by forking an existing one. By default, copies all visible events
/// and artifacts from the source session without compaction. Optionally specify exactly one of
@@ -120,6 +136,7 @@ public CreateAgentSessionRequest( object? metadata, bool? enabled, long? ttiMinutes, + global::System.Collections.Generic.Dictionary? secrets, global::Vectara.CreateAgentSessionRequestFromSession? fromSession) { this.Key = key; @@ -128,6 +145,7 @@ public CreateAgentSessionRequest( this.Metadata = metadata; this.Enabled = enabled; this.TtiMinutes = ttiMinutes; + this.Secrets = secrets; this.FromSession = fromSession; } diff --git a/src/libs/Vectara/Generated/Vectara.Models.CreateAgentSessionRequestSecrets.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.CreateAgentSessionRequestSecrets.Json.g.cs new file mode 100644 index 00000000..c793ccba --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.CreateAgentSessionRequestSecrets.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public sealed partial class CreateAgentSessionRequestSecrets + { + /// + /// 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.CreateAgentSessionRequestSecrets? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.CreateAgentSessionRequestSecrets), + jsonSerializerContext) as global::Vectara.CreateAgentSessionRequestSecrets; + } + + /// + /// 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.CreateAgentSessionRequestSecrets? 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.CreateAgentSessionRequestSecrets), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.CreateAgentSessionRequestSecrets; + } + + /// + /// 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.CreateAgentSessionRequestSecrets.g.cs b/src/libs/Vectara/Generated/Vectara.Models.CreateAgentSessionRequestSecrets.g.cs new file mode 100644 index 00000000..17179980 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.CreateAgentSessionRequestSecrets.g.cs @@ -0,0 +1,22 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// Session-scoped secrets to store on the new session. Map of secret name to plaintext value.
+ /// Encrypted at rest with the owning agent's encryption key. Referenced from tool `argument_override` via
+ /// `{"$ref": "session.secrets.<name>"}`. Returned masked (`****`) on reads.
+ /// Example: {"slack_user_token":"xoxp-your-token-here"} + ///
+ public sealed partial class CreateAgentSessionRequestSecrets + { + + /// + /// 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.CreateDocumentRequest.g.cs b/src/libs/Vectara/Generated/Vectara.Models.CreateDocumentRequest.g.cs index 12d3cc57..cc9370ee 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.CreateDocumentRequest.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.CreateDocumentRequest.g.cs @@ -6,7 +6,7 @@ namespace Vectara { /// /// Creating a document using this endpoint can take multiple forms depending on how much control of the resulting document parts you desire. You can create a document with natural structure, and Vectara will use its proprietary strategy to create document parts. Otherwise, you can create a document with all the document parts explicitly specified. A document part is the search result item in search and Retrieval Augmented Generation endpoints.
- /// Example: {"type":"structured","id":"esg_report_2024","title":"2024 ESG Annual Report \u2013 EuroBank","description":"Comprehensive report on EuroBank\u2019s environmental, social, and governance initiatives for 2024, outlining sustainability goals and compliance with EU regulations.","metadata":{"doc_type":"esg_report","region":"EU","industry":"banking","year":2024,"status":"published","owner":"sustainability_team"},"sections":[{"id":1,"title":"Environmental Initiatives","text":"In 2024, EuroBank reduced carbon emissions by 22% through investments in renewable energy and energy-efficient infrastructure.","metadata":{"section_type":"environmental","priority":"high"}},{"id":2,"title":"Social Responsibility","text":"EuroBank expanded its community outreach programs, supporting over 500 local initiatives and increasing employee volunteer hours by 30%.","metadata":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","section_type":"social","priority":"medium"}]} + /// Example: {"type":"structured","id":"esg_report_2024","title":"2024 ESG Annual Report \u2013 EuroBank","description":"Comprehensive report on EuroBank\u2019s environmental, social, and governance initiatives for 2024, outlining sustainability goals and compliance with EU regulations.","metadata":{"doc_type":"esg_report","region":"EU","industry":"banking","year":2024,"status":"published","owner":"sustainability_team"},"sections":[{"id":1,"title":"Environmental Initiatives","text":"In 2024, EuroBank reduced carbon emissions by 22% through investments in renewable energy and energy-efficient infrastructure.","metadata":{"section_type":"environmental","priority":"high"}},{"id":2,"title":"Social Responsibility","text":"EuroBank expanded its community outreach programs, supporting over 500 local initiatives and increasing employee volunteer hours by 30%.","metadata":{"section_type":"social","priority":"medium"}}]} ///
public readonly partial struct CreateDocumentRequest : global::System.IEquatable { diff --git a/src/libs/Vectara/Generated/Vectara.Models.CreatePipelineDeadLetterEntryRequest.g.cs b/src/libs/Vectara/Generated/Vectara.Models.CreatePipelineDeadLetterEntryRequest.g.cs index 5f43e263..4a598716 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.CreatePipelineDeadLetterEntryRequest.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.CreatePipelineDeadLetterEntryRequest.g.cs @@ -14,6 +14,7 @@ public sealed partial class CreatePipelineDeadLetterEntryRequest /// The identifier for the source record to add. Format depends on connector type:
/// - S3: the object key (e.g. `legal/contracts/doc.pdf`)
/// - SharePoint: the drive item ID
+ /// - Google Drive: the file ID
/// - Web: the canonicalized URL (e.g. `https://docs.example.com/page`) ///
[global::System.Text.Json.Serialization.JsonPropertyName("source_record_id")] @@ -39,6 +40,7 @@ public sealed partial class CreatePipelineDeadLetterEntryRequest /// The identifier for the source record to add. Format depends on connector type:
/// - S3: the object key (e.g. `legal/contracts/doc.pdf`)
/// - SharePoint: the drive item ID
+ /// - Google Drive: the file ID
/// - Web: the canonicalized URL (e.g. `https://docs.example.com/page`) /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.GoogleDriveScope.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.GoogleDriveScope.Json.g.cs new file mode 100644 index 00000000..1d948cc1 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.GoogleDriveScope.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public readonly partial struct GoogleDriveScope + { + /// + /// 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.GoogleDriveScope? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.GoogleDriveScope), + jsonSerializerContext) as global::Vectara.GoogleDriveScope?; + } + + /// + /// 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.GoogleDriveScope? 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.GoogleDriveScope), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.GoogleDriveScope?; + } + + /// + /// 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.GoogleDriveScope.g.cs b/src/libs/Vectara/Generated/Vectara.Models.GoogleDriveScope.g.cs new file mode 100644 index 00000000..02f35df1 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.GoogleDriveScope.g.cs @@ -0,0 +1,309 @@ +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace Vectara +{ + /// + /// Which Drive content to ingest. Discriminated by `type`: `shared` ingests from a Google
+ /// Workspace shared drive the service account has been added to; `my_drive` ingests from a
+ /// single user's My Drive via domain-wide delegation. + ///
+ public readonly partial struct GoogleDriveScope : global::System.IEquatable + { + /// + /// + /// + public global::Vectara.GoogleDriveScopeDiscriminatorType? Type { get; } + + /// + /// Ingest from a Google Workspace shared drive. The service account (`client_email`) must
+ /// be added as a member of the shared drive — or of the linked folder — with at least Viewer
+ /// access. No domain-wide delegation is required. + ///
+#if NET6_0_OR_GREATER + public global::Vectara.SharedGoogleDriveScope? Shared { get; init; } +#else + public global::Vectara.SharedGoogleDriveScope? Shared { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Shared))] +#endif + public bool IsShared => Shared != null; + + /// + /// + /// + public bool TryPickShared( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.SharedGoogleDriveScope? value) + { + value = Shared; + return IsShared; + } + + /// + /// + /// + public global::Vectara.SharedGoogleDriveScope PickShared() => IsShared + ? Shared! + : throw new global::System.InvalidOperationException($"Expected union variant 'Shared' but the value was {ToString()}."); + + /// + /// Ingest from a single user's My Drive via Google Workspace domain-wide delegation. Requires
+ /// the Workspace admin to authorize the service account's client ID with the `drive.readonly`
+ /// OAuth scope. + ///
+#if NET6_0_OR_GREATER + public global::Vectara.MyGoogleDriveScope? MyDrive { get; init; } +#else + public global::Vectara.MyGoogleDriveScope? MyDrive { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MyDrive))] +#endif + public bool IsMyDrive => MyDrive != null; + + /// + /// + /// + public bool TryPickMyDrive( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.MyGoogleDriveScope? value) + { + value = MyDrive; + return IsMyDrive; + } + + /// + /// + /// + public global::Vectara.MyGoogleDriveScope PickMyDrive() => IsMyDrive + ? MyDrive! + : throw new global::System.InvalidOperationException($"Expected union variant 'MyDrive' but the value was {ToString()}."); + /// + /// + /// + public static implicit operator GoogleDriveScope(global::Vectara.SharedGoogleDriveScope value) => new GoogleDriveScope((global::Vectara.SharedGoogleDriveScope?)value); + + /// + /// + /// + public static implicit operator global::Vectara.SharedGoogleDriveScope?(GoogleDriveScope @this) => @this.Shared; + + /// + /// + /// + public GoogleDriveScope(global::Vectara.SharedGoogleDriveScope? value) + { + Shared = value; + } + + /// + /// + /// + public static GoogleDriveScope FromShared(global::Vectara.SharedGoogleDriveScope? value) => new GoogleDriveScope(value); + + /// + /// + /// + public static implicit operator GoogleDriveScope(global::Vectara.MyGoogleDriveScope value) => new GoogleDriveScope((global::Vectara.MyGoogleDriveScope?)value); + + /// + /// + /// + public static implicit operator global::Vectara.MyGoogleDriveScope?(GoogleDriveScope @this) => @this.MyDrive; + + /// + /// + /// + public GoogleDriveScope(global::Vectara.MyGoogleDriveScope? value) + { + MyDrive = value; + } + + /// + /// + /// + public static GoogleDriveScope FromMyDrive(global::Vectara.MyGoogleDriveScope? value) => new GoogleDriveScope(value); + + /// + /// + /// + public GoogleDriveScope( + global::Vectara.GoogleDriveScopeDiscriminatorType? type, + global::Vectara.SharedGoogleDriveScope? shared, + global::Vectara.MyGoogleDriveScope? myDrive + ) + { + Type = type; + + Shared = shared; + MyDrive = myDrive; + } + + /// + /// + /// + public object? Object => + MyDrive as object ?? + Shared as object + ; + + /// + /// + /// + public override string? ToString() => + Shared?.ToString() ?? + MyDrive?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsShared && !IsMyDrive || !IsShared && IsMyDrive; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? shared = null, + global::System.Func? myDrive = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsShared && shared != null) + { + return shared(Shared!); + } + else if (IsMyDrive && myDrive != null) + { + return myDrive(MyDrive!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? shared = null, + + global::System.Action? myDrive = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsShared) + { + shared?.Invoke(Shared!); + } + else if (IsMyDrive) + { + myDrive?.Invoke(MyDrive!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? shared = null, + global::System.Action? myDrive = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsShared) + { + shared?.Invoke(Shared!); + } + else if (IsMyDrive) + { + myDrive?.Invoke(MyDrive!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Shared, + typeof(global::Vectara.SharedGoogleDriveScope), + MyDrive, + typeof(global::Vectara.MyGoogleDriveScope), + }; + 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(GoogleDriveScope other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Shared, other.Shared) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(MyDrive, other.MyDrive) + ; + } + + /// + /// + /// + public static bool operator ==(GoogleDriveScope obj1, GoogleDriveScope obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(GoogleDriveScope obj1, GoogleDriveScope obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is GoogleDriveScope o && Equals(o); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.GoogleDriveScopeDiscriminator.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.GoogleDriveScopeDiscriminator.Json.g.cs new file mode 100644 index 00000000..02906dd1 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.GoogleDriveScopeDiscriminator.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public sealed partial class GoogleDriveScopeDiscriminator + { + /// + /// 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.GoogleDriveScopeDiscriminator? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.GoogleDriveScopeDiscriminator), + jsonSerializerContext) as global::Vectara.GoogleDriveScopeDiscriminator; + } + + /// + /// 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.GoogleDriveScopeDiscriminator? 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.GoogleDriveScopeDiscriminator), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.GoogleDriveScopeDiscriminator; + } + + /// + /// 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.GoogleDriveScopeDiscriminator.g.cs b/src/libs/Vectara/Generated/Vectara.Models.GoogleDriveScopeDiscriminator.g.cs new file mode 100644 index 00000000..c66230c0 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.GoogleDriveScopeDiscriminator.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// + /// + public sealed partial class GoogleDriveScopeDiscriminator + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Vectara.JsonConverters.GoogleDriveScopeDiscriminatorTypeJsonConverter))] + public global::Vectara.GoogleDriveScopeDiscriminatorType? Type { 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 GoogleDriveScopeDiscriminator( + global::Vectara.GoogleDriveScopeDiscriminatorType? type) + { + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public GoogleDriveScopeDiscriminator() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.GoogleDriveScopeDiscriminatorType.g.cs b/src/libs/Vectara/Generated/Vectara.Models.GoogleDriveScopeDiscriminatorType.g.cs new file mode 100644 index 00000000..9ee27cb8 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.GoogleDriveScopeDiscriminatorType.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// + /// + public enum GoogleDriveScopeDiscriminatorType + { + /// + /// + /// + MyDrive, + /// + /// + /// + Shared, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class GoogleDriveScopeDiscriminatorTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this GoogleDriveScopeDiscriminatorType value) + { + return value switch + { + GoogleDriveScopeDiscriminatorType.MyDrive => "my_drive", + GoogleDriveScopeDiscriminatorType.Shared => "shared", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static GoogleDriveScopeDiscriminatorType? ToEnum(string value) + { + return value switch + { + "my_drive" => GoogleDriveScopeDiscriminatorType.MyDrive, + "shared" => GoogleDriveScopeDiscriminatorType.Shared, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.GoogleDriveSourceConfiguration.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.GoogleDriveSourceConfiguration.Json.g.cs new file mode 100644 index 00000000..93f901a3 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.GoogleDriveSourceConfiguration.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public readonly partial struct GoogleDriveSourceConfiguration + { + /// + /// 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.GoogleDriveSourceConfiguration? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.GoogleDriveSourceConfiguration), + jsonSerializerContext) as global::Vectara.GoogleDriveSourceConfiguration?; + } + + /// + /// 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.GoogleDriveSourceConfiguration? 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.GoogleDriveSourceConfiguration), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.GoogleDriveSourceConfiguration?; + } + + /// + /// 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.GoogleDriveSourceConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.Models.GoogleDriveSourceConfiguration.g.cs new file mode 100644 index 00000000..388d8ffd --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.GoogleDriveSourceConfiguration.g.cs @@ -0,0 +1,275 @@ +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace Vectara +{ + /// + /// Configuration for ingesting files from Google Drive using a service account. + /// + public readonly partial struct GoogleDriveSourceConfiguration : global::System.IEquatable + { + /// + /// Base Google Drive source configuration. The `scopes` list enumerates one or more starting
+ /// points — each entry is either a shared drive (`shared`) or a single user's My Drive accessed
+ /// via domain-wide delegation (`my_drive`). The service account configured here must have read
+ /// access to every listed drive and be authorized for each impersonated user. + ///
+#if NET6_0_OR_GREATER + public global::Vectara.BaseGoogleDriveSourceConfiguration? Base { get; init; } +#else + public global::Vectara.BaseGoogleDriveSourceConfiguration? 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.BaseGoogleDriveSourceConfiguration? value) + { + value = Base; + return IsBase; + } + + /// + /// + /// + public global::Vectara.BaseGoogleDriveSourceConfiguration PickBase() => IsBase + ? Base! + : throw new global::System.InvalidOperationException($"Expected union variant 'Base' but the value was {ToString()}."); + + /// + /// + /// +#if NET6_0_OR_GREATER + public object? GoogleDriveSourceConfigurationVariant2 { get; init; } +#else + public object? GoogleDriveSourceConfigurationVariant2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(GoogleDriveSourceConfigurationVariant2))] +#endif + public bool IsGoogleDriveSourceConfigurationVariant2 => GoogleDriveSourceConfigurationVariant2 != null; + + /// + /// + /// + public bool TryPickGoogleDriveSourceConfigurationVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out object? value) + { + value = GoogleDriveSourceConfigurationVariant2; + return IsGoogleDriveSourceConfigurationVariant2; + } + + /// + /// + /// + public object PickGoogleDriveSourceConfigurationVariant2() => IsGoogleDriveSourceConfigurationVariant2 + ? GoogleDriveSourceConfigurationVariant2! + : throw new global::System.InvalidOperationException($"Expected union variant 'GoogleDriveSourceConfigurationVariant2' but the value was {ToString()}."); + /// + /// + /// + public static implicit operator GoogleDriveSourceConfiguration(global::Vectara.BaseGoogleDriveSourceConfiguration value) => new GoogleDriveSourceConfiguration((global::Vectara.BaseGoogleDriveSourceConfiguration?)value); + + /// + /// + /// + public static implicit operator global::Vectara.BaseGoogleDriveSourceConfiguration?(GoogleDriveSourceConfiguration @this) => @this.Base; + + /// + /// + /// + public GoogleDriveSourceConfiguration(global::Vectara.BaseGoogleDriveSourceConfiguration? value) + { + Base = value; + } + + /// + /// + /// + public static GoogleDriveSourceConfiguration FromBase(global::Vectara.BaseGoogleDriveSourceConfiguration? value) => new GoogleDriveSourceConfiguration(value); + + /// + /// + /// + public GoogleDriveSourceConfiguration( + global::Vectara.BaseGoogleDriveSourceConfiguration? @base, + object? googleDriveSourceConfigurationVariant2 + ) + { + Base = @base; + GoogleDriveSourceConfigurationVariant2 = googleDriveSourceConfigurationVariant2; + } + + /// + /// + /// + public object? Object => + GoogleDriveSourceConfigurationVariant2 as object ?? + Base as object + ; + + /// + /// + /// + public override string? ToString() => + Base?.ToString() ?? + GoogleDriveSourceConfigurationVariant2?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsBase && IsGoogleDriveSourceConfigurationVariant2; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? @base = null, + global::System.Func? googleDriveSourceConfigurationVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsBase && @base != null) + { + return @base(Base!); + } + else if (IsGoogleDriveSourceConfigurationVariant2 && googleDriveSourceConfigurationVariant2 != null) + { + return googleDriveSourceConfigurationVariant2(GoogleDriveSourceConfigurationVariant2!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? @base = null, + + global::System.Action? googleDriveSourceConfigurationVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsBase) + { + @base?.Invoke(Base!); + } + else if (IsGoogleDriveSourceConfigurationVariant2) + { + googleDriveSourceConfigurationVariant2?.Invoke(GoogleDriveSourceConfigurationVariant2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? @base = null, + global::System.Action? googleDriveSourceConfigurationVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsBase) + { + @base?.Invoke(Base!); + } + else if (IsGoogleDriveSourceConfigurationVariant2) + { + googleDriveSourceConfigurationVariant2?.Invoke(GoogleDriveSourceConfigurationVariant2!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Base, + typeof(global::Vectara.BaseGoogleDriveSourceConfiguration), + GoogleDriveSourceConfigurationVariant2, + typeof(object), + }; + 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(GoogleDriveSourceConfiguration other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Base, other.Base) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(GoogleDriveSourceConfigurationVariant2, other.GoogleDriveSourceConfigurationVariant2) + ; + } + + /// + /// + /// + public static bool operator ==(GoogleDriveSourceConfiguration obj1, GoogleDriveSourceConfiguration obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(GoogleDriveSourceConfiguration obj1, GoogleDriveSourceConfiguration obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is GoogleDriveSourceConfiguration o && Equals(o); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.GoogleDriveSourceConfigurationVariant2.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.GoogleDriveSourceConfigurationVariant2.Json.g.cs new file mode 100644 index 00000000..f38c2042 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.GoogleDriveSourceConfigurationVariant2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public sealed partial class GoogleDriveSourceConfigurationVariant2 + { + /// + /// 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.GoogleDriveSourceConfigurationVariant2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.GoogleDriveSourceConfigurationVariant2), + jsonSerializerContext) as global::Vectara.GoogleDriveSourceConfigurationVariant2; + } + + /// + /// 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.GoogleDriveSourceConfigurationVariant2? 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.GoogleDriveSourceConfigurationVariant2), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.GoogleDriveSourceConfigurationVariant2; + } + + /// + /// 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.GoogleDriveSourceConfigurationVariant2.g.cs b/src/libs/Vectara/Generated/Vectara.Models.GoogleDriveSourceConfigurationVariant2.g.cs new file mode 100644 index 00000000..e604dd40 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.GoogleDriveSourceConfigurationVariant2.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// + /// + public sealed partial class GoogleDriveSourceConfigurationVariant2 + { + + /// + /// 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.InlineDynamicVectaraToolConfigurationVariant2.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineDynamicVectaraToolConfigurationVariant2.g.cs index 157c4344..1758b350 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InlineDynamicVectaraToolConfigurationVariant2.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineDynamicVectaraToolConfigurationVariant2.g.cs @@ -34,6 +34,12 @@ public sealed partial class InlineDynamicVectaraToolConfigurationVariant2 /// References are resolved at runtime from context:
/// - session.metadata.* - Access session metadata fields
/// - agent.metadata.* - Access agent metadata fields
+ /// - agent.secrets.* - Access agent secrets (masked in audit events)
+ /// - tools.* - Access prior tool outputs (resolved after the dependent tool runs)
+ /// - currentDate - The current date/time in ISO 8601 format
+ /// A bracket index may reference another context value, whose resolved value is used as the lookup key. The inner path may optionally carry a leading $ root marker:
+ /// - Indirect reference: `{"$ref": "agent.secrets[session.metadata.user_id]"}` looks up the per-user secret named by `session.metadata.user_id`
+ /// - Equivalent forms: `agent.secrets[$session.metadata.user_id]` and `agent.secrets[$.session.metadata.user_id]`
/// Example:
/// `{"query": {"$ref": ".session.metadata.query"}}`
/// If you want to have a real value `"$ref"` use `"$$ref"`, that is you can escape the first $ by using $$.
@@ -68,6 +74,12 @@ public sealed partial class InlineDynamicVectaraToolConfigurationVariant2 /// References are resolved at runtime from context:
/// - session.metadata.* - Access session metadata fields
/// - agent.metadata.* - Access agent metadata fields
+ /// - agent.secrets.* - Access agent secrets (masked in audit events)
+ /// - tools.* - Access prior tool outputs (resolved after the dependent tool runs)
+ /// - currentDate - The current date/time in ISO 8601 format
+ /// A bracket index may reference another context value, whose resolved value is used as the lookup key. The inner path may optionally carry a leading $ root marker:
+ /// - Indirect reference: `{"$ref": "agent.secrets[session.metadata.user_id]"}` looks up the per-user secret named by `session.metadata.user_id`
+ /// - Equivalent forms: `agent.secrets[$session.metadata.user_id]` and `agent.secrets[$.session.metadata.user_id]`
/// Example:
/// `{"query": {"$ref": ".session.metadata.query"}}`
/// If you want to have a real value `"$ref"` use `"$$ref"`, that is you can escape the first $ by using $$.
diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineDynamicVectaraToolConfigurationVariant2ArgumentOverride.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineDynamicVectaraToolConfigurationVariant2ArgumentOverride.g.cs index 7b81d2b3..11827626 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InlineDynamicVectaraToolConfigurationVariant2ArgumentOverride.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineDynamicVectaraToolConfigurationVariant2ArgumentOverride.g.cs @@ -11,6 +11,12 @@ namespace Vectara /// References are resolved at runtime from context:
/// - session.metadata.* - Access session metadata fields
/// - agent.metadata.* - Access agent metadata fields
+ /// - agent.secrets.* - Access agent secrets (masked in audit events)
+ /// - tools.* - Access prior tool outputs (resolved after the dependent tool runs)
+ /// - currentDate - The current date/time in ISO 8601 format
+ /// A bracket index may reference another context value, whose resolved value is used as the lookup key. The inner path may optionally carry a leading $ root marker:
+ /// - Indirect reference: `{"$ref": "agent.secrets[session.metadata.user_id]"}` looks up the per-user secret named by `session.metadata.user_id`
+ /// - Equivalent forms: `agent.secrets[$session.metadata.user_id]` and `agent.secrets[$.session.metadata.user_id]`
/// Example:
/// `{"query": {"$ref": ".session.metadata.query"}}`
/// If you want to have a real value `"$ref"` use `"$$ref"`, that is you can escape the first $ by using $$.
diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineMcpToolConfigurationVariant2.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineMcpToolConfigurationVariant2.g.cs index 3a74ceb4..153ceb60 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InlineMcpToolConfigurationVariant2.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineMcpToolConfigurationVariant2.g.cs @@ -34,6 +34,12 @@ public sealed partial class InlineMcpToolConfigurationVariant2 /// References are resolved at runtime from context:
/// - session.metadata.* - Access session metadata fields
/// - agent.metadata.* - Access agent metadata fields
+ /// - agent.secrets.* - Access agent secrets (masked in audit events)
+ /// - tools.* - Access prior tool outputs (resolved after the dependent tool runs)
+ /// - currentDate - The current date/time in ISO 8601 format
+ /// A bracket index may reference another context value, whose resolved value is used as the lookup key. The inner path may optionally carry a leading $ root marker:
+ /// - Indirect reference: `{"$ref": "agent.secrets[session.metadata.user_id]"}` looks up the per-user secret named by `session.metadata.user_id`
+ /// - Equivalent forms: `agent.secrets[$session.metadata.user_id]` and `agent.secrets[$.session.metadata.user_id]`
/// Example:
/// `{"query": {"$ref": ".session.metadata.query"}}`
/// If you want to have a real value `"$ref"` use `"$$ref"`, that is you can escape the first $ by using $$.
@@ -68,6 +74,12 @@ public sealed partial class InlineMcpToolConfigurationVariant2 /// References are resolved at runtime from context:
/// - session.metadata.* - Access session metadata fields
/// - agent.metadata.* - Access agent metadata fields
+ /// - agent.secrets.* - Access agent secrets (masked in audit events)
+ /// - tools.* - Access prior tool outputs (resolved after the dependent tool runs)
+ /// - currentDate - The current date/time in ISO 8601 format
+ /// A bracket index may reference another context value, whose resolved value is used as the lookup key. The inner path may optionally carry a leading $ root marker:
+ /// - Indirect reference: `{"$ref": "agent.secrets[session.metadata.user_id]"}` looks up the per-user secret named by `session.metadata.user_id`
+ /// - Equivalent forms: `agent.secrets[$session.metadata.user_id]` and `agent.secrets[$.session.metadata.user_id]`
/// Example:
/// `{"query": {"$ref": ".session.metadata.query"}}`
/// If you want to have a real value `"$ref"` use `"$$ref"`, that is you can escape the first $ by using $$.
diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineMcpToolConfigurationVariant2ArgumentOverride.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineMcpToolConfigurationVariant2ArgumentOverride.g.cs index 592a2084..a51e7cea 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InlineMcpToolConfigurationVariant2ArgumentOverride.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineMcpToolConfigurationVariant2ArgumentOverride.g.cs @@ -11,6 +11,12 @@ namespace Vectara /// References are resolved at runtime from context:
/// - session.metadata.* - Access session metadata fields
/// - agent.metadata.* - Access agent metadata fields
+ /// - agent.secrets.* - Access agent secrets (masked in audit events)
+ /// - tools.* - Access prior tool outputs (resolved after the dependent tool runs)
+ /// - currentDate - The current date/time in ISO 8601 format
+ /// A bracket index may reference another context value, whose resolved value is used as the lookup key. The inner path may optionally carry a leading $ root marker:
+ /// - Indirect reference: `{"$ref": "agent.secrets[session.metadata.user_id]"}` looks up the per-user secret named by `session.metadata.user_id`
+ /// - Equivalent forms: `agent.secrets[$session.metadata.user_id]` and `agent.secrets[$.session.metadata.user_id]`
/// Example:
/// `{"query": {"$ref": ".session.metadata.query"}}`
/// If you want to have a real value `"$ref"` use `"$$ref"`, that is you can escape the first $ by using $$.
diff --git a/src/libs/Vectara/Generated/Vectara.Models.LLMAuth.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.LLMAuth.Json.g.cs new file mode 100644 index 00000000..3ce74155 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.LLMAuth.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public readonly partial struct LLMAuth + { + /// + /// 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.LLMAuth? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.LLMAuth), + jsonSerializerContext) as global::Vectara.LLMAuth?; + } + + /// + /// 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.LLMAuth? 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.LLMAuth), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.LLMAuth?; + } + + /// + /// 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.LLMAuth.g.cs b/src/libs/Vectara/Generated/Vectara.Models.LLMAuth.g.cs new file mode 100644 index 00000000..44f2a4f5 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.LLMAuth.g.cs @@ -0,0 +1,884 @@ +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace Vectara +{ + /// + /// Authentication configuration for an LLM. Union over every variant any LLM provider accepts. When returned on `GET`, secret fields contain the literal string `****`. + /// + public readonly partial struct LLMAuth : global::System.IEquatable + { + /// + /// + /// + public global::Vectara.LLMAuthDiscriminatorType? Type { get; } + + /// + /// Bearer token authentication + /// +#if NET6_0_OR_GREATER + public global::Vectara.BearerAuth? Bearer { get; init; } +#else + public global::Vectara.BearerAuth? Bearer { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Bearer))] +#endif + public bool IsBearer => Bearer != null; + + /// + /// + /// + public bool TryPickBearer( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.BearerAuth? value) + { + value = Bearer; + return IsBearer; + } + + /// + /// + /// + public global::Vectara.BearerAuth PickBearer() => IsBearer + ? Bearer! + : throw new global::System.InvalidOperationException($"Expected union variant 'Bearer' but the value was {ToString()}."); + + /// + /// Custom header-based authentication + /// +#if NET6_0_OR_GREATER + public global::Vectara.HeaderAuth? Header { get; init; } +#else + public global::Vectara.HeaderAuth? Header { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Header))] +#endif + public bool IsHeader => Header != null; + + /// + /// + /// + public bool TryPickHeader( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.HeaderAuth? value) + { + value = Header; + return IsHeader; + } + + /// + /// + /// + public global::Vectara.HeaderAuth PickHeader() => IsHeader + ? Header! + : throw new global::System.InvalidOperationException($"Expected union variant 'Header' but the value was {ToString()}."); + + /// + /// OAuth 2.0 client credentials authentication. The platform acquires an access token from the token endpoint before connecting to the remote service. + /// +#if NET6_0_OR_GREATER + public global::Vectara.OAuthClientCredentialsAuth? OauthClientCredentials { get; init; } +#else + public global::Vectara.OAuthClientCredentialsAuth? OauthClientCredentials { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(OauthClientCredentials))] +#endif + public bool IsOauthClientCredentials => OauthClientCredentials != null; + + /// + /// + /// + public bool TryPickOauthClientCredentials( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.OAuthClientCredentialsAuth? value) + { + value = OauthClientCredentials; + return IsOauthClientCredentials; + } + + /// + /// + /// + public global::Vectara.OAuthClientCredentialsAuth PickOauthClientCredentials() => IsOauthClientCredentials + ? OauthClientCredentials! + : throw new global::System.InvalidOperationException($"Expected union variant 'OauthClientCredentials' but the value was {ToString()}."); + + /// + /// AWS Bedrock authentication with explicit IAM credentials + /// +#if NET6_0_OR_GREATER + public global::Vectara.BedrockStaticIAMAuth? BedrockStaticIam { get; init; } +#else + public global::Vectara.BedrockStaticIAMAuth? BedrockStaticIam { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(BedrockStaticIam))] +#endif + public bool IsBedrockStaticIam => BedrockStaticIam != null; + + /// + /// + /// + public bool TryPickBedrockStaticIam( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.BedrockStaticIAMAuth? value) + { + value = BedrockStaticIam; + return IsBedrockStaticIam; + } + + /// + /// + /// + public global::Vectara.BedrockStaticIAMAuth PickBedrockStaticIam() => IsBedrockStaticIam + ? BedrockStaticIam! + : throw new global::System.InvalidOperationException($"Expected union variant 'BedrockStaticIam' but the value was {ToString()}."); + + /// + /// AWS Bedrock API key authentication + /// +#if NET6_0_OR_GREATER + public global::Vectara.BedrockApiKeyAuth? BedrockApiKey { get; init; } +#else + public global::Vectara.BedrockApiKeyAuth? BedrockApiKey { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(BedrockApiKey))] +#endif + public bool IsBedrockApiKey => BedrockApiKey != null; + + /// + /// + /// + public bool TryPickBedrockApiKey( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.BedrockApiKeyAuth? value) + { + value = BedrockApiKey; + return IsBedrockApiKey; + } + + /// + /// + /// + public global::Vectara.BedrockApiKeyAuth PickBedrockApiKey() => IsBedrockApiKey + ? BedrockApiKey! + : throw new global::System.InvalidOperationException($"Expected union variant 'BedrockApiKey' but the value was {ToString()}."); + + /// + /// Google Cloud Vertex AI service account authentication + /// +#if NET6_0_OR_GREATER + public global::Vectara.VertexServiceAccountAuth? VertexServiceAccount { get; init; } +#else + public global::Vectara.VertexServiceAccountAuth? VertexServiceAccount { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(VertexServiceAccount))] +#endif + public bool IsVertexServiceAccount => VertexServiceAccount != null; + + /// + /// + /// + public bool TryPickVertexServiceAccount( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.VertexServiceAccountAuth? value) + { + value = VertexServiceAccount; + return IsVertexServiceAccount; + } + + /// + /// + /// + public global::Vectara.VertexServiceAccountAuth PickVertexServiceAccount() => IsVertexServiceAccount + ? VertexServiceAccount! + : throw new global::System.InvalidOperationException($"Expected union variant 'VertexServiceAccount' but the value was {ToString()}."); + + /// + /// Google Cloud Vertex AI access token authentication + /// +#if NET6_0_OR_GREATER + public global::Vectara.VertexAccessTokenAuth? VertexAccessToken { get; init; } +#else + public global::Vectara.VertexAccessTokenAuth? VertexAccessToken { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(VertexAccessToken))] +#endif + public bool IsVertexAccessToken => VertexAccessToken != null; + + /// + /// + /// + public bool TryPickVertexAccessToken( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.VertexAccessTokenAuth? value) + { + value = VertexAccessToken; + return IsVertexAccessToken; + } + + /// + /// + /// + public global::Vectara.VertexAccessTokenAuth PickVertexAccessToken() => IsVertexAccessToken + ? VertexAccessToken! + : throw new global::System.InvalidOperationException($"Expected union variant 'VertexAccessToken' but the value was {ToString()}."); + + /// + /// API key authentication for Vertex AI + /// +#if NET6_0_OR_GREATER + public global::Vectara.VertexAiApiKeyAuth? ApiKey { get; init; } +#else + public global::Vectara.VertexAiApiKeyAuth? ApiKey { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ApiKey))] +#endif + public bool IsApiKey => ApiKey != null; + + /// + /// + /// + public bool TryPickApiKey( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.VertexAiApiKeyAuth? value) + { + value = ApiKey; + return IsApiKey; + } + + /// + /// + /// + public global::Vectara.VertexAiApiKeyAuth PickApiKey() => IsApiKey + ? ApiKey! + : throw new global::System.InvalidOperationException($"Expected union variant 'ApiKey' but the value was {ToString()}."); + + /// + /// Service account authentication for Vertex AI + /// +#if NET6_0_OR_GREATER + public global::Vectara.VertexAiServiceAccountAuth? ServiceAccount { get; init; } +#else + public global::Vectara.VertexAiServiceAccountAuth? ServiceAccount { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ServiceAccount))] +#endif + public bool IsServiceAccount => ServiceAccount != null; + + /// + /// + /// + public bool TryPickServiceAccount( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.VertexAiServiceAccountAuth? value) + { + value = ServiceAccount; + return IsServiceAccount; + } + + /// + /// + /// + public global::Vectara.VertexAiServiceAccountAuth PickServiceAccount() => IsServiceAccount + ? ServiceAccount! + : throw new global::System.InvalidOperationException($"Expected union variant 'ServiceAccount' but the value was {ToString()}."); + /// + /// + /// + public static implicit operator LLMAuth(global::Vectara.BearerAuth value) => new LLMAuth((global::Vectara.BearerAuth?)value); + + /// + /// + /// + public static implicit operator global::Vectara.BearerAuth?(LLMAuth @this) => @this.Bearer; + + /// + /// + /// + public LLMAuth(global::Vectara.BearerAuth? value) + { + Bearer = value; + } + + /// + /// + /// + public static LLMAuth FromBearer(global::Vectara.BearerAuth? value) => new LLMAuth(value); + + /// + /// + /// + public static implicit operator LLMAuth(global::Vectara.HeaderAuth value) => new LLMAuth((global::Vectara.HeaderAuth?)value); + + /// + /// + /// + public static implicit operator global::Vectara.HeaderAuth?(LLMAuth @this) => @this.Header; + + /// + /// + /// + public LLMAuth(global::Vectara.HeaderAuth? value) + { + Header = value; + } + + /// + /// + /// + public static LLMAuth FromHeader(global::Vectara.HeaderAuth? value) => new LLMAuth(value); + + /// + /// + /// + public static implicit operator LLMAuth(global::Vectara.OAuthClientCredentialsAuth value) => new LLMAuth((global::Vectara.OAuthClientCredentialsAuth?)value); + + /// + /// + /// + public static implicit operator global::Vectara.OAuthClientCredentialsAuth?(LLMAuth @this) => @this.OauthClientCredentials; + + /// + /// + /// + public LLMAuth(global::Vectara.OAuthClientCredentialsAuth? value) + { + OauthClientCredentials = value; + } + + /// + /// + /// + public static LLMAuth FromOauthClientCredentials(global::Vectara.OAuthClientCredentialsAuth? value) => new LLMAuth(value); + + /// + /// + /// + public static implicit operator LLMAuth(global::Vectara.BedrockStaticIAMAuth value) => new LLMAuth((global::Vectara.BedrockStaticIAMAuth?)value); + + /// + /// + /// + public static implicit operator global::Vectara.BedrockStaticIAMAuth?(LLMAuth @this) => @this.BedrockStaticIam; + + /// + /// + /// + public LLMAuth(global::Vectara.BedrockStaticIAMAuth? value) + { + BedrockStaticIam = value; + } + + /// + /// + /// + public static LLMAuth FromBedrockStaticIam(global::Vectara.BedrockStaticIAMAuth? value) => new LLMAuth(value); + + /// + /// + /// + public static implicit operator LLMAuth(global::Vectara.BedrockApiKeyAuth value) => new LLMAuth((global::Vectara.BedrockApiKeyAuth?)value); + + /// + /// + /// + public static implicit operator global::Vectara.BedrockApiKeyAuth?(LLMAuth @this) => @this.BedrockApiKey; + + /// + /// + /// + public LLMAuth(global::Vectara.BedrockApiKeyAuth? value) + { + BedrockApiKey = value; + } + + /// + /// + /// + public static LLMAuth FromBedrockApiKey(global::Vectara.BedrockApiKeyAuth? value) => new LLMAuth(value); + + /// + /// + /// + public static implicit operator LLMAuth(global::Vectara.VertexServiceAccountAuth value) => new LLMAuth((global::Vectara.VertexServiceAccountAuth?)value); + + /// + /// + /// + public static implicit operator global::Vectara.VertexServiceAccountAuth?(LLMAuth @this) => @this.VertexServiceAccount; + + /// + /// + /// + public LLMAuth(global::Vectara.VertexServiceAccountAuth? value) + { + VertexServiceAccount = value; + } + + /// + /// + /// + public static LLMAuth FromVertexServiceAccount(global::Vectara.VertexServiceAccountAuth? value) => new LLMAuth(value); + + /// + /// + /// + public static implicit operator LLMAuth(global::Vectara.VertexAccessTokenAuth value) => new LLMAuth((global::Vectara.VertexAccessTokenAuth?)value); + + /// + /// + /// + public static implicit operator global::Vectara.VertexAccessTokenAuth?(LLMAuth @this) => @this.VertexAccessToken; + + /// + /// + /// + public LLMAuth(global::Vectara.VertexAccessTokenAuth? value) + { + VertexAccessToken = value; + } + + /// + /// + /// + public static LLMAuth FromVertexAccessToken(global::Vectara.VertexAccessTokenAuth? value) => new LLMAuth(value); + + /// + /// + /// + public static implicit operator LLMAuth(global::Vectara.VertexAiApiKeyAuth value) => new LLMAuth((global::Vectara.VertexAiApiKeyAuth?)value); + + /// + /// + /// + public static implicit operator global::Vectara.VertexAiApiKeyAuth?(LLMAuth @this) => @this.ApiKey; + + /// + /// + /// + public LLMAuth(global::Vectara.VertexAiApiKeyAuth? value) + { + ApiKey = value; + } + + /// + /// + /// + public static LLMAuth FromApiKey(global::Vectara.VertexAiApiKeyAuth? value) => new LLMAuth(value); + + /// + /// + /// + public static implicit operator LLMAuth(global::Vectara.VertexAiServiceAccountAuth value) => new LLMAuth((global::Vectara.VertexAiServiceAccountAuth?)value); + + /// + /// + /// + public static implicit operator global::Vectara.VertexAiServiceAccountAuth?(LLMAuth @this) => @this.ServiceAccount; + + /// + /// + /// + public LLMAuth(global::Vectara.VertexAiServiceAccountAuth? value) + { + ServiceAccount = value; + } + + /// + /// + /// + public static LLMAuth FromServiceAccount(global::Vectara.VertexAiServiceAccountAuth? value) => new LLMAuth(value); + + /// + /// + /// + public LLMAuth( + global::Vectara.LLMAuthDiscriminatorType? type, + global::Vectara.BearerAuth? bearer, + global::Vectara.HeaderAuth? header, + global::Vectara.OAuthClientCredentialsAuth? oauthClientCredentials, + global::Vectara.BedrockStaticIAMAuth? bedrockStaticIam, + global::Vectara.BedrockApiKeyAuth? bedrockApiKey, + global::Vectara.VertexServiceAccountAuth? vertexServiceAccount, + global::Vectara.VertexAccessTokenAuth? vertexAccessToken, + global::Vectara.VertexAiApiKeyAuth? apiKey, + global::Vectara.VertexAiServiceAccountAuth? serviceAccount + ) + { + Type = type; + + Bearer = bearer; + Header = header; + OauthClientCredentials = oauthClientCredentials; + BedrockStaticIam = bedrockStaticIam; + BedrockApiKey = bedrockApiKey; + VertexServiceAccount = vertexServiceAccount; + VertexAccessToken = vertexAccessToken; + ApiKey = apiKey; + ServiceAccount = serviceAccount; + } + + /// + /// + /// + public object? Object => + ServiceAccount as object ?? + ApiKey as object ?? + VertexAccessToken as object ?? + VertexServiceAccount as object ?? + BedrockApiKey as object ?? + BedrockStaticIam as object ?? + OauthClientCredentials as object ?? + Header as object ?? + Bearer as object + ; + + /// + /// + /// + public override string? ToString() => + Bearer?.ToString() ?? + Header?.ToString() ?? + OauthClientCredentials?.ToString() ?? + BedrockStaticIam?.ToString() ?? + BedrockApiKey?.ToString() ?? + VertexServiceAccount?.ToString() ?? + VertexAccessToken?.ToString() ?? + ApiKey?.ToString() ?? + ServiceAccount?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsBearer && !IsHeader && !IsOauthClientCredentials && !IsBedrockStaticIam && !IsBedrockApiKey && !IsVertexServiceAccount && !IsVertexAccessToken && !IsApiKey && !IsServiceAccount || !IsBearer && IsHeader && !IsOauthClientCredentials && !IsBedrockStaticIam && !IsBedrockApiKey && !IsVertexServiceAccount && !IsVertexAccessToken && !IsApiKey && !IsServiceAccount || !IsBearer && !IsHeader && IsOauthClientCredentials && !IsBedrockStaticIam && !IsBedrockApiKey && !IsVertexServiceAccount && !IsVertexAccessToken && !IsApiKey && !IsServiceAccount || !IsBearer && !IsHeader && !IsOauthClientCredentials && IsBedrockStaticIam && !IsBedrockApiKey && !IsVertexServiceAccount && !IsVertexAccessToken && !IsApiKey && !IsServiceAccount || !IsBearer && !IsHeader && !IsOauthClientCredentials && !IsBedrockStaticIam && IsBedrockApiKey && !IsVertexServiceAccount && !IsVertexAccessToken && !IsApiKey && !IsServiceAccount || !IsBearer && !IsHeader && !IsOauthClientCredentials && !IsBedrockStaticIam && !IsBedrockApiKey && IsVertexServiceAccount && !IsVertexAccessToken && !IsApiKey && !IsServiceAccount || !IsBearer && !IsHeader && !IsOauthClientCredentials && !IsBedrockStaticIam && !IsBedrockApiKey && !IsVertexServiceAccount && IsVertexAccessToken && !IsApiKey && !IsServiceAccount || !IsBearer && !IsHeader && !IsOauthClientCredentials && !IsBedrockStaticIam && !IsBedrockApiKey && !IsVertexServiceAccount && !IsVertexAccessToken && IsApiKey && !IsServiceAccount || !IsBearer && !IsHeader && !IsOauthClientCredentials && !IsBedrockStaticIam && !IsBedrockApiKey && !IsVertexServiceAccount && !IsVertexAccessToken && !IsApiKey && IsServiceAccount; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? bearer = null, + global::System.Func? header = null, + global::System.Func? oauthClientCredentials = null, + global::System.Func? bedrockStaticIam = null, + global::System.Func? bedrockApiKey = null, + global::System.Func? vertexServiceAccount = null, + global::System.Func? vertexAccessToken = null, + global::System.Func? apiKey = null, + global::System.Func? serviceAccount = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsBearer && bearer != null) + { + return bearer(Bearer!); + } + else if (IsHeader && header != null) + { + return header(Header!); + } + else if (IsOauthClientCredentials && oauthClientCredentials != null) + { + return oauthClientCredentials(OauthClientCredentials!); + } + else if (IsBedrockStaticIam && bedrockStaticIam != null) + { + return bedrockStaticIam(BedrockStaticIam!); + } + else if (IsBedrockApiKey && bedrockApiKey != null) + { + return bedrockApiKey(BedrockApiKey!); + } + else if (IsVertexServiceAccount && vertexServiceAccount != null) + { + return vertexServiceAccount(VertexServiceAccount!); + } + else if (IsVertexAccessToken && vertexAccessToken != null) + { + return vertexAccessToken(VertexAccessToken!); + } + else if (IsApiKey && apiKey != null) + { + return apiKey(ApiKey!); + } + else if (IsServiceAccount && serviceAccount != null) + { + return serviceAccount(ServiceAccount!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? bearer = null, + + global::System.Action? header = null, + + global::System.Action? oauthClientCredentials = null, + + global::System.Action? bedrockStaticIam = null, + + global::System.Action? bedrockApiKey = null, + + global::System.Action? vertexServiceAccount = null, + + global::System.Action? vertexAccessToken = null, + + global::System.Action? apiKey = null, + + global::System.Action? serviceAccount = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsBearer) + { + bearer?.Invoke(Bearer!); + } + else if (IsHeader) + { + header?.Invoke(Header!); + } + else if (IsOauthClientCredentials) + { + oauthClientCredentials?.Invoke(OauthClientCredentials!); + } + else if (IsBedrockStaticIam) + { + bedrockStaticIam?.Invoke(BedrockStaticIam!); + } + else if (IsBedrockApiKey) + { + bedrockApiKey?.Invoke(BedrockApiKey!); + } + else if (IsVertexServiceAccount) + { + vertexServiceAccount?.Invoke(VertexServiceAccount!); + } + else if (IsVertexAccessToken) + { + vertexAccessToken?.Invoke(VertexAccessToken!); + } + else if (IsApiKey) + { + apiKey?.Invoke(ApiKey!); + } + else if (IsServiceAccount) + { + serviceAccount?.Invoke(ServiceAccount!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? bearer = null, + global::System.Action? header = null, + global::System.Action? oauthClientCredentials = null, + global::System.Action? bedrockStaticIam = null, + global::System.Action? bedrockApiKey = null, + global::System.Action? vertexServiceAccount = null, + global::System.Action? vertexAccessToken = null, + global::System.Action? apiKey = null, + global::System.Action? serviceAccount = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsBearer) + { + bearer?.Invoke(Bearer!); + } + else if (IsHeader) + { + header?.Invoke(Header!); + } + else if (IsOauthClientCredentials) + { + oauthClientCredentials?.Invoke(OauthClientCredentials!); + } + else if (IsBedrockStaticIam) + { + bedrockStaticIam?.Invoke(BedrockStaticIam!); + } + else if (IsBedrockApiKey) + { + bedrockApiKey?.Invoke(BedrockApiKey!); + } + else if (IsVertexServiceAccount) + { + vertexServiceAccount?.Invoke(VertexServiceAccount!); + } + else if (IsVertexAccessToken) + { + vertexAccessToken?.Invoke(VertexAccessToken!); + } + else if (IsApiKey) + { + apiKey?.Invoke(ApiKey!); + } + else if (IsServiceAccount) + { + serviceAccount?.Invoke(ServiceAccount!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Bearer, + typeof(global::Vectara.BearerAuth), + Header, + typeof(global::Vectara.HeaderAuth), + OauthClientCredentials, + typeof(global::Vectara.OAuthClientCredentialsAuth), + BedrockStaticIam, + typeof(global::Vectara.BedrockStaticIAMAuth), + BedrockApiKey, + typeof(global::Vectara.BedrockApiKeyAuth), + VertexServiceAccount, + typeof(global::Vectara.VertexServiceAccountAuth), + VertexAccessToken, + typeof(global::Vectara.VertexAccessTokenAuth), + ApiKey, + typeof(global::Vectara.VertexAiApiKeyAuth), + ServiceAccount, + typeof(global::Vectara.VertexAiServiceAccountAuth), + }; + 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(LLMAuth other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Bearer, other.Bearer) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Header, other.Header) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(OauthClientCredentials, other.OauthClientCredentials) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(BedrockStaticIam, other.BedrockStaticIam) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(BedrockApiKey, other.BedrockApiKey) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(VertexServiceAccount, other.VertexServiceAccount) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(VertexAccessToken, other.VertexAccessToken) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ApiKey, other.ApiKey) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ServiceAccount, other.ServiceAccount) + ; + } + + /// + /// + /// + public static bool operator ==(LLMAuth obj1, LLMAuth obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(LLMAuth obj1, LLMAuth obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is LLMAuth o && Equals(o); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.LLMAuthDiscriminator.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.LLMAuthDiscriminator.Json.g.cs new file mode 100644 index 00000000..1167ed24 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.LLMAuthDiscriminator.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public sealed partial class LLMAuthDiscriminator + { + /// + /// 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.LLMAuthDiscriminator? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.LLMAuthDiscriminator), + jsonSerializerContext) as global::Vectara.LLMAuthDiscriminator; + } + + /// + /// 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.LLMAuthDiscriminator? 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.LLMAuthDiscriminator), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.LLMAuthDiscriminator; + } + + /// + /// 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.LLMAuthDiscriminator.g.cs b/src/libs/Vectara/Generated/Vectara.Models.LLMAuthDiscriminator.g.cs new file mode 100644 index 00000000..4214e8df --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.LLMAuthDiscriminator.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// + /// + public sealed partial class LLMAuthDiscriminator + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Vectara.JsonConverters.LLMAuthDiscriminatorTypeJsonConverter))] + public global::Vectara.LLMAuthDiscriminatorType? Type { 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 LLMAuthDiscriminator( + global::Vectara.LLMAuthDiscriminatorType? type) + { + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public LLMAuthDiscriminator() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.LLMAuthDiscriminatorType.g.cs b/src/libs/Vectara/Generated/Vectara.Models.LLMAuthDiscriminatorType.g.cs new file mode 100644 index 00000000..62c2d763 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.LLMAuthDiscriminatorType.g.cs @@ -0,0 +1,93 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// + /// + public enum LLMAuthDiscriminatorType + { + /// + /// + /// + ApiKey, + /// + /// + /// + Bearer, + /// + /// + /// + BedrockApiKey, + /// + /// + /// + BedrockStaticIam, + /// + /// + /// + Header, + /// + /// + /// + OauthClientCredentials, + /// + /// + /// + ServiceAccount, + /// + /// + /// + VertexAccessToken, + /// + /// + /// + VertexServiceAccount, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class LLMAuthDiscriminatorTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this LLMAuthDiscriminatorType value) + { + return value switch + { + LLMAuthDiscriminatorType.ApiKey => "api_key", + LLMAuthDiscriminatorType.Bearer => "bearer", + LLMAuthDiscriminatorType.BedrockApiKey => "bedrock_api_key", + LLMAuthDiscriminatorType.BedrockStaticIam => "bedrock_static_iam", + LLMAuthDiscriminatorType.Header => "header", + LLMAuthDiscriminatorType.OauthClientCredentials => "oauth_client_credentials", + LLMAuthDiscriminatorType.ServiceAccount => "service_account", + LLMAuthDiscriminatorType.VertexAccessToken => "vertex_access_token", + LLMAuthDiscriminatorType.VertexServiceAccount => "vertex_service_account", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static LLMAuthDiscriminatorType? ToEnum(string value) + { + return value switch + { + "api_key" => LLMAuthDiscriminatorType.ApiKey, + "bearer" => LLMAuthDiscriminatorType.Bearer, + "bedrock_api_key" => LLMAuthDiscriminatorType.BedrockApiKey, + "bedrock_static_iam" => LLMAuthDiscriminatorType.BedrockStaticIam, + "header" => LLMAuthDiscriminatorType.Header, + "oauth_client_credentials" => LLMAuthDiscriminatorType.OauthClientCredentials, + "service_account" => LLMAuthDiscriminatorType.ServiceAccount, + "vertex_access_token" => LLMAuthDiscriminatorType.VertexAccessToken, + "vertex_service_account" => LLMAuthDiscriminatorType.VertexServiceAccount, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.ListAgentAliasesResponse.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ListAgentAliasesResponse.Json.g.cs new file mode 100644 index 00000000..85abbeb9 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.ListAgentAliasesResponse.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public sealed partial class ListAgentAliasesResponse + { + /// + /// 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.ListAgentAliasesResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.ListAgentAliasesResponse), + jsonSerializerContext) as global::Vectara.ListAgentAliasesResponse; + } + + /// + /// 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.ListAgentAliasesResponse? 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.ListAgentAliasesResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.ListAgentAliasesResponse; + } + + /// + /// 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.ListAgentAliasesResponse.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ListAgentAliasesResponse.g.cs new file mode 100644 index 00000000..06500110 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.ListAgentAliasesResponse.g.cs @@ -0,0 +1,60 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// Paginated response containing a list of aliases. + /// + public sealed partial class ListAgentAliasesResponse + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("aliases")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Aliases { get; set; } + + /// + /// The standard metadata in the response of a list operation.
+ /// Example: {"page_key":"eyJvZmZzZXQiOjF9"} + ///
+ /// {"page_key":"eyJvZmZzZXQiOjF9"} + [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Vectara.ListMetadata Metadata { 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 standard metadata in the response of a list operation.
+ /// Example: {"page_key":"eyJvZmZzZXQiOjF9"} + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ListAgentAliasesResponse( + global::System.Collections.Generic.IList aliases, + global::Vectara.ListMetadata metadata) + { + this.Aliases = aliases ?? throw new global::System.ArgumentNullException(nameof(aliases)); + this.Metadata = metadata ?? throw new global::System.ArgumentNullException(nameof(metadata)); + } + + /// + /// Initializes a new instance of the class. + /// + public ListAgentAliasesResponse() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.ListAliasRoutedSessionArtifactsOrderBy.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ListAliasRoutedSessionArtifactsOrderBy.g.cs new file mode 100644 index 00000000..3392ab38 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.ListAliasRoutedSessionArtifactsOrderBy.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// Default Value: desc + /// + public enum ListAliasRoutedSessionArtifactsOrderBy + { + /// + /// + /// + Asc, + /// + /// + /// + Desc, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ListAliasRoutedSessionArtifactsOrderByExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ListAliasRoutedSessionArtifactsOrderBy value) + { + return value switch + { + ListAliasRoutedSessionArtifactsOrderBy.Asc => "asc", + ListAliasRoutedSessionArtifactsOrderBy.Desc => "desc", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ListAliasRoutedSessionArtifactsOrderBy? ToEnum(string value) + { + return value switch + { + "asc" => ListAliasRoutedSessionArtifactsOrderBy.Asc, + "desc" => ListAliasRoutedSessionArtifactsOrderBy.Desc, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.ListAliasRoutedSessionArtifactsSortBy.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ListAliasRoutedSessionArtifactsSortBy.g.cs new file mode 100644 index 00000000..ac7108f9 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.ListAliasRoutedSessionArtifactsSortBy.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// Default Value: created_at + /// + public enum ListAliasRoutedSessionArtifactsSortBy + { + /// + /// + /// + CreatedAt, + /// + /// + /// + UpdatedAt, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ListAliasRoutedSessionArtifactsSortByExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ListAliasRoutedSessionArtifactsSortBy value) + { + return value switch + { + ListAliasRoutedSessionArtifactsSortBy.CreatedAt => "created_at", + ListAliasRoutedSessionArtifactsSortBy.UpdatedAt => "updated_at", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ListAliasRoutedSessionArtifactsSortBy? ToEnum(string value) + { + return value switch + { + "created_at" => ListAliasRoutedSessionArtifactsSortBy.CreatedAt, + "updated_at" => ListAliasRoutedSessionArtifactsSortBy.UpdatedAt, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.Llm.g.cs b/src/libs/Vectara/Generated/Vectara.Models.Llm.g.cs index b3de9eec..e37e751d 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.Llm.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.Llm.g.cs @@ -63,6 +63,47 @@ public sealed partial class Llm [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Vectara.JsonConverters.LLMOwnershipJsonConverter))] public global::Vectara.LLMOwnership? Ownership { get; set; } + /// + /// Provider type identifying which authentication and configuration apply. Required on responses; the server fails closed (HTTP 500) for any stored LLM whose connection spec it cannot map to one of these values. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Vectara.JsonConverters.LlmTypeJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Vectara.LlmType Type { get; set; } + + /// + /// Provider-specific model identifier (e.g. `gpt-4o`, `claude-3-5-sonnet-20241022`, `gemini-2.5-flash`). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("model")] + public string? Model { get; set; } + + /// + /// API endpoint URI configured for this LLM. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("uri")] + public string? Uri { get; set; } + + /// + /// Additional HTTP headers configured for requests to the LLM API. Not applicable to `vertex-ai`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("headers")] + public global::System.Collections.Generic.Dictionary? Headers { get; set; } + + /// + /// Maximum time in seconds the platform will wait for the model to send data before considering the connection stale and terminating it. For example, this is used as the SSE idle timeout during streaming — if no new server-sent events arrive within this window the stream is closed with an error. If unset, the platform falls back to its default read timeout for that provider (typically 60 seconds for OpenAI / Anthropic; provider SDK default for Vertex). On update, omit the field to leave the configured value unchanged or send an explicit null to clear it.
+ /// Example: 300 + ///
+ /// 300 + [global::System.Text.Json.Serialization.JsonPropertyName("idle_timeout_seconds")] + public int? IdleTimeoutSeconds { get; set; } + + /// + /// Authentication configuration for an LLM. Union over every variant any LLM provider accepts. When returned on `GET`, secret fields contain the literal string `****`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("auth")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Vectara.JsonConverters.LLMAuthJsonConverter))] + public global::Vectara.LLMAuth? Auth { get; set; } + /// /// List of prompts that the model can use. This is deprecated; see `/v2/generation_presets` instead. /// @@ -87,6 +128,9 @@ public sealed partial class Llm /// Name of the LLM.
/// Example: Claude 3.7 Sonnet /// + /// + /// Provider type identifying which authentication and configuration apply. Required on responses; the server fails closed (HTTP 500) for any stored LLM whose connection spec it cannot map to one of these values. + /// /// /// The description of the LLM.
/// Example: The Anthropic Claude 3.7 Sonnet model. @@ -104,17 +148,39 @@ public sealed partial class Llm /// Indicates whether the LLM is provided by the platform or created by the customer. Platform LLMs are pre-configured and cannot be modified or deleted. Customer LLMs are created and managed by the customer.
/// Example: platform /// + /// + /// Provider-specific model identifier (e.g. `gpt-4o`, `claude-3-5-sonnet-20241022`, `gemini-2.5-flash`). + /// + /// + /// API endpoint URI configured for this LLM. + /// + /// + /// Additional HTTP headers configured for requests to the LLM API. Not applicable to `vertex-ai`. + /// + /// + /// Maximum time in seconds the platform will wait for the model to send data before considering the connection stale and terminating it. For example, this is used as the SSE idle timeout during streaming — if no new server-sent events arrive within this window the stream is closed with an error. If unset, the platform falls back to its default read timeout for that provider (typically 60 seconds for OpenAI / Anthropic; provider SDK default for Vertex). On update, omit the field to leave the configured value unchanged or send an explicit null to clear it.
+ /// Example: 300 + /// + /// + /// Authentication configuration for an LLM. Union over every variant any LLM provider accepts. When returned on `GET`, secret fields contain the literal string `****`. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public Llm( string id, string name, + global::Vectara.LlmType type, string? description, bool? enabled, bool? @default, global::Vectara.LLMCapabilities? capabilities, - global::Vectara.LLMOwnership? ownership) + global::Vectara.LLMOwnership? ownership, + string? model, + string? uri, + global::System.Collections.Generic.Dictionary? headers, + int? idleTimeoutSeconds, + global::Vectara.LLMAuth? auth) { this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); @@ -123,6 +189,12 @@ public Llm( this.Default = @default; this.Capabilities = capabilities; this.Ownership = ownership; + this.Type = type; + this.Model = model; + this.Uri = uri; + this.Headers = headers; + this.IdleTimeoutSeconds = idleTimeoutSeconds; + this.Auth = auth; } /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.LlmHeaders.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.LlmHeaders.Json.g.cs new file mode 100644 index 00000000..db537238 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.LlmHeaders.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public sealed partial class LlmHeaders + { + /// + /// 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.LlmHeaders? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.LlmHeaders), + jsonSerializerContext) as global::Vectara.LlmHeaders; + } + + /// + /// 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.LlmHeaders? 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.LlmHeaders), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.LlmHeaders; + } + + /// + /// 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.LlmHeaders.g.cs b/src/libs/Vectara/Generated/Vectara.Models.LlmHeaders.g.cs new file mode 100644 index 00000000..e7529f59 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.LlmHeaders.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// Additional HTTP headers configured for requests to the LLM API. Not applicable to `vertex-ai`. + /// + public sealed partial class LlmHeaders + { + + /// + /// 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.LlmType.g.cs b/src/libs/Vectara/Generated/Vectara.Models.LlmType.g.cs new file mode 100644 index 00000000..dc97db6e --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.LlmType.g.cs @@ -0,0 +1,63 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// Provider type identifying which authentication and configuration apply. Required on responses; the server fails closed (HTTP 500) for any stored LLM whose connection spec it cannot map to one of these values. + /// + public enum LlmType + { + /// + /// + /// + Anthropic, + /// + /// + /// + OpenaiCompatible, + /// + /// + /// + OpenaiResponses, + /// + /// + /// + VertexAi, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class LlmTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this LlmType value) + { + return value switch + { + LlmType.Anthropic => "anthropic", + LlmType.OpenaiCompatible => "openai-compatible", + LlmType.OpenaiResponses => "openai-responses", + LlmType.VertexAi => "vertex-ai", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static LlmType? ToEnum(string value) + { + return value switch + { + "anthropic" => LlmType.Anthropic, + "openai-compatible" => LlmType.OpenaiCompatible, + "openai-responses" => LlmType.OpenaiResponses, + "vertex-ai" => LlmType.VertexAi, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.MyGoogleDriveScope.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.MyGoogleDriveScope.Json.g.cs new file mode 100644 index 00000000..21df9a4c --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.MyGoogleDriveScope.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public sealed partial class MyGoogleDriveScope + { + /// + /// 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.MyGoogleDriveScope? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.MyGoogleDriveScope), + jsonSerializerContext) as global::Vectara.MyGoogleDriveScope; + } + + /// + /// 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.MyGoogleDriveScope? 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.MyGoogleDriveScope), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.MyGoogleDriveScope; + } + + /// + /// 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.MyGoogleDriveScope.g.cs b/src/libs/Vectara/Generated/Vectara.Models.MyGoogleDriveScope.g.cs new file mode 100644 index 00000000..630575b6 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.MyGoogleDriveScope.g.cs @@ -0,0 +1,88 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// Ingest from a single user's My Drive via Google Workspace domain-wide delegation. Requires
+ /// the Workspace admin to authorize the service account's client ID with the `drive.readonly`
+ /// OAuth scope. + ///
+ public sealed partial class MyGoogleDriveScope + { + /// + /// Default Value: my_drive
+ /// Example: my_drive + ///
+ /// "my_drive" + /// my_drive + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Type { get; set; } = "my_drive"; + + /// + /// User email address whose My Drive the service account impersonates.
+ /// Example: user@example.com + ///
+ /// user@example.com + [global::System.Text.Json.Serialization.JsonPropertyName("subject_email")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string SubjectEmail { get; set; } + + /// + /// Optional URL of a folder within the user's My Drive
+ /// (`https://drive.google.com/drive/folders/<folder_id>`) to narrow ingestion to that
+ /// subtree. The connector walks all descendant subfolders and indexes every file within.
+ /// If omitted, every accessible file in the user's My Drive is enumerated.
+ /// Example: https://drive.google.com/drive/folders/1A2B3C4D5E6F7G8H9I0J + ///
+ /// https://drive.google.com/drive/folders/1A2B3C4D5E6F7G8H9I0J + [global::System.Text.Json.Serialization.JsonPropertyName("url")] + public string? Url { 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. + /// + /// + /// Default Value: my_drive
+ /// Example: my_drive + /// + /// + /// User email address whose My Drive the service account impersonates.
+ /// Example: user@example.com + /// + /// + /// Optional URL of a folder within the user's My Drive
+ /// (`https://drive.google.com/drive/folders/<folder_id>`) to narrow ingestion to that
+ /// subtree. The connector walks all descendant subfolders and indexes every file within.
+ /// If omitted, every accessible file in the user's My Drive is enumerated.
+ /// Example: https://drive.google.com/drive/folders/1A2B3C4D5E6F7G8H9I0J + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public MyGoogleDriveScope( + string type, + string subjectEmail, + string? url) + { + this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); + this.SubjectEmail = subjectEmail ?? throw new global::System.ArgumentNullException(nameof(subjectEmail)); + this.Url = url; + } + + /// + /// Initializes a new instance of the class. + /// + public MyGoogleDriveScope() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.PipelineDeadLetterEntry.g.cs b/src/libs/Vectara/Generated/Vectara.Models.PipelineDeadLetterEntry.g.cs index 4eccabcb..1724aafb 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.PipelineDeadLetterEntry.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.PipelineDeadLetterEntry.g.cs @@ -24,6 +24,7 @@ public sealed partial class PipelineDeadLetterEntry /// The identifier for the source record. Format depends on connector type:
/// - S3: the object key (e.g. `legal/contracts/doc.pdf`)
/// - SharePoint: the drive item ID
+ /// - Google Drive: the file ID
/// - Web: the canonicalized URL (e.g. `https://docs.example.com/page`) ///
[global::System.Text.Json.Serialization.JsonPropertyName("source_record_id")] @@ -91,6 +92,7 @@ public sealed partial class PipelineDeadLetterEntry /// The identifier for the source record. Format depends on connector type:
/// - S3: the object key (e.g. `legal/contracts/doc.pdf`)
/// - SharePoint: the drive item ID
+ /// - Google Drive: the file ID
/// - Web: the canonicalized URL (e.g. `https://docs.example.com/page`) /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.PipelineSource.g.cs b/src/libs/Vectara/Generated/Vectara.Models.PipelineSource.g.cs index 41ddab76..159ddf9a 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.PipelineSource.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.PipelineSource.g.cs @@ -51,6 +51,43 @@ public bool TryPickS3( ? S3!.Value : throw new global::System.InvalidOperationException($"Expected union variant 'S3' but the value was {ToString()}."); + /// + /// Configuration for ingesting files from Google Drive using a service account. + /// +#if NET6_0_OR_GREATER + public global::Vectara.GoogleDriveSourceConfiguration? GoogleDrive { get; init; } +#else + public global::Vectara.GoogleDriveSourceConfiguration? GoogleDrive { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(GoogleDrive))] +#endif + public bool IsGoogleDrive => GoogleDrive != null; + + /// + /// + /// + public bool TryPickGoogleDrive( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.GoogleDriveSourceConfiguration? value) + { + value = GoogleDrive; + return IsGoogleDrive; + } + + /// + /// + /// + public global::Vectara.GoogleDriveSourceConfiguration PickGoogleDrive() => IsGoogleDrive + ? GoogleDrive!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'GoogleDrive' but the value was {ToString()}."); + /// /// Configuration for ingesting pages from a website. Politeness, limits, and auth are configured
/// here; the `pages_source` field selects how URLs are discovered (sitemap, crawl, or both). @@ -111,6 +148,29 @@ public PipelineSource(global::Vectara.S3SourceConfiguration? value) ///
public static PipelineSource FromS3(global::Vectara.S3SourceConfiguration? value) => new PipelineSource(value); + /// + /// + /// + public static implicit operator PipelineSource(global::Vectara.GoogleDriveSourceConfiguration value) => new PipelineSource((global::Vectara.GoogleDriveSourceConfiguration?)value); + + /// + /// + /// + public static implicit operator global::Vectara.GoogleDriveSourceConfiguration?(PipelineSource @this) => @this.GoogleDrive; + + /// + /// + /// + public PipelineSource(global::Vectara.GoogleDriveSourceConfiguration? value) + { + GoogleDrive = value; + } + + /// + /// + /// + public static PipelineSource FromGoogleDrive(global::Vectara.GoogleDriveSourceConfiguration? value) => new PipelineSource(value); + /// /// /// @@ -140,12 +200,14 @@ public PipelineSource(global::Vectara.WebSourceConfiguration? value) public PipelineSource( global::Vectara.PipelineSourceDiscriminatorType? type, global::Vectara.S3SourceConfiguration? s3, + global::Vectara.GoogleDriveSourceConfiguration? googleDrive, global::Vectara.WebSourceConfiguration? web ) { Type = type; S3 = s3; + GoogleDrive = googleDrive; Web = web; } @@ -154,6 +216,7 @@ public PipelineSource( /// public object? Object => Web as object ?? + GoogleDrive as object ?? S3 as object ; @@ -162,6 +225,7 @@ S3 as object /// public override string? ToString() => S3?.ToString() ?? + GoogleDrive?.ToString() ?? Web?.ToString() ; @@ -170,7 +234,7 @@ S3 as object /// public bool Validate() { - return IsS3 && !IsWeb || !IsS3 && IsWeb; + return IsS3 && !IsGoogleDrive && !IsWeb || !IsS3 && IsGoogleDrive && !IsWeb || !IsS3 && !IsGoogleDrive && IsWeb; } /// @@ -178,6 +242,7 @@ public bool Validate() /// public TResult? Match( global::System.Func? s3 = null, + global::System.Func? googleDrive = null, global::System.Func? web = null, bool validate = true) { @@ -190,6 +255,10 @@ public bool Validate() { return s3(S3!); } + else if (IsGoogleDrive && googleDrive != null) + { + return googleDrive(GoogleDrive!); + } else if (IsWeb && web != null) { return web(Web!); @@ -204,6 +273,8 @@ public bool Validate() public void Match( global::System.Action? s3 = null, + global::System.Action? googleDrive = null, + global::System.Action? web = null, bool validate = true) { @@ -216,6 +287,10 @@ public void Match( { s3?.Invoke(S3!); } + else if (IsGoogleDrive) + { + googleDrive?.Invoke(GoogleDrive!); + } else if (IsWeb) { web?.Invoke(Web!); @@ -227,6 +302,7 @@ public void Match( /// public void Switch( global::System.Action? s3 = null, + global::System.Action? googleDrive = null, global::System.Action? web = null, bool validate = true) { @@ -239,6 +315,10 @@ public void Switch( { s3?.Invoke(S3!); } + else if (IsGoogleDrive) + { + googleDrive?.Invoke(GoogleDrive!); + } else if (IsWeb) { web?.Invoke(Web!); @@ -254,6 +334,8 @@ public override int GetHashCode() { S3, typeof(global::Vectara.S3SourceConfiguration), + GoogleDrive, + typeof(global::Vectara.GoogleDriveSourceConfiguration), Web, typeof(global::Vectara.WebSourceConfiguration), }; @@ -273,6 +355,7 @@ public bool Equals(PipelineSource other) { return global::System.Collections.Generic.EqualityComparer.Default.Equals(S3, other.S3) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(GoogleDrive, other.GoogleDrive) && global::System.Collections.Generic.EqualityComparer.Default.Equals(Web, other.Web) ; } diff --git a/src/libs/Vectara/Generated/Vectara.Models.PipelineSourceDiscriminatorType.g.cs b/src/libs/Vectara/Generated/Vectara.Models.PipelineSourceDiscriminatorType.g.cs index 9acfd5d4..ed22558b 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.PipelineSourceDiscriminatorType.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.PipelineSourceDiscriminatorType.g.cs @@ -8,6 +8,10 @@ namespace Vectara /// public enum PipelineSourceDiscriminatorType { + /// + /// + /// + GoogleDrive, /// /// /// @@ -30,6 +34,7 @@ public static string ToValueString(this PipelineSourceDiscriminatorType value) { return value switch { + PipelineSourceDiscriminatorType.GoogleDrive => "google_drive", PipelineSourceDiscriminatorType.S3 => "s3", PipelineSourceDiscriminatorType.Web => "web", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), @@ -42,6 +47,7 @@ public static string ToValueString(this PipelineSourceDiscriminatorType value) { return value switch { + "google_drive" => PipelineSourceDiscriminatorType.GoogleDrive, "s3" => PipelineSourceDiscriminatorType.S3, "web" => PipelineSourceDiscriminatorType.Web, _ => null, diff --git a/src/libs/Vectara/Generated/Vectara.Models.ReplaceAliasPolicyRequest.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ReplaceAliasPolicyRequest.Json.g.cs new file mode 100644 index 00000000..1db65827 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.ReplaceAliasPolicyRequest.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public sealed partial class ReplaceAliasPolicyRequest + { + /// + /// 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.ReplaceAliasPolicyRequest? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.ReplaceAliasPolicyRequest), + jsonSerializerContext) as global::Vectara.ReplaceAliasPolicyRequest; + } + + /// + /// 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.ReplaceAliasPolicyRequest? 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.ReplaceAliasPolicyRequest), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.ReplaceAliasPolicyRequest; + } + + /// + /// 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.ReplaceAliasPolicyRequest.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ReplaceAliasPolicyRequest.g.cs new file mode 100644 index 00000000..5ccb0bc2 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.ReplaceAliasPolicyRequest.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// Request body for atomically replacing an alias's routing policy. The policy is replaced as a unit; partial updates aren't supported. + /// + public sealed partial class ReplaceAliasPolicyRequest + { + /// + /// A routing policy. The `type` discriminator determines which fields apply:
+ /// * `routed` — evaluate ordered rules; the first rule whose `match` expression evaluates to true is selected. The selected rule's `targets` are then used (one agent for `single`, hashed by `partition_by` for `weighted`). Rules with omitted `match` are catch-all rules (typically last).
+ /// Most use cases (direct, weighted/canary, conditional, conditional+canary) collapse into `routed`. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("policy")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Vectara.RoutedAliasPolicy Policy { 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. + /// + /// + /// A routing policy. The `type` discriminator determines which fields apply:
+ /// * `routed` — evaluate ordered rules; the first rule whose `match` expression evaluates to true is selected. The selected rule's `targets` are then used (one agent for `single`, hashed by `partition_by` for `weighted`). Rules with omitted `match` are catch-all rules (typically last).
+ /// Most use cases (direct, weighted/canary, conditional, conditional+canary) collapse into `routed`. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ReplaceAliasPolicyRequest( + global::Vectara.RoutedAliasPolicy policy) + { + this.Policy = policy ?? throw new global::System.ArgumentNullException(nameof(policy)); + } + + /// + /// Initializes a new instance of the class. + /// + public ReplaceAliasPolicyRequest() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.RoutedAliasPolicy.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.RoutedAliasPolicy.Json.g.cs new file mode 100644 index 00000000..8099ad9b --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.RoutedAliasPolicy.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public sealed partial class RoutedAliasPolicy + { + /// + /// 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.RoutedAliasPolicy? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.RoutedAliasPolicy), + jsonSerializerContext) as global::Vectara.RoutedAliasPolicy; + } + + /// + /// 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.RoutedAliasPolicy? 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.RoutedAliasPolicy), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.RoutedAliasPolicy; + } + + /// + /// 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.RoutedAliasPolicy.g.cs b/src/libs/Vectara/Generated/Vectara.Models.RoutedAliasPolicy.g.cs new file mode 100644 index 00000000..1ac90d87 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.RoutedAliasPolicy.g.cs @@ -0,0 +1,61 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// Evaluates ordered rules against the session context. The first rule whose `match` expression evaluates to true is selected. The selected rule's `targets` shape determines what runs: `single` routes directly to one agent, `weighted` picks one of several agents by hashing the rule's `partition_by` expression. A rule with no `match` always matches (catch-all) and is conventionally placed last.
+ /// This single shape covers direct routing (one rule, single target), weighted/canary rollouts (one rule, weighted targets), conditional routing (multiple rules with matches), and conditional+canary combinations (multiple rules, each independently single or weighted). + ///
+ public sealed partial class RoutedAliasPolicy + { + /// + /// Default Value: routed + /// + /// "routed" + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Type { get; set; } = "routed"; + + /// + /// Ordered routing rules. Evaluated top-to-bottom; the first rule whose match expression evaluates to true is selected. At least one rule with no `match` (a catch-all) is recommended to guarantee a fallback target. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("rules")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Rules { 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. + /// + /// + /// Default Value: routed + /// + /// + /// Ordered routing rules. Evaluated top-to-bottom; the first rule whose match expression evaluates to true is selected. At least one rule with no `match` (a catch-all) is recommended to guarantee a fallback target. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public RoutedAliasPolicy( + string type, + global::System.Collections.Generic.IList rules) + { + this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); + this.Rules = rules ?? throw new global::System.ArgumentNullException(nameof(rules)); + } + + /// + /// Initializes a new instance of the class. + /// + public RoutedAliasPolicy() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.RuleTargets.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.RuleTargets.Json.g.cs new file mode 100644 index 00000000..e5ecc9ce --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.RuleTargets.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public readonly partial struct RuleTargets + { + /// + /// 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.RuleTargets? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.RuleTargets), + jsonSerializerContext) as global::Vectara.RuleTargets?; + } + + /// + /// 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.RuleTargets? 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.RuleTargets), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.RuleTargets?; + } + + /// + /// 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.RuleTargets.g.cs b/src/libs/Vectara/Generated/Vectara.Models.RuleTargets.g.cs new file mode 100644 index 00000000..d7f1029e --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.RuleTargets.g.cs @@ -0,0 +1,305 @@ +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace Vectara +{ + /// + /// The shape of a rule's targets. The `type` discriminator selects which fields apply:
+ /// * `single` — a direct route to one agent. No weight, no partition function.
+ /// * `weighted` — a weighted selection among several agents. Requires a `partition_by` userfn expression naming what to hash on; different rules can use different partition functions. + ///
+ public readonly partial struct RuleTargets : global::System.IEquatable + { + /// + /// + /// + public global::Vectara.RuleTargetsDiscriminatorType? Type { get; } + + /// + /// Direct route to a single agent. The `agent_key` must reference an existing agent owned by the same customer. + /// +#if NET6_0_OR_GREATER + public global::Vectara.SingleRuleTargets? Single { get; init; } +#else + public global::Vectara.SingleRuleTargets? Single { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Single))] +#endif + public bool IsSingle => Single != null; + + /// + /// + /// + public bool TryPickSingle( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.SingleRuleTargets? value) + { + value = Single; + return IsSingle; + } + + /// + /// + /// + public global::Vectara.SingleRuleTargets PickSingle() => IsSingle + ? Single! + : throw new global::System.InvalidOperationException($"Expected union variant 'Single' but the value was {ToString()}."); + + /// + /// Weighted selection among several agents. The `partition_by` userfn expression is evaluated and hashed; the result picks which `options` entry serves this session. Different rules in the same policy can declare different `partition_by` expressions (US rules canary by user_id, EU rules by tenant_id, etc.). + /// +#if NET6_0_OR_GREATER + public global::Vectara.WeightedRuleTargets? Weighted { get; init; } +#else + public global::Vectara.WeightedRuleTargets? Weighted { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Weighted))] +#endif + public bool IsWeighted => Weighted != null; + + /// + /// + /// + public bool TryPickWeighted( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.WeightedRuleTargets? value) + { + value = Weighted; + return IsWeighted; + } + + /// + /// + /// + public global::Vectara.WeightedRuleTargets PickWeighted() => IsWeighted + ? Weighted! + : throw new global::System.InvalidOperationException($"Expected union variant 'Weighted' but the value was {ToString()}."); + /// + /// + /// + public static implicit operator RuleTargets(global::Vectara.SingleRuleTargets value) => new RuleTargets((global::Vectara.SingleRuleTargets?)value); + + /// + /// + /// + public static implicit operator global::Vectara.SingleRuleTargets?(RuleTargets @this) => @this.Single; + + /// + /// + /// + public RuleTargets(global::Vectara.SingleRuleTargets? value) + { + Single = value; + } + + /// + /// + /// + public static RuleTargets FromSingle(global::Vectara.SingleRuleTargets? value) => new RuleTargets(value); + + /// + /// + /// + public static implicit operator RuleTargets(global::Vectara.WeightedRuleTargets value) => new RuleTargets((global::Vectara.WeightedRuleTargets?)value); + + /// + /// + /// + public static implicit operator global::Vectara.WeightedRuleTargets?(RuleTargets @this) => @this.Weighted; + + /// + /// + /// + public RuleTargets(global::Vectara.WeightedRuleTargets? value) + { + Weighted = value; + } + + /// + /// + /// + public static RuleTargets FromWeighted(global::Vectara.WeightedRuleTargets? value) => new RuleTargets(value); + + /// + /// + /// + public RuleTargets( + global::Vectara.RuleTargetsDiscriminatorType? type, + global::Vectara.SingleRuleTargets? single, + global::Vectara.WeightedRuleTargets? weighted + ) + { + Type = type; + + Single = single; + Weighted = weighted; + } + + /// + /// + /// + public object? Object => + Weighted as object ?? + Single as object + ; + + /// + /// + /// + public override string? ToString() => + Single?.ToString() ?? + Weighted?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsSingle && !IsWeighted || !IsSingle && IsWeighted; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? single = null, + global::System.Func? weighted = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsSingle && single != null) + { + return single(Single!); + } + else if (IsWeighted && weighted != null) + { + return weighted(Weighted!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? single = null, + + global::System.Action? weighted = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsSingle) + { + single?.Invoke(Single!); + } + else if (IsWeighted) + { + weighted?.Invoke(Weighted!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? single = null, + global::System.Action? weighted = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsSingle) + { + single?.Invoke(Single!); + } + else if (IsWeighted) + { + weighted?.Invoke(Weighted!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Single, + typeof(global::Vectara.SingleRuleTargets), + Weighted, + typeof(global::Vectara.WeightedRuleTargets), + }; + 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(RuleTargets other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Single, other.Single) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Weighted, other.Weighted) + ; + } + + /// + /// + /// + public static bool operator ==(RuleTargets obj1, RuleTargets obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(RuleTargets obj1, RuleTargets obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is RuleTargets o && Equals(o); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.RuleTargetsDiscriminator.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.RuleTargetsDiscriminator.Json.g.cs new file mode 100644 index 00000000..394ecd9c --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.RuleTargetsDiscriminator.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public sealed partial class RuleTargetsDiscriminator + { + /// + /// 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.RuleTargetsDiscriminator? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.RuleTargetsDiscriminator), + jsonSerializerContext) as global::Vectara.RuleTargetsDiscriminator; + } + + /// + /// 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.RuleTargetsDiscriminator? 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.RuleTargetsDiscriminator), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.RuleTargetsDiscriminator; + } + + /// + /// 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.RuleTargetsDiscriminator.g.cs b/src/libs/Vectara/Generated/Vectara.Models.RuleTargetsDiscriminator.g.cs new file mode 100644 index 00000000..519019f1 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.RuleTargetsDiscriminator.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// + /// + public sealed partial class RuleTargetsDiscriminator + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Vectara.JsonConverters.RuleTargetsDiscriminatorTypeJsonConverter))] + public global::Vectara.RuleTargetsDiscriminatorType? Type { 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 RuleTargetsDiscriminator( + global::Vectara.RuleTargetsDiscriminatorType? type) + { + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public RuleTargetsDiscriminator() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.RuleTargetsDiscriminatorType.g.cs b/src/libs/Vectara/Generated/Vectara.Models.RuleTargetsDiscriminatorType.g.cs new file mode 100644 index 00000000..32303594 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.RuleTargetsDiscriminatorType.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// + /// + public enum RuleTargetsDiscriminatorType + { + /// + /// + /// + Single, + /// + /// + /// + Weighted, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class RuleTargetsDiscriminatorTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this RuleTargetsDiscriminatorType value) + { + return value switch + { + RuleTargetsDiscriminatorType.Single => "single", + RuleTargetsDiscriminatorType.Weighted => "weighted", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static RuleTargetsDiscriminatorType? ToEnum(string value) + { + return value switch + { + "single" => RuleTargetsDiscriminatorType.Single, + "weighted" => RuleTargetsDiscriminatorType.Weighted, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.SharedGoogleDriveScope.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.SharedGoogleDriveScope.Json.g.cs new file mode 100644 index 00000000..6f9e665e --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.SharedGoogleDriveScope.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public sealed partial class SharedGoogleDriveScope + { + /// + /// 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.SharedGoogleDriveScope? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.SharedGoogleDriveScope), + jsonSerializerContext) as global::Vectara.SharedGoogleDriveScope; + } + + /// + /// 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.SharedGoogleDriveScope? 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.SharedGoogleDriveScope), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.SharedGoogleDriveScope; + } + + /// + /// 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.SharedGoogleDriveScope.g.cs b/src/libs/Vectara/Generated/Vectara.Models.SharedGoogleDriveScope.g.cs new file mode 100644 index 00000000..85e7c880 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.SharedGoogleDriveScope.g.cs @@ -0,0 +1,76 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// Ingest from a Google Workspace shared drive. The service account (`client_email`) must
+ /// be added as a member of the shared drive — or of the linked folder — with at least Viewer
+ /// access. No domain-wide delegation is required. + ///
+ public sealed partial class SharedGoogleDriveScope + { + /// + /// Default Value: shared
+ /// Example: shared + ///
+ /// "shared" + /// shared + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Type { get; set; } = "shared"; + + /// + /// URL of the folder to ingest. Use a shared drive's root URL
+ /// (`https://drive.google.com/drive/folders/<drive_id>`) to enumerate the entire drive,
+ /// or any subfolder URL (`https://drive.google.com/drive/folders/<folder_id>`) to scope
+ /// ingestion to that subtree. The connector walks every descendant subfolder beneath the
+ /// linked target.
+ /// Example: https://drive.google.com/drive/folders/0AHk_z9_Bcg-aUk9PVA + ///
+ /// https://drive.google.com/drive/folders/0AHk_z9_Bcg-aUk9PVA + [global::System.Text.Json.Serialization.JsonPropertyName("url")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Url { 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. + /// + /// + /// Default Value: shared
+ /// Example: shared + /// + /// + /// URL of the folder to ingest. Use a shared drive's root URL
+ /// (`https://drive.google.com/drive/folders/<drive_id>`) to enumerate the entire drive,
+ /// or any subfolder URL (`https://drive.google.com/drive/folders/<folder_id>`) to scope
+ /// ingestion to that subtree. The connector walks every descendant subfolder beneath the
+ /// linked target.
+ /// Example: https://drive.google.com/drive/folders/0AHk_z9_Bcg-aUk9PVA + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public SharedGoogleDriveScope( + string type, + string url) + { + this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); + this.Url = url ?? throw new global::System.ArgumentNullException(nameof(url)); + } + + /// + /// Initializes a new instance of the class. + /// + public SharedGoogleDriveScope() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.SingleRuleTargets.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.SingleRuleTargets.Json.g.cs new file mode 100644 index 00000000..e407dad9 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.SingleRuleTargets.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public sealed partial class SingleRuleTargets + { + /// + /// 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.SingleRuleTargets? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.SingleRuleTargets), + jsonSerializerContext) as global::Vectara.SingleRuleTargets; + } + + /// + /// 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.SingleRuleTargets? 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.SingleRuleTargets), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.SingleRuleTargets; + } + + /// + /// 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.SingleRuleTargets.g.cs b/src/libs/Vectara/Generated/Vectara.Models.SingleRuleTargets.g.cs new file mode 100644 index 00000000..cd817703 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.SingleRuleTargets.g.cs @@ -0,0 +1,60 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// Direct route to a single agent. The `agent_key` must reference an existing agent owned by the same customer. + /// + public sealed partial class SingleRuleTargets + { + /// + /// Default Value: single + /// + /// "single" + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Type { get; set; } = "single"; + + /// + /// The key of the underlying agent this rule routes to. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("agent_key")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string AgentKey { 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. + /// + /// + /// Default Value: single + /// + /// + /// The key of the underlying agent this rule routes to. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public SingleRuleTargets( + string type, + string agentKey) + { + this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); + this.AgentKey = agentKey ?? throw new global::System.ArgumentNullException(nameof(agentKey)); + } + + /// + /// Initializes a new instance of the class. + /// + public SingleRuleTargets() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.ToolBase.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ToolBase.g.cs index 0cda5cb2..cce95901 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.ToolBase.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.ToolBase.g.cs @@ -145,6 +145,12 @@ public sealed partial class ToolBase /// References are resolved at runtime from context:
/// - session.metadata.* - Access session metadata fields
/// - agent.metadata.* - Access agent metadata fields
+ /// - agent.secrets.* - Access agent secrets (masked in audit events)
+ /// - tools.* - Access prior tool outputs (resolved after the dependent tool runs)
+ /// - currentDate - The current date/time in ISO 8601 format
+ /// A bracket index may reference another context value, whose resolved value is used as the lookup key. The inner path may optionally carry a leading $ root marker:
+ /// - Indirect reference: `{"$ref": "agent.secrets[session.metadata.user_id]"}` looks up the per-user secret named by `session.metadata.user_id`
+ /// - Equivalent forms: `agent.secrets[$session.metadata.user_id]` and `agent.secrets[$.session.metadata.user_id]`
/// Example:
/// `{"query": {"$ref": ".session.metadata.query"}}`
/// If you want to have a real value `"$ref"` use `"$$ref"`, that is you can escape the first $ by using $$.
@@ -280,6 +286,12 @@ public sealed partial class ToolBase /// References are resolved at runtime from context:
/// - session.metadata.* - Access session metadata fields
/// - agent.metadata.* - Access agent metadata fields
+ /// - agent.secrets.* - Access agent secrets (masked in audit events)
+ /// - tools.* - Access prior tool outputs (resolved after the dependent tool runs)
+ /// - currentDate - The current date/time in ISO 8601 format
+ /// A bracket index may reference another context value, whose resolved value is used as the lookup key. The inner path may optionally carry a leading $ root marker:
+ /// - Indirect reference: `{"$ref": "agent.secrets[session.metadata.user_id]"}` looks up the per-user secret named by `session.metadata.user_id`
+ /// - Equivalent forms: `agent.secrets[$session.metadata.user_id]` and `agent.secrets[$.session.metadata.user_id]`
/// Example:
/// `{"query": {"$ref": ".session.metadata.query"}}`
/// If you want to have a real value `"$ref"` use `"$$ref"`, that is you can escape the first $ by using $$.
diff --git a/src/libs/Vectara/Generated/Vectara.Models.ToolBaseDefaultArgumentOverride.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ToolBaseDefaultArgumentOverride.g.cs index aafc1f12..5fa924c0 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.ToolBaseDefaultArgumentOverride.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.ToolBaseDefaultArgumentOverride.g.cs @@ -11,6 +11,12 @@ namespace Vectara /// References are resolved at runtime from context:
/// - session.metadata.* - Access session metadata fields
/// - agent.metadata.* - Access agent metadata fields
+ /// - agent.secrets.* - Access agent secrets (masked in audit events)
+ /// - tools.* - Access prior tool outputs (resolved after the dependent tool runs)
+ /// - currentDate - The current date/time in ISO 8601 format
+ /// A bracket index may reference another context value, whose resolved value is used as the lookup key. The inner path may optionally carry a leading $ root marker:
+ /// - Indirect reference: `{"$ref": "agent.secrets[session.metadata.user_id]"}` looks up the per-user secret named by `session.metadata.user_id`
+ /// - Equivalent forms: `agent.secrets[$session.metadata.user_id]` and `agent.secrets[$.session.metadata.user_id]`
/// Example:
/// `{"query": {"$ref": ".session.metadata.query"}}`
/// If you want to have a real value `"$ref"` use `"$$ref"`, that is you can escape the first $ by using $$.
diff --git a/src/libs/Vectara/Generated/Vectara.Models.UpdateAgentAliasRequest.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.UpdateAgentAliasRequest.Json.g.cs new file mode 100644 index 00000000..d895a385 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.UpdateAgentAliasRequest.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public sealed partial class UpdateAgentAliasRequest + { + /// + /// 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.UpdateAgentAliasRequest? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.UpdateAgentAliasRequest), + jsonSerializerContext) as global::Vectara.UpdateAgentAliasRequest; + } + + /// + /// 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.UpdateAgentAliasRequest? 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.UpdateAgentAliasRequest), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.UpdateAgentAliasRequest; + } + + /// + /// 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.UpdateAgentAliasRequest.g.cs b/src/libs/Vectara/Generated/Vectara.Models.UpdateAgentAliasRequest.g.cs new file mode 100644 index 00000000..ef93e384 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.UpdateAgentAliasRequest.g.cs @@ -0,0 +1,71 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// Request body for updating an alias's metadata fields. Use `PUT /v2/agent_aliases/{alias_key}/policy` to replace the routing policy itself — policies are atomic and not partially updateable. + /// + public sealed partial class UpdateAgentAliasRequest + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + public string? Name { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("description")] + public string? Description { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("enabled")] + public bool? Enabled { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] + public object? Metadata { 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 UpdateAgentAliasRequest( + string? name, + string? description, + bool? enabled, + object? metadata) + { + this.Name = name; + this.Description = description; + this.Enabled = enabled; + this.Metadata = metadata; + } + + /// + /// Initializes a new instance of the class. + /// + public UpdateAgentAliasRequest() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.UpdateAgentAliasRequestMetadata.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.UpdateAgentAliasRequestMetadata.Json.g.cs new file mode 100644 index 00000000..459df018 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.UpdateAgentAliasRequestMetadata.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public sealed partial class UpdateAgentAliasRequestMetadata + { + /// + /// 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.UpdateAgentAliasRequestMetadata? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.UpdateAgentAliasRequestMetadata), + jsonSerializerContext) as global::Vectara.UpdateAgentAliasRequestMetadata; + } + + /// + /// 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.UpdateAgentAliasRequestMetadata? 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.UpdateAgentAliasRequestMetadata), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.UpdateAgentAliasRequestMetadata; + } + + /// + /// 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.UpdateAgentAliasRequestMetadata.g.cs b/src/libs/Vectara/Generated/Vectara.Models.UpdateAgentAliasRequestMetadata.g.cs new file mode 100644 index 00000000..3f947556 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.UpdateAgentAliasRequestMetadata.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// + /// + public sealed partial class UpdateAgentAliasRequestMetadata + { + + /// + /// 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.UpdateAgentSessionRequest.g.cs b/src/libs/Vectara/Generated/Vectara.Models.UpdateAgentSessionRequest.g.cs index a0b22540..72f2d7f1 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.UpdateAgentSessionRequest.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.UpdateAgentSessionRequest.g.cs @@ -48,6 +48,15 @@ public sealed partial class UpdateAgentSessionRequest [global::System.Text.Json.Serialization.JsonPropertyName("tti_minutes")] public long? TtiMinutes { get; set; } + /// + /// Patch the session's secrets. Names present in the map are added or replaced; names absent from the map are left unchanged.
+ /// A name mapped to `null` is removed. Values are encrypted at rest with the owning agent's encryption key and returned masked on reads.
+ /// Example: {"slack_user_token":"xoxp-rotated-token","old_token_to_remove":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464"} + ///
+ /// {"slack_user_token":"xoxp-rotated-token","old_token_to_remove":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464"} + [global::System.Text.Json.Serialization.JsonPropertyName("secrets")] + public global::System.Collections.Generic.Dictionary? Secrets { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -77,6 +86,11 @@ public sealed partial class UpdateAgentSessionRequest /// Time-to-idle in minutes for the session. If no events occur in the session for this duration, the session will be automatically deleted. If set to 0, the session will not expire.
/// Example: 60 /// + /// + /// Patch the session's secrets. Names present in the map are added or replaced; names absent from the map are left unchanged.
+ /// A name mapped to `null` is removed. Values are encrypted at rest with the owning agent's encryption key and returned masked on reads.
+ /// Example: {"slack_user_token":"xoxp-rotated-token","old_token_to_remove":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464"} + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif @@ -85,13 +99,15 @@ public UpdateAgentSessionRequest( string? description, object? metadata, bool? enabled, - long? ttiMinutes) + long? ttiMinutes, + global::System.Collections.Generic.Dictionary? secrets) { this.Name = name; this.Description = description; this.Metadata = metadata; this.Enabled = enabled; this.TtiMinutes = ttiMinutes; + this.Secrets = secrets; } /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.UpdateAgentSessionRequestSecrets.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.UpdateAgentSessionRequestSecrets.Json.g.cs new file mode 100644 index 00000000..49808e56 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.UpdateAgentSessionRequestSecrets.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public sealed partial class UpdateAgentSessionRequestSecrets + { + /// + /// 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.UpdateAgentSessionRequestSecrets? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.UpdateAgentSessionRequestSecrets), + jsonSerializerContext) as global::Vectara.UpdateAgentSessionRequestSecrets; + } + + /// + /// 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.UpdateAgentSessionRequestSecrets? 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.UpdateAgentSessionRequestSecrets), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.UpdateAgentSessionRequestSecrets; + } + + /// + /// 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.UpdateAgentSessionRequestSecrets.g.cs b/src/libs/Vectara/Generated/Vectara.Models.UpdateAgentSessionRequestSecrets.g.cs new file mode 100644 index 00000000..d1d6d912 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.UpdateAgentSessionRequestSecrets.g.cs @@ -0,0 +1,21 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// Patch the session's secrets. Names present in the map are added or replaced; names absent from the map are left unchanged.
+ /// A name mapped to `null` is removed. Values are encrypted at rest with the owning agent's encryption key and returned masked on reads.
+ /// Example: {"slack_user_token":"xoxp-rotated-token","old_token_to_remove":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464"} + ///
+ public sealed partial class UpdateAgentSessionRequestSecrets + { + + /// + /// 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.UpdateGoogleDriveSourceConfiguration.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.UpdateGoogleDriveSourceConfiguration.Json.g.cs new file mode 100644 index 00000000..fec1e273 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.UpdateGoogleDriveSourceConfiguration.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public readonly partial struct UpdateGoogleDriveSourceConfiguration + { + /// + /// 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.UpdateGoogleDriveSourceConfiguration? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.UpdateGoogleDriveSourceConfiguration), + jsonSerializerContext) as global::Vectara.UpdateGoogleDriveSourceConfiguration?; + } + + /// + /// 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.UpdateGoogleDriveSourceConfiguration? 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.UpdateGoogleDriveSourceConfiguration), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.UpdateGoogleDriveSourceConfiguration?; + } + + /// + /// 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.UpdateGoogleDriveSourceConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.Models.UpdateGoogleDriveSourceConfiguration.g.cs new file mode 100644 index 00000000..d0e17782 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.UpdateGoogleDriveSourceConfiguration.g.cs @@ -0,0 +1,205 @@ +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace Vectara +{ + /// + /// Partial update for Google Drive source configuration. Only provided fields are merged. + /// + public readonly partial struct UpdateGoogleDriveSourceConfiguration : global::System.IEquatable + { + /// + /// Base Google Drive source configuration. The `scopes` list enumerates one or more starting
+ /// points — each entry is either a shared drive (`shared`) or a single user's My Drive accessed
+ /// via domain-wide delegation (`my_drive`). The service account configured here must have read
+ /// access to every listed drive and be authorized for each impersonated user. + ///
+#if NET6_0_OR_GREATER + public global::Vectara.BaseGoogleDriveSourceConfiguration? Base { get; init; } +#else + public global::Vectara.BaseGoogleDriveSourceConfiguration? 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.BaseGoogleDriveSourceConfiguration? value) + { + value = Base; + return IsBase; + } + + /// + /// + /// + public global::Vectara.BaseGoogleDriveSourceConfiguration PickBase() => IsBase + ? Base! + : throw new global::System.InvalidOperationException($"Expected union variant 'Base' but the value was {ToString()}."); + /// + /// + /// + public static implicit operator UpdateGoogleDriveSourceConfiguration(global::Vectara.BaseGoogleDriveSourceConfiguration value) => new UpdateGoogleDriveSourceConfiguration((global::Vectara.BaseGoogleDriveSourceConfiguration?)value); + + /// + /// + /// + public static implicit operator global::Vectara.BaseGoogleDriveSourceConfiguration?(UpdateGoogleDriveSourceConfiguration @this) => @this.Base; + + /// + /// + /// + public UpdateGoogleDriveSourceConfiguration(global::Vectara.BaseGoogleDriveSourceConfiguration? value) + { + Base = value; + } + + /// + /// + /// + public static UpdateGoogleDriveSourceConfiguration FromBase(global::Vectara.BaseGoogleDriveSourceConfiguration? value) => new UpdateGoogleDriveSourceConfiguration(value); + + /// + /// + /// + public object? Object => + Base as object + ; + + /// + /// + /// + public override string? ToString() => + Base?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsBase; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? @base = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsBase && @base != null) + { + return @base(Base!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? @base = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsBase) + { + @base?.Invoke(Base!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? @base = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsBase) + { + @base?.Invoke(Base!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Base, + typeof(global::Vectara.BaseGoogleDriveSourceConfiguration), + }; + 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(UpdateGoogleDriveSourceConfiguration other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Base, other.Base) + ; + } + + /// + /// + /// + public static bool operator ==(UpdateGoogleDriveSourceConfiguration obj1, UpdateGoogleDriveSourceConfiguration obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(UpdateGoogleDriveSourceConfiguration obj1, UpdateGoogleDriveSourceConfiguration obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is UpdateGoogleDriveSourceConfiguration o && Equals(o); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.UpdatePipelineSource.g.cs b/src/libs/Vectara/Generated/Vectara.Models.UpdatePipelineSource.g.cs index 75cb2223..b03224ab 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.UpdatePipelineSource.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.UpdatePipelineSource.g.cs @@ -51,6 +51,43 @@ public bool TryPickS3( ? S3!.Value : throw new global::System.InvalidOperationException($"Expected union variant 'S3' but the value was {ToString()}."); + /// + /// Partial update for Google Drive source configuration. Only provided fields are merged. + /// +#if NET6_0_OR_GREATER + public global::Vectara.UpdateGoogleDriveSourceConfiguration? GoogleDrive { get; init; } +#else + public global::Vectara.UpdateGoogleDriveSourceConfiguration? GoogleDrive { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(GoogleDrive))] +#endif + public bool IsGoogleDrive => GoogleDrive != null; + + /// + /// + /// + public bool TryPickGoogleDrive( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.UpdateGoogleDriveSourceConfiguration? value) + { + value = GoogleDrive; + return IsGoogleDrive; + } + + /// + /// + /// + public global::Vectara.UpdateGoogleDriveSourceConfiguration PickGoogleDrive() => IsGoogleDrive + ? GoogleDrive!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'GoogleDrive' but the value was {ToString()}."); + /// /// Partial update for a `web` source configuration. Top-level fields are merged into the existing
/// record; if `pages_source` is provided, the entire `pages_source` object is replaced (i.e.,
@@ -112,6 +149,29 @@ public UpdatePipelineSource(global::Vectara.UpdateS3SourceConfiguration? value) ///
public static UpdatePipelineSource FromS3(global::Vectara.UpdateS3SourceConfiguration? value) => new UpdatePipelineSource(value); + /// + /// + /// + public static implicit operator UpdatePipelineSource(global::Vectara.UpdateGoogleDriveSourceConfiguration value) => new UpdatePipelineSource((global::Vectara.UpdateGoogleDriveSourceConfiguration?)value); + + /// + /// + /// + public static implicit operator global::Vectara.UpdateGoogleDriveSourceConfiguration?(UpdatePipelineSource @this) => @this.GoogleDrive; + + /// + /// + /// + public UpdatePipelineSource(global::Vectara.UpdateGoogleDriveSourceConfiguration? value) + { + GoogleDrive = value; + } + + /// + /// + /// + public static UpdatePipelineSource FromGoogleDrive(global::Vectara.UpdateGoogleDriveSourceConfiguration? value) => new UpdatePipelineSource(value); + /// /// /// @@ -141,12 +201,14 @@ public UpdatePipelineSource(global::Vectara.UpdateWebSourceConfiguration? value) public UpdatePipelineSource( global::Vectara.UpdatePipelineSourceDiscriminatorType? type, global::Vectara.UpdateS3SourceConfiguration? s3, + global::Vectara.UpdateGoogleDriveSourceConfiguration? googleDrive, global::Vectara.UpdateWebSourceConfiguration? web ) { Type = type; S3 = s3; + GoogleDrive = googleDrive; Web = web; } @@ -155,6 +217,7 @@ public UpdatePipelineSource( ///
public object? Object => Web as object ?? + GoogleDrive as object ?? S3 as object ; @@ -163,6 +226,7 @@ S3 as object /// public override string? ToString() => S3?.ToString() ?? + GoogleDrive?.ToString() ?? Web?.ToString() ; @@ -171,7 +235,7 @@ S3 as object /// public bool Validate() { - return IsS3 && !IsWeb || !IsS3 && IsWeb; + return IsS3 && !IsGoogleDrive && !IsWeb || !IsS3 && IsGoogleDrive && !IsWeb || !IsS3 && !IsGoogleDrive && IsWeb; } /// @@ -179,6 +243,7 @@ public bool Validate() /// public TResult? Match( global::System.Func? s3 = null, + global::System.Func? googleDrive = null, global::System.Func? web = null, bool validate = true) { @@ -191,6 +256,10 @@ public bool Validate() { return s3(S3!); } + else if (IsGoogleDrive && googleDrive != null) + { + return googleDrive(GoogleDrive!); + } else if (IsWeb && web != null) { return web(Web!); @@ -205,6 +274,8 @@ public bool Validate() public void Match( global::System.Action? s3 = null, + global::System.Action? googleDrive = null, + global::System.Action? web = null, bool validate = true) { @@ -217,6 +288,10 @@ public void Match( { s3?.Invoke(S3!); } + else if (IsGoogleDrive) + { + googleDrive?.Invoke(GoogleDrive!); + } else if (IsWeb) { web?.Invoke(Web!); @@ -228,6 +303,7 @@ public void Match( /// public void Switch( global::System.Action? s3 = null, + global::System.Action? googleDrive = null, global::System.Action? web = null, bool validate = true) { @@ -240,6 +316,10 @@ public void Switch( { s3?.Invoke(S3!); } + else if (IsGoogleDrive) + { + googleDrive?.Invoke(GoogleDrive!); + } else if (IsWeb) { web?.Invoke(Web!); @@ -255,6 +335,8 @@ public override int GetHashCode() { S3, typeof(global::Vectara.UpdateS3SourceConfiguration), + GoogleDrive, + typeof(global::Vectara.UpdateGoogleDriveSourceConfiguration), Web, typeof(global::Vectara.UpdateWebSourceConfiguration), }; @@ -274,6 +356,7 @@ public bool Equals(UpdatePipelineSource other) { return global::System.Collections.Generic.EqualityComparer.Default.Equals(S3, other.S3) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(GoogleDrive, other.GoogleDrive) && global::System.Collections.Generic.EqualityComparer.Default.Equals(Web, other.Web) ; } diff --git a/src/libs/Vectara/Generated/Vectara.Models.UpdatePipelineSourceDiscriminatorType.g.cs b/src/libs/Vectara/Generated/Vectara.Models.UpdatePipelineSourceDiscriminatorType.g.cs index f7eb783e..f5c170bf 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.UpdatePipelineSourceDiscriminatorType.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.UpdatePipelineSourceDiscriminatorType.g.cs @@ -8,6 +8,10 @@ namespace Vectara /// public enum UpdatePipelineSourceDiscriminatorType { + /// + /// + /// + GoogleDrive, /// /// /// @@ -30,6 +34,7 @@ public static string ToValueString(this UpdatePipelineSourceDiscriminatorType va { return value switch { + UpdatePipelineSourceDiscriminatorType.GoogleDrive => "google_drive", UpdatePipelineSourceDiscriminatorType.S3 => "s3", UpdatePipelineSourceDiscriminatorType.Web => "web", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), @@ -42,6 +47,7 @@ public static string ToValueString(this UpdatePipelineSourceDiscriminatorType va { return value switch { + "google_drive" => UpdatePipelineSourceDiscriminatorType.GoogleDrive, "s3" => UpdatePipelineSourceDiscriminatorType.S3, "web" => UpdatePipelineSourceDiscriminatorType.Web, _ => null, diff --git a/src/libs/Vectara/Generated/Vectara.Models.WeightedRuleTargets.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.WeightedRuleTargets.Json.g.cs new file mode 100644 index 00000000..a9a02a26 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.WeightedRuleTargets.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public sealed partial class WeightedRuleTargets + { + /// + /// 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.WeightedRuleTargets? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.WeightedRuleTargets), + jsonSerializerContext) as global::Vectara.WeightedRuleTargets; + } + + /// + /// 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.WeightedRuleTargets? 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.WeightedRuleTargets), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.WeightedRuleTargets; + } + + /// + /// 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.WeightedRuleTargets.g.cs b/src/libs/Vectara/Generated/Vectara.Models.WeightedRuleTargets.g.cs new file mode 100644 index 00000000..6e0cc39c --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.WeightedRuleTargets.g.cs @@ -0,0 +1,81 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// Weighted selection among several agents. The `partition_by` userfn expression is evaluated and hashed; the result picks which `options` entry serves this session. Different rules in the same policy can declare different `partition_by` expressions (US rules canary by user_id, EU rules by tenant_id, etc.). + /// + public sealed partial class WeightedRuleTargets + { + /// + /// Default Value: weighted + /// + /// "weighted" + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Type { get; set; } = "weighted"; + + /// + /// UserFn expression whose result is stringified and hashed to pick among `options`. Required: no implicit default.
+ /// Uses the `get()` function with JSONPath to access the context.
+ /// See https://docs.vectara.com/docs/search-and-retrieval/rerankers/user-defined-function-reranker for the UserFn language reference.
+ /// Use `get('$.session.key')` for per-session canary, `get('$.session.metadata.user_id', '')` for per-user canary. If the expression evaluates to `null` at resolution time, the request is rejected with a 400; wrap optional fields with a default via `get('$.path', '')`.
+ /// Example: get('$.session.metadata.user_id', '') + ///
+ /// get('$.session.metadata.user_id', '') + [global::System.Text.Json.Serialization.JsonPropertyName("partition_by")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string PartitionBy { get; set; } + + /// + /// Weighted target options. One is selected by hashing the result of `partition_by`; weights are normalized at evaluation time. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("options")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Options { 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. + /// + /// + /// Default Value: weighted + /// + /// + /// UserFn expression whose result is stringified and hashed to pick among `options`. Required: no implicit default.
+ /// Uses the `get()` function with JSONPath to access the context.
+ /// See https://docs.vectara.com/docs/search-and-retrieval/rerankers/user-defined-function-reranker for the UserFn language reference.
+ /// Use `get('$.session.key')` for per-session canary, `get('$.session.metadata.user_id', '')` for per-user canary. If the expression evaluates to `null` at resolution time, the request is rejected with a 400; wrap optional fields with a default via `get('$.path', '')`.
+ /// Example: get('$.session.metadata.user_id', '') + /// + /// + /// Weighted target options. One is selected by hashing the result of `partition_by`; weights are normalized at evaluation time. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public WeightedRuleTargets( + string type, + string partitionBy, + global::System.Collections.Generic.IList options) + { + this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); + this.PartitionBy = partitionBy ?? throw new global::System.ArgumentNullException(nameof(partitionBy)); + this.Options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + } + + /// + /// Initializes a new instance of the class. + /// + public WeightedRuleTargets() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.WeightedTarget.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.WeightedTarget.Json.g.cs new file mode 100644 index 00000000..15fe056a --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.WeightedTarget.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public sealed partial class WeightedTarget + { + /// + /// 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.WeightedTarget? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.WeightedTarget), + jsonSerializerContext) as global::Vectara.WeightedTarget; + } + + /// + /// 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.WeightedTarget? 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.WeightedTarget), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.WeightedTarget; + } + + /// + /// 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.WeightedTarget.g.cs b/src/libs/Vectara/Generated/Vectara.Models.WeightedTarget.g.cs new file mode 100644 index 00000000..23bc0ae9 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.WeightedTarget.g.cs @@ -0,0 +1,59 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// A single option inside a weighted rule. Weight is required and must be a non-negative integer; the resolver normalizes weights across the rule's options at evaluation time. + /// + public sealed partial class WeightedTarget + { + /// + /// The key of the underlying agent this option routes to. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("agent_key")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string AgentKey { get; set; } + + /// + /// Weight used when selecting among the weighted options. Absolute non-negative integer, normalized at evaluation time. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("weight")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int Weight { 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 key of the underlying agent this option routes to. + /// + /// + /// Weight used when selecting among the weighted options. Absolute non-negative integer, normalized at evaluation time. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public WeightedTarget( + string agentKey, + int weight) + { + this.AgentKey = agentKey ?? throw new global::System.ArgumentNullException(nameof(agentKey)); + this.Weight = weight; + } + + /// + /// Initializes a new instance of the class. + /// + public WeightedTarget() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.PipelineDeadLetterEntriesClient.Create.g.cs b/src/libs/Vectara/Generated/Vectara.PipelineDeadLetterEntriesClient.Create.g.cs index e625974b..f0217274 100644 --- a/src/libs/Vectara/Generated/Vectara.PipelineDeadLetterEntriesClient.Create.g.cs +++ b/src/libs/Vectara/Generated/Vectara.PipelineDeadLetterEntriesClient.Create.g.cs @@ -657,6 +657,7 @@ partial void ProcessCreateResponseContent( /// The identifier for the source record to add. Format depends on connector type:
/// - S3: the object key (e.g. `legal/contracts/doc.pdf`)
/// - SharePoint: the drive item ID
+ /// - Google Drive: the file ID
/// - Web: the canonicalized URL (e.g. `https://docs.example.com/page`) /// /// diff --git a/src/libs/Vectara/Generated/Vectara.VectaraClient.g.cs b/src/libs/Vectara/Generated/Vectara.VectaraClient.g.cs index ed14316c..b2696d8b 100644 --- a/src/libs/Vectara/Generated/Vectara.VectaraClient.g.cs +++ b/src/libs/Vectara/Generated/Vectara.VectaraClient.g.cs @@ -57,6 +57,46 @@ public sealed partial class VectaraClient : global::Vectara.IVectaraClient, glob public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::Vectara.SourceGenerationContext.Default; + /// + /// + /// + public AgentAliasesClient AgentAliases => new AgentAliasesClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) + { + ReadResponseAsString = ReadResponseAsString, + JsonSerializerContext = JsonSerializerContext, + AutoSDKOAuth2State = AutoSDKOAuth2State, + }; + + /// + /// + /// + public AgentAliasesArtifactsClient AgentAliasesArtifacts => new AgentAliasesArtifactsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) + { + ReadResponseAsString = ReadResponseAsString, + JsonSerializerContext = JsonSerializerContext, + AutoSDKOAuth2State = AutoSDKOAuth2State, + }; + + /// + /// + /// + public AgentAliasesEventsClient AgentAliasesEvents => new AgentAliasesEventsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) + { + ReadResponseAsString = ReadResponseAsString, + JsonSerializerContext = JsonSerializerContext, + AutoSDKOAuth2State = AutoSDKOAuth2State, + }; + + /// + /// + /// + public AgentAliasesSessionsClient AgentAliasesSessions => new AgentAliasesSessionsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) + { + ReadResponseAsString = ReadResponseAsString, + JsonSerializerContext = JsonSerializerContext, + AutoSDKOAuth2State = AutoSDKOAuth2State, + }; + /// /// /// diff --git a/src/libs/Vectara/Generated/autosdk.generated-examples.json b/src/libs/Vectara/Generated/autosdk.generated-examples.json index 2fa8f737..69bb5efc 100644 --- a/src/libs/Vectara/Generated/autosdk.generated-examples.json +++ b/src/libs/Vectara/Generated/autosdk.generated-examples.json @@ -83,7 +83,7 @@ "Slug": "createcorpusdocument", "Description": "Add a document to a corpus for indexing, making its content available for search, retrieval, and generation. This endpoint supports two ingestion modes: **structured** documents and **core** documents. These modes offer different levels of control over document structure and chunking.\n\nEach document becomes part of a corpus. You can use this API directly or with [Vectara Ingest](https://github.com/vectara/vectara-ingest) or the [File Upload API](/docs/rest-api/upload-file).\n\n## Structured documents\n\nStructured documents provide a natural hierarchy where Vectar handles chunking and metadata automatically. Structured documents are ideal when you want to index documents that have logical organization (titles, sections, paragraphs, and optionally tables or images) but prefer Vectara to manage how the content is split into search-optimized units.\n\nEach structured document contains:\n- A unique \u0060id\u0060 and optional \u0060title\u0060, \u0060description\u0060, and \u0060metadata\u0060.\n- An array of \u0060sections\u0060, each with its own title, text, and optional nested sections, tables, or images.\n- Optional \u0060custom_dimensions\u0060 that can influence ranking during search.\n\nWhen indexed, Vectara partitions the text into document parts automatically using an intelligent sentence- or character-based chunking strategy. This lets you ingest data with minimal pre-processing while maintaining semantic integrity across context boundaries.\n\nStructured documents are recommended for content with well-defined sections such as reports, articles, FAQs, or documentation.\n\n## Core documents\n\nCore documents offer fine-grained, explicit control of every part of a document that becomes searchable. Instead of providing a hierarchical structure, you specify each **document part** directly as unit that maps 1:1 to a search result or embedding.\n\nA core document includes:\n- A unique \u0060id\u0060 and optional \u0060metadata\u0060.\n- A list of \u0060document_parts\u0060, where each part includes \u0060text\u0060, optional \u0060context\u0060, \u0060metadata\u0060, and \u0060custom_dimensions\u0060.\n- Optional \u0060tables\u0060 and \u0060images\u0060, allowing you to represent complex structured data like spreadsheets or charts.\n\nCore documents are designed for advanced use cases such as precise chunk-level optimization or experimental corpus structures, and applications where metadata-driven retrieval or ranking must be explicitly controlled.\n\n## Chunking strategies \n\nBy default, Vectara uses **sentence-based chunking**, which provides optimal retrieval accuracy for most datasets.\n\nFor larger documents or performance-tuned ingestion, you can explicitly set a \u0060chunking_strategy\u0060:\n- \u0060sentence_chunking_strategy\u0060 \u2014 creates one chunk per sentence (default).\n- \u0060max_chars_chunking_strategy\u0060 \u2014 creates larger chunks up to a specified character limit (\u0060max_chars_per_chunk\u0060), balancing retrieval speed with contextual coherence.", "Language": "http", - "Code": "### Add a document to a corpus\n# @name createCorpusDocument\nPOST {{host}}/v2/corpora/{{corpus_key}}/documents?wait_for=searchable\nx-api-key: {{api_key}}\nAuthorization: Bearer {{token}}\nRequest-Timeout: {{Request-Timeout}}\nRequest-Timeout-Millis: {{Request-Timeout-Millis}}\nContent-Type: application/json\nAccept: application/json\n\n{\n \u0022type\u0022: \u0022structured\u0022,\n \u0022id\u0022: \u0022esg_report_2024\u0022,\n \u0022title\u0022: \u00222024 ESG Annual Report \\u2013 EuroBank\u0022,\n \u0022description\u0022: \u0022Comprehensive report on EuroBank\\u2019s environmental, social, and governance initiatives for 2024, outlining sustainability goals and compliance with EU regulations.\u0022,\n \u0022metadata\u0022: {\n \u0022doc_type\u0022: \u0022esg_report\u0022,\n \u0022region\u0022: \u0022EU\u0022,\n \u0022industry\u0022: \u0022banking\u0022,\n \u0022year\u0022: 2024,\n \u0022status\u0022: \u0022published\u0022,\n \u0022owner\u0022: \u0022sustainability_team\u0022\n },\n \u0022sections\u0022: [\n {\n \u0022id\u0022: 1,\n \u0022title\u0022: \u0022Environmental Initiatives\u0022,\n \u0022text\u0022: \u0022In 2024, EuroBank reduced carbon emissions by 22% through investments in renewable energy and energy-efficient infrastructure.\u0022,\n \u0022metadata\u0022: {\n \u0022section_type\u0022: \u0022environmental\u0022,\n \u0022priority\u0022: \u0022high\u0022\n }\n },\n {\n \u0022id\u0022: 2,\n \u0022title\u0022: \u0022Social Responsibility\u0022,\n \u0022text\u0022: \u0022EuroBank expanded its community outreach programs, supporting over 500 local initiatives and increasing employee volunteer hours by 30%.\u0022,\n \u0022metadata\u0022: \u0022openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464\u0022,\n \u0022section_type\u0022: \u0022social\u0022,\n \u0022priority\u0022: \u0022medium\u0022\n }\n ]\n}\n\n## Responses\n# 201\n# Description: Document added to the corpus.\n# Content-Type: application/json\n# 400\n# Description: Document creation request was malformed.\n# Content-Type: application/json\n# 403\n# Description: Permissions do not allow adding a document to the corpus.\n# Content-Type: application/json\n# 404\n# Description: Corpus not found.\n# Content-Type: application/json\n# 409\n# Description: The document already exists\n# Content-Type: application/json", + "Code": "### Add a document to a corpus\n# @name createCorpusDocument\nPOST {{host}}/v2/corpora/{{corpus_key}}/documents?wait_for=searchable\nx-api-key: {{api_key}}\nAuthorization: Bearer {{token}}\nRequest-Timeout: {{Request-Timeout}}\nRequest-Timeout-Millis: {{Request-Timeout-Millis}}\nContent-Type: application/json\nAccept: application/json\n\n{\n \u0022type\u0022: \u0022structured\u0022,\n \u0022id\u0022: \u0022esg_report_2024\u0022,\n \u0022title\u0022: \u00222024 ESG Annual Report \\u2013 EuroBank\u0022,\n \u0022description\u0022: \u0022Comprehensive report on EuroBank\\u2019s environmental, social, and governance initiatives for 2024, outlining sustainability goals and compliance with EU regulations.\u0022,\n \u0022metadata\u0022: {\n \u0022doc_type\u0022: \u0022esg_report\u0022,\n \u0022region\u0022: \u0022EU\u0022,\n \u0022industry\u0022: \u0022banking\u0022,\n \u0022year\u0022: 2024,\n \u0022status\u0022: \u0022published\u0022,\n \u0022owner\u0022: \u0022sustainability_team\u0022\n },\n \u0022sections\u0022: [\n {\n \u0022id\u0022: 1,\n \u0022title\u0022: \u0022Environmental Initiatives\u0022,\n \u0022text\u0022: \u0022In 2024, EuroBank reduced carbon emissions by 22% through investments in renewable energy and energy-efficient infrastructure.\u0022,\n \u0022metadata\u0022: {\n \u0022section_type\u0022: \u0022environmental\u0022,\n \u0022priority\u0022: \u0022high\u0022\n }\n },\n {\n \u0022id\u0022: 2,\n \u0022title\u0022: \u0022Social Responsibility\u0022,\n \u0022text\u0022: \u0022EuroBank expanded its community outreach programs, supporting over 500 local initiatives and increasing employee volunteer hours by 30%.\u0022,\n \u0022metadata\u0022: {\n \u0022section_type\u0022: \u0022social\u0022,\n \u0022priority\u0022: \u0022medium\u0022\n }\n }\n ]\n}\n\n## Responses\n# 201\n# Description: Document added to the corpus.\n# Content-Type: application/json\n# 400\n# Description: Document creation request was malformed.\n# Content-Type: application/json\n# 403\n# Description: Permissions do not allow adding a document to the corpus.\n# Content-Type: application/json\n# 404\n# Description: Corpus not found.\n# Content-Type: application/json\n# 409\n# Description: The document already exists\n# Content-Type: application/json", "Format": "http", "OperationId": "createCorpusDocument", "Setup": null diff --git a/src/libs/Vectara/openapi.yaml b/src/libs/Vectara/openapi.yaml index a61b6bf3..2ec11435 100644 --- a/src/libs/Vectara/openapi.yaml +++ b/src/libs/Vectara/openapi.yaml @@ -66,6 +66,12 @@ tags: - name: Agent Secrets description: Manage agent-scoped secrets that can be referenced from tool argument overrides via $ref. +- name: Agent Aliases + description: 'Manage routing aliases that map a public name to one or more agents + under a configurable policy. Create a session through an alias (`POST /v2/agent_aliases/{alias_key}/sessions`) + and the alias''s policy picks the underlying agent that runs. + + ' - name: Guardrails description: List predefined guardrails for validating tool calls, agent outputs, and agent actions. @@ -10985,24 +10991,28 @@ paths: $ref: '#/components/schemas/NotFoundError' x-fern-sdk-group-name: agents x-fern-sdk-method-name: deleteConnector - /v2/pipelines: + /v2/agent_aliases: post: tags: - - Pipelines - summary: Create pipeline + - Agent Aliases + summary: Create an alias x-required-roles: - type: ApiRole roles: - - pipeline_administrator + - agent_developer + - agent_administrator - administrator - owner - description: Create a new pipeline that continuously ingests data from a source - system and sends each record to an agent for processing. A new agent session - is created per source record. A pipeline is distinct from an agent schedule - (which is a recurring single execution of an agent) and from a connector (which - is a bidirectional chat integration like Slack). A pipeline is an automated, - one-directional flow of all source data through an agent. - operationId: createPipeline + description: "Create a new alias. Aliases are routing primitives that map a\ + \ public name to one or more underlying agents under a configurable policy.\ + \ When a session is created through an alias (via `POST /v2/agent_aliases/{alias_key}/sessions`),\ + \ the alias's policy decides which underlying agent runs that session.\n\n\ + Common patterns:\n- **Direct alias** \u2014 a `routed` policy with one rule\ + \ and one target. Identical in behavior to invoking the agent directly.\n\ + - **Canary rollout** \u2014 a `routed` policy with one rule and multiple weighted\ + \ targets (e.g. 90% v1, 10% v2).\n- **Tenant routing** \u2014 a `routed` policy\ + \ with multiple rules, each matching on session metadata (e.g. `session.metadata.tenant`).\n" + operationId: createAgentAlias parameters: - $ref: '#/components/parameters/RequestTimeout' - $ref: '#/components/parameters/RequestTimeoutMillis' @@ -11011,84 +11021,57 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/CreatePipelineRequest' + $ref: '#/components/schemas/CreateAgentAliasRequest' responses: '201': - description: The pipeline has been created successfully. + description: The newly created alias. content: application/json: schema: - $ref: '#/components/schemas/Pipeline' + $ref: '#/components/schemas/AgentAlias' '400': - description: Pipeline creation request was malformed or contains invalid - configuration. + description: Request was malformed or the policy is invalid. content: application/json: schema: $ref: '#/components/schemas/BadRequestError' '403': - description: Permissions do not allow creating pipelines. + description: Permissions do not allow creating aliases. content: application/json: schema: $ref: '#/components/schemas/Error' '409': - description: A pipeline with this key already exists. + description: An alias with this key already exists. content: application/json: schema: $ref: '#/components/schemas/Error' - x-fern-sdk-group-name: pipelines + x-fern-sdk-group-name: agent_aliases x-fern-sdk-method-name: create get: tags: - - Pipelines - summary: List pipelines + - Agent Aliases + summary: List aliases x-required-roles: - type: ApiRole roles: - - pipeline_viewer - - pipeline_administrator + - agent_viewer + - agent_developer + - agent_administrator - viewer - administrator - owner - description: List all pipelines with optional filtering by source type, status, - or enabled state. - operationId: listPipelines + description: 'List all aliases owned by the current customer. + + ' + operationId: listAgentAliases parameters: - $ref: '#/components/parameters/RequestTimeout' - $ref: '#/components/parameters/RequestTimeoutMillis' - - in: query - name: source_type - description: Filter pipelines by source type. - required: false - schema: - type: string - enum: - - sharepoint - - s3 - - web - - in: query - name: status - description: Filter pipelines by status. - required: false - schema: - $ref: '#/components/schemas/PipelineStatus' - - in: query - name: enabled - description: Filter pipelines by enabled state. - required: false - schema: - type: boolean - - in: query - name: filter - description: A regex filter on pipeline name and description. - required: false - schema: - type: string - in: query name: limit - description: The maximum number of pipelines to return. + description: Max number of aliases to return. required: false schema: type: integer @@ -11098,329 +11081,343 @@ paths: default: 10 - in: query name: page_key - description: Used to retrieve the next page of pipelines after the limit has - been reached. + description: Pagination cursor. + required: false + schema: + type: string + - in: query + name: filter + description: A regular expression matched against alias names and descriptions + to filter results. required: false schema: type: string + example: support.* + - in: query + name: enabled + description: Filter aliases by enabled status. + required: false + schema: + type: boolean + example: true responses: '200': - description: List of pipelines. + description: List of aliases. content: application/json: schema: - $ref: '#/components/schemas/ListPipelinesResponse' + $ref: '#/components/schemas/ListAgentAliasesResponse' '403': - description: Permissions do not allow listing pipelines. + description: Permissions do not allow listing aliases. content: application/json: schema: $ref: '#/components/schemas/Error' - x-fern-sdk-group-name: pipelines + x-fern-sdk-group-name: agent_aliases x-fern-sdk-method-name: list x-fern-pagination: cursor: $request.page_key next_cursor: $response.metadata.page_key - results: $response.pipelines - /v2/pipelines/{pipeline_key}: + results: $response.aliases + /v2/agent_aliases/{alias_key}: get: tags: - - Pipelines - summary: Get pipeline + - Agent Aliases + summary: Get an alias x-required-roles: - type: ApiRole roles: - - pipeline_viewer - - pipeline_administrator + - agent_viewer + - agent_developer + - agent_administrator - viewer - administrator - owner - description: Retrieve a pipeline by its key, including its current status, watermark, - and configuration. - operationId: getPipeline + description: Retrieve a specific alias including its policy. + operationId: getAgentAlias parameters: - $ref: '#/components/parameters/RequestTimeout' - $ref: '#/components/parameters/RequestTimeoutMillis' - in: path - name: pipeline_key - description: The unique key of the pipeline. + name: alias_key + description: The unique key of the alias. required: true schema: - $ref: '#/components/schemas/PipelineKey' + $ref: '#/components/schemas/AgentAliasKey' responses: '200': - description: The requested pipeline. + description: The alias. content: application/json: schema: - $ref: '#/components/schemas/Pipeline' + $ref: '#/components/schemas/AgentAlias' '403': - description: Permissions do not allow accessing this pipeline. + description: Permissions do not allow viewing this alias. content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: Pipeline not found. + description: The alias was not found. content: application/json: schema: $ref: '#/components/schemas/NotFoundError' - x-fern-sdk-group-name: pipelines + x-fern-sdk-group-name: agent_aliases x-fern-sdk-method-name: get - put: + patch: tags: - - Pipelines - summary: Replace pipeline + - Agent Aliases + summary: Update an alias's metadata x-required-roles: - type: ApiRole roles: - - pipeline_administrator + - agent_developer + - agent_administrator - administrator - owner - description: Replace a pipeline's configuration. The full pipeline definition - must be provided. - operationId: replacePipeline + description: "Update an alias's metadata fields (name, description, enabled,\ + \ metadata). To replace the routing policy, use `PUT /v2/agent_aliases/{alias_key}/policy`\ + \ \u2014 policies are atomic and not partially updatable.\n" + operationId: updateAgentAlias parameters: - $ref: '#/components/parameters/RequestTimeout' - $ref: '#/components/parameters/RequestTimeoutMillis' - in: path - name: pipeline_key - description: The unique key of the pipeline to replace. + name: alias_key required: true schema: - $ref: '#/components/schemas/PipelineKey' + $ref: '#/components/schemas/AgentAliasKey' requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/CreatePipelineRequest' + $ref: '#/components/schemas/UpdateAgentAliasRequest' responses: '200': - description: The pipeline has been replaced successfully. - content: - application/json: - schema: - $ref: '#/components/schemas/Pipeline' - '400': - description: Pipeline replace request was malformed or contains invalid - configuration. + description: The updated alias. content: application/json: schema: - $ref: '#/components/schemas/BadRequestError' + $ref: '#/components/schemas/AgentAlias' '403': - description: Permissions do not allow replacing this pipeline. + description: Permissions do not allow modifying this alias. content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: Pipeline not found. + description: The alias was not found. content: application/json: schema: $ref: '#/components/schemas/NotFoundError' - x-fern-sdk-group-name: pipelines - x-fern-sdk-method-name: replace - patch: + x-fern-sdk-group-name: agent_aliases + x-fern-sdk-method-name: update + delete: tags: - - Pipelines - summary: Update pipeline + - Agent Aliases + summary: Delete an alias x-required-roles: - type: ApiRole roles: - - pipeline_administrator + - agent_administrator - administrator - owner - description: Partially update a pipeline's configuration. Omitted fields are - preserved. - operationId: updatePipeline + description: Delete an alias. The underlying agents the alias points at are + not affected. Returns 409 if any live resources still reference this alias. + operationId: deleteAgentAlias parameters: - $ref: '#/components/parameters/RequestTimeout' - $ref: '#/components/parameters/RequestTimeoutMillis' - in: path - name: pipeline_key - description: The unique key of the pipeline to update. + name: alias_key required: true schema: - $ref: '#/components/schemas/PipelineKey' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/UpdatePipelineRequest' + $ref: '#/components/schemas/AgentAliasKey' responses: - '200': - description: The pipeline has been updated successfully. - content: - application/json: - schema: - $ref: '#/components/schemas/Pipeline' - '400': - description: Pipeline update request was malformed or contains invalid configuration. - content: - application/json: - schema: - $ref: '#/components/schemas/BadRequestError' + '204': + description: The alias was deleted. '403': - description: Permissions do not allow updating this pipeline. + description: Permissions do not allow deleting this alias. content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: Pipeline not found. + description: The alias was not found. content: application/json: schema: $ref: '#/components/schemas/NotFoundError' - x-fern-sdk-group-name: pipelines - x-fern-sdk-method-name: update - delete: + '409': + description: The alias has live references (e.g. connectors) that prevent + deletion. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + x-fern-sdk-group-name: agent_aliases + x-fern-sdk-method-name: delete + /v2/agent_aliases/{alias_key}/policy: + put: tags: - - Pipelines - summary: Delete pipeline + - Agent Aliases + summary: Replace an alias's routing policy x-required-roles: - type: ApiRole roles: - - pipeline_administrator + - agent_administrator - administrator - owner - description: Permanently delete a pipeline and its run history. This cancels - any in-progress runs. Agent sessions created by this pipeline are not deleted. - operationId: deletePipeline + description: 'Atomically replace the alias''s routing policy and stickiness + configuration. Replacement is whole-object; partial merging is not supported. + + + Use this endpoint to flip canary weights, change tenant routing, etc. The + change is atomic: in-flight sessions resolved before the change keep their + resolved agent (resolution is once-at-creation). + + ' + operationId: replaceAgentAliasPolicy parameters: - $ref: '#/components/parameters/RequestTimeout' - $ref: '#/components/parameters/RequestTimeoutMillis' - in: path - name: pipeline_key - description: The unique key of the pipeline to delete. + name: alias_key required: true schema: - $ref: '#/components/schemas/PipelineKey' + $ref: '#/components/schemas/AgentAliasKey' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ReplaceAliasPolicyRequest' responses: - '204': - description: The pipeline has been deleted successfully. + '200': + description: The alias with its updated policy. + content: + application/json: + schema: + $ref: '#/components/schemas/AgentAlias' + '400': + description: The new policy is invalid. + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequestError' '403': - description: Permissions do not allow deleting this pipeline. + description: Permissions do not allow modifying this alias. content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: Pipeline not found. + description: The alias was not found. content: application/json: schema: $ref: '#/components/schemas/NotFoundError' - x-fern-sdk-group-name: pipelines - x-fern-sdk-method-name: delete - /v2/pipelines/{pipeline_key}/trigger: + x-fern-sdk-group-name: agent_aliases + x-fern-sdk-method-name: replace_policy + /v2/agent_aliases/{alias_key}/sessions: post: tags: - - Pipelines - summary: Trigger pipeline + - Agent Aliases + summary: Create session via alias x-required-roles: - type: ApiRole roles: - - pipeline_administrator + - agent_user + - agent_developer + - agent_administrator - administrator - owner - description: Manually trigger a pipeline run outside of the normal schedule. - The pipeline will fetch new data from the source and process it through the - agent. Returns the created run. - operationId: triggerPipeline + description: 'Create a new session by routing through an alias. The alias''s + policy is evaluated to pick the underlying agent that will own the session. + Subsequent operations on the session can be addressed via this alias or directly + via `/v2/agents/{resolved_agent_key}/sessions/{session_key}`. + + ' + operationId: createAliasRoutedSession parameters: - $ref: '#/components/parameters/RequestTimeout' - $ref: '#/components/parameters/RequestTimeoutMillis' - in: path - name: pipeline_key - description: The unique key of the pipeline to trigger. + name: alias_key + description: The alias whose routing policy decides which agent owns the session. required: true schema: - $ref: '#/components/schemas/PipelineKey' + $ref: '#/components/schemas/AgentAliasKey' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CreateAgentSessionRequest' responses: '201': - description: The pipeline run has been created. + description: The newly created session, owned by the agent the alias's policy + resolved to. content: application/json: schema: - $ref: '#/components/schemas/PipelineRun' + $ref: '#/components/schemas/AgentSession' + '400': + description: Session creation request was malformed, or the alias's policy + could not resolve against the session context. + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequestError' '403': - description: Permissions do not allow triggering this pipeline. + description: Permissions do not allow creating sessions via this alias. content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: Pipeline not found. + description: Alias not found or not currently active. content: application/json: schema: $ref: '#/components/schemas/NotFoundError' - '409': - description: A run is already in progress for this pipeline. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - x-fern-sdk-group-name: pipelines - x-fern-sdk-method-name: trigger - /v2/pipelines/{pipeline_key}/dead_letters: + x-fern-sdk-group-name: agent_aliases_sessions + x-fern-sdk-method-name: create get: tags: - - Pipeline Dead Letters - summary: List dead letters + - Agent Aliases + summary: List sessions routed via this alias x-required-roles: - type: ApiRole roles: - - pipeline_viewer - - pipeline_administrator + - agent_viewer + - agent_developer + - agent_administrator - viewer - administrator - owner - description: List dead letters for a pipeline, with optional filtering by status - or run. - operationId: listPipelineDeadLetterEntries + description: List sessions that were originally created via this alias (sessions + whose `alias_key` matches). Sessions are also reachable under their resolved + agent's URL; this endpoint is the alias-scoped view. + operationId: listAliasRoutedSessions parameters: - $ref: '#/components/parameters/RequestTimeout' - $ref: '#/components/parameters/RequestTimeoutMillis' - in: path - name: pipeline_key - description: The unique key of the pipeline. + name: alias_key required: true schema: - $ref: '#/components/schemas/PipelineKey' - - in: query - name: status - description: Filter dead letters by status. - required: false - schema: - $ref: '#/components/schemas/DeadLetterStatus' - - in: query - name: last_run_id - description: Filter dead letters to those from a specific run. - required: false - schema: - $ref: '#/components/schemas/PipelineRunId' - - in: query - name: origin - description: Filter dead letters by origin. - required: false - schema: - $ref: '#/components/schemas/DeadLetterOrigin' + $ref: '#/components/schemas/AgentAliasKey' - in: query name: filter - description: A regex filter on the source record ID. Supports partial matching. required: false schema: type: string - in: query name: limit - description: The maximum number of dead letters to return. required: false schema: type: integer @@ -11430,299 +11427,282 @@ paths: default: 10 - in: query name: page_key - description: Used to retrieve the next page of dead letters after the limit - has been reached. required: false schema: type: string responses: '200': - description: List of dead letters. + description: Sessions created via this alias. content: application/json: schema: - $ref: '#/components/schemas/ListPipelineDeadLetterEntriesResponse' + $ref: '#/components/schemas/ListAgentSessionsResponse' '403': - description: Permissions do not allow listing dead letters for this pipeline. + description: Permissions do not allow listing alias-routed sessions. content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: Pipeline not found. + description: Alias not found. content: application/json: schema: $ref: '#/components/schemas/NotFoundError' - x-fern-sdk-group-name: pipeline_dead_letter_entries + x-fern-sdk-group-name: agent_aliases_sessions x-fern-sdk-method-name: list x-fern-pagination: cursor: $request.page_key next_cursor: $response.metadata.page_key - results: $response.dead_letters - post: + results: $response.sessions + /v2/agent_aliases/{alias_key}/sessions/{session_key}: + get: tags: - - Pipeline Dead Letters - summary: Create dead letter + - Agent Aliases + summary: Get alias-routed session x-required-roles: - type: ApiRole roles: - - pipeline_administrator + - agent_viewer + - agent_developer + - agent_administrator + - viewer - administrator - owner - description: Manually add a source record to the dead letter queue for reprocessing. - Use this when you want to force a record through the pipeline again, for example - when the agent or judge made an incorrect decision. - operationId: createPipelineDeadLetterEntry + description: Retrieve a session originally created via this alias. + operationId: getAliasRoutedSession parameters: - $ref: '#/components/parameters/RequestTimeout' - $ref: '#/components/parameters/RequestTimeoutMillis' - in: path - name: pipeline_key - description: The unique key of the pipeline. + name: alias_key required: true schema: - $ref: '#/components/schemas/PipelineKey' - requestBody: + $ref: '#/components/schemas/AgentAliasKey' + - in: path + name: session_key required: true - content: - application/json: - schema: - $ref: '#/components/schemas/CreatePipelineDeadLetterEntryRequest' + schema: + $ref: '#/components/schemas/AgentSessionKey' responses: - '201': - description: The dead letter has been created successfully. - content: - application/json: - schema: - $ref: '#/components/schemas/PipelineDeadLetterEntry' - '400': - description: Request was malformed. + '200': + description: The requested alias-routed session. content: application/json: schema: - $ref: '#/components/schemas/BadRequestError' + $ref: '#/components/schemas/AgentSession' '403': - description: Permissions do not allow creating dead letters for this pipeline. + description: Permissions do not allow accessing this session. content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: Pipeline not found. + description: Alias or session not found. content: application/json: schema: $ref: '#/components/schemas/NotFoundError' - '409': - description: A dead letter for this source record already exists and is - being retried. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - x-fern-sdk-group-name: pipeline_dead_letter_entries - x-fern-sdk-method-name: create - /v2/pipelines/{pipeline_key}/dead_letters/{dead_letter_id}: - get: + x-fern-sdk-group-name: agent_aliases_sessions + x-fern-sdk-method-name: get + patch: tags: - - Pipeline Dead Letters - summary: Get dead letter + - Agent Aliases + summary: Update alias-routed session x-required-roles: - type: ApiRole roles: - - pipeline_viewer - - pipeline_administrator - - viewer + - agent_developer + - agent_administrator - administrator - owner - description: Retrieve a specific dead letter by its ID. - operationId: getPipelineDeadLetterEntry + description: Update a session originally created via this alias. + operationId: updateAliasRoutedSession parameters: - $ref: '#/components/parameters/RequestTimeout' - $ref: '#/components/parameters/RequestTimeoutMillis' - in: path - name: pipeline_key - description: The unique key of the pipeline. + name: alias_key required: true schema: - $ref: '#/components/schemas/PipelineKey' + $ref: '#/components/schemas/AgentAliasKey' - in: path - name: dead_letter_id - description: The unique identifier of the dead letter. + name: session_key required: true schema: - type: string + $ref: '#/components/schemas/AgentSessionKey' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateAgentSessionRequest' responses: '200': - description: The requested dead letter. + description: The session was updated. content: application/json: schema: - $ref: '#/components/schemas/PipelineDeadLetterEntry' + $ref: '#/components/schemas/AgentSession' + '400': + description: Update request was malformed. + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequestError' '403': - description: Permissions do not allow accessing this dead letter. + description: Permissions do not allow updating this session. content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: Pipeline or dead letter not found. + description: Alias or session not found. content: application/json: schema: $ref: '#/components/schemas/NotFoundError' - x-fern-sdk-group-name: pipeline_dead_letter_entries - x-fern-sdk-method-name: get + x-fern-sdk-group-name: agent_aliases_sessions + x-fern-sdk-method-name: update delete: tags: - - Pipeline Dead Letters - summary: Delete dead letter + - Agent Aliases + summary: Delete alias-routed session x-required-roles: - type: ApiRole roles: - - pipeline_administrator + - agent_developer + - agent_administrator - administrator - owner - description: Remove a dead letter from the queue. Use this to dismiss a known - failure that does not need retrying. - operationId: deletePipelineDeadLetterEntry + description: Delete a session originally created via this alias. + operationId: deleteAliasRoutedSession parameters: - $ref: '#/components/parameters/RequestTimeout' - $ref: '#/components/parameters/RequestTimeoutMillis' - in: path - name: pipeline_key - description: The unique key of the pipeline. + name: alias_key required: true schema: - $ref: '#/components/schemas/PipelineKey' + $ref: '#/components/schemas/AgentAliasKey' - in: path - name: dead_letter_id - description: The unique identifier of the dead letter. + name: session_key required: true schema: - type: string + $ref: '#/components/schemas/AgentSessionKey' responses: '204': - description: The dead letter has been deleted successfully. + description: The session was deleted. '403': - description: Permissions do not allow deleting this dead letter. + description: Permissions do not allow deleting this session. content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: Pipeline or dead letter not found. + description: Alias or session not found. content: application/json: schema: $ref: '#/components/schemas/NotFoundError' - x-fern-sdk-group-name: pipeline_dead_letter_entries + x-fern-sdk-group-name: agent_aliases_sessions x-fern-sdk-method-name: delete - /v2/pipelines/{pipeline_key}/dead_letters/process: + /v2/agent_aliases/{alias_key}/sessions/{session_key}/events: post: tags: - - Pipeline Dead Letters - summary: Process dead letters + - Agent Aliases + summary: Submit input to alias-routed session x-required-roles: - type: ApiRole roles: - - pipeline_administrator + - agent_user + - agent_developer + - agent_administrator - administrator - owner - description: Process dead letters by creating a new pipeline run that re-fetches - the specified records from source and sends them through the agent. If no - filters are provided, all pending dead letters are processed. - operationId: processPipelineDeadLetterEntries + description: Submit an input event to a session originally created via this + alias. The session's resolved agent runs the loop. + operationId: createAliasRoutedInput parameters: - $ref: '#/components/parameters/RequestTimeout' - $ref: '#/components/parameters/RequestTimeoutMillis' - in: path - name: pipeline_key - description: The unique key of the pipeline. + name: alias_key required: true schema: - $ref: '#/components/schemas/PipelineKey' + $ref: '#/components/schemas/AgentAliasKey' + - in: path + name: session_key + required: true + schema: + $ref: '#/components/schemas/AgentSessionKey' requestBody: - required: false + required: true content: application/json: schema: - $ref: '#/components/schemas/ProcessPipelineDeadLetterEntriesRequest' + $ref: '#/components/schemas/CreateInputRequest' + x-stream-based-on-body: streamResponse() responses: '201': - description: The retry run has been created. + description: Events produced during this turn. content: application/json: schema: - $ref: '#/components/schemas/PipelineRun' + $ref: '#/components/schemas/AgentResponse' + text/event-stream: + schema: + $ref: '#/components/schemas/AgentStreamedResponse' '400': - description: Request was malformed. + description: Input request was malformed. content: application/json: schema: $ref: '#/components/schemas/BadRequestError' '403': - description: Permissions do not allow processing dead letters for this pipeline. + description: Permissions do not allow submitting input to this session. content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: Pipeline not found. + description: Alias or session not found. content: application/json: schema: $ref: '#/components/schemas/NotFoundError' - '409': - description: A run is already in progress for this pipeline. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - x-fern-sdk-group-name: pipeline_dead_letter_entries - x-fern-sdk-method-name: process - /v2/pipelines/{pipeline_key}/runs: + x-fern-sdk-group-name: agent_aliases_sessions + x-fern-sdk-method-name: create_input get: tags: - - Pipeline Runs - summary: List pipeline runs + - Agent Aliases + summary: List events on alias-routed session x-required-roles: - type: ApiRole roles: - - pipeline_viewer - - pipeline_administrator + - agent_viewer + - agent_developer + - agent_administrator - viewer - administrator - owner - description: List execution runs for a pipeline, with optional filtering by - status. - operationId: listPipelineRuns + description: List events of a session originally created via this alias. + operationId: listAliasRoutedEvents parameters: - $ref: '#/components/parameters/RequestTimeout' - $ref: '#/components/parameters/RequestTimeoutMillis' - in: path - name: pipeline_key - description: The unique key of the pipeline. + name: alias_key required: true schema: - $ref: '#/components/schemas/PipelineKey' - - in: query - name: status - description: Filter runs by status. - required: false - schema: - $ref: '#/components/schemas/PipelineRunStatus' - - in: query - name: after - description: Only return runs created after this timestamp. - required: false + $ref: '#/components/schemas/AgentAliasKey' + - in: path + name: session_key + required: true schema: - type: string - format: date-time + $ref: '#/components/schemas/AgentSessionKey' - in: query name: limit - description: The maximum number of runs to return. required: false schema: type: integer @@ -11732,369 +11712,342 @@ paths: default: 10 - in: query name: page_key - description: Used to retrieve the next page of runs after the limit has been - reached. required: false schema: type: string responses: '200': - description: List of pipeline runs. + description: Events on this session. content: application/json: schema: - $ref: '#/components/schemas/ListPipelineRunsResponse' + $ref: '#/components/schemas/ListAgentEventsResponse' '403': - description: Permissions do not allow listing runs for this pipeline. + description: Permissions do not allow listing events on this session. content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: Pipeline not found. + description: Alias or session not found. content: application/json: schema: $ref: '#/components/schemas/NotFoundError' - x-fern-sdk-group-name: pipeline_runs - x-fern-sdk-method-name: list + x-fern-sdk-group-name: agent_aliases_sessions + x-fern-sdk-method-name: list_events x-fern-pagination: cursor: $request.page_key next_cursor: $response.metadata.page_key - results: $response.runs - /v2/pipelines/{pipeline_key}/runs/{run_id}: + results: $response.events + /v2/agent_aliases/{alias_key}/sessions/{session_key}/events/{event_id}: get: tags: - - Pipeline Runs - summary: Get pipeline run + - Agent Aliases + summary: Get event on alias-routed session x-required-roles: - type: ApiRole roles: - - pipeline_viewer - - pipeline_administrator + - agent_viewer + - agent_developer + - agent_administrator - viewer - administrator - owner - description: Retrieve details of a specific pipeline run including record counts, - session keys, and status. - operationId: getPipelineRun + description: Get a single event of a session originally created via this alias. + operationId: getAliasRoutedEvent parameters: - $ref: '#/components/parameters/RequestTimeout' - $ref: '#/components/parameters/RequestTimeoutMillis' - in: path - name: pipeline_key - description: The unique key of the pipeline. + name: alias_key required: true schema: - $ref: '#/components/schemas/PipelineKey' + $ref: '#/components/schemas/AgentAliasKey' - in: path - name: run_id - description: The unique identifier of the run. + name: session_key required: true schema: - $ref: '#/components/schemas/PipelineRunId' + $ref: '#/components/schemas/AgentSessionKey' + - in: path + name: event_id + required: true + schema: + type: string responses: '200': - description: The requested pipeline run. + description: The requested event. content: application/json: schema: - $ref: '#/components/schemas/PipelineRun' + $ref: '#/components/schemas/AgentEvent' '403': - description: Permissions do not allow accessing this run. + description: Permissions do not allow accessing this event. content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: Pipeline or run not found. + description: Alias, session, or event not found. content: application/json: schema: $ref: '#/components/schemas/NotFoundError' - x-fern-sdk-group-name: pipeline_runs - x-fern-sdk-method-name: get - /v2/pipelines/{pipeline_key}/runs/{run_id}/cancel: - post: + x-fern-sdk-group-name: agent_aliases_sessions + x-fern-sdk-method-name: get_event + delete: tags: - - Pipeline Runs - summary: Cancel pipeline run + - Agent Aliases + summary: Delete event on alias-routed session x-required-roles: - type: ApiRole roles: - - pipeline_administrator + - agent_developer + - agent_administrator - administrator - owner - description: Request cancellation of an in-progress pipeline run. The run is - asked to stop at the next checkpoint; it may take a moment to transition to - the cancelled state. Runs that have already completed, failed, or been cancelled - cannot be cancelled again. - operationId: cancelPipelineRun + description: Delete a single event of a session originally created via this + alias. + operationId: deleteAliasRoutedEvent parameters: - $ref: '#/components/parameters/RequestTimeout' - $ref: '#/components/parameters/RequestTimeoutMillis' - in: path - name: pipeline_key - description: The unique key of the pipeline. + name: alias_key required: true schema: - $ref: '#/components/schemas/PipelineKey' + $ref: '#/components/schemas/AgentAliasKey' - in: path - name: run_id - description: The unique identifier of the run. + name: session_key required: true schema: - $ref: '#/components/schemas/PipelineRunId' + $ref: '#/components/schemas/AgentSessionKey' + - in: path + name: event_id + required: true + schema: + type: string responses: '204': - description: Cancellation has been requested. + description: The event was deleted. '403': - description: Permissions do not allow cancelling this run. + description: Permissions do not allow deleting this event. content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: Pipeline or run not found. + description: Alias, session, or event not found. content: application/json: schema: $ref: '#/components/schemas/NotFoundError' - '409': - description: The run is not in a cancellable state. It has already completed, - failed, or had cancellation requested. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - x-fern-sdk-group-name: pipeline_runs - x-fern-sdk-method-name: cancel - /v2/pipelines/{pipeline_key}/runs/{run_id}/events: - get: + x-fern-sdk-group-name: agent_aliases_sessions + x-fern-sdk-method-name: delete_event + /v2/agent_aliases/{alias_key}/sessions/{session_key}/events/{event_id}/hide: + post: tags: - - Pipeline Runs - summary: List pipeline run events + - Agent Aliases + summary: Hide event on alias-routed session x-required-roles: - type: ApiRole roles: - - pipeline_viewer - - pipeline_administrator - - viewer + - agent_developer + - agent_administrator - administrator - owner - description: List the timeline of events for a pipeline run. Events surface - what the run did from a customer-observability perspective (records discovered, - records processed, agent sessions created, dead letters, watermark advances, - lifecycle transitions) rather than every internal Temporal step. A pipeline - run may span multiple underlying Temporal executions; this endpoint stitches - them into a single timeline keyed by `run_id`. - operationId: listPipelineRunEvents + description: Manually hide an event on a session originally created via this + alias. Sets hide_reason to 'manual'. + operationId: hideAliasRoutedEvent parameters: - $ref: '#/components/parameters/RequestTimeout' - $ref: '#/components/parameters/RequestTimeoutMillis' - in: path - name: pipeline_key - description: The unique key of the pipeline. + name: alias_key required: true schema: - $ref: '#/components/schemas/PipelineKey' + $ref: '#/components/schemas/AgentAliasKey' - in: path - name: run_id - description: The unique identifier of the run. + name: session_key required: true schema: - $ref: '#/components/schemas/PipelineRunId' - - in: query - name: type - description: Filter to one or more event types. Repeat the parameter to pass - multiple values. - required: false - explode: true - schema: - type: array - items: - $ref: '#/components/schemas/PipelineRunEventType' - - in: query - name: source_record_id - description: Filter to events for a specific source record. - required: false - schema: - type: string - - in: query - name: order - description: Order events by timestamp. Defaults to newest-first. - required: false - schema: - $ref: '#/components/schemas/SortOrder' - - in: query - name: limit - description: The maximum number of events to return. - required: false - schema: - type: integer - format: int32 - minimum: 1 - maximum: 200 - default: 50 - - in: query - name: page_key - description: Used to retrieve the next page of events after the limit has - been reached. - required: false + $ref: '#/components/schemas/AgentSessionKey' + - in: path + name: event_id + required: true schema: type: string + pattern: aev_[0-9a-zA-Z_-]+$ responses: '200': - description: List of pipeline run events. + description: Event hidden. content: application/json: schema: - $ref: '#/components/schemas/ListPipelineRunEventsResponse' + $ref: '#/components/schemas/AgentEvent' '403': - description: Permissions do not allow accessing this run. + description: Permissions do not allow hiding events on this session. content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: Pipeline or run not found. + description: Alias, session, or event not found. content: application/json: schema: $ref: '#/components/schemas/NotFoundError' - x-fern-sdk-group-name: pipeline_runs - x-fern-sdk-method-name: list_events - x-fern-pagination: - cursor: $request.page_key - next_cursor: $response.metadata.page_key - results: $response.events - /v2/metrics: - get: + x-fern-sdk-group-name: agent_aliases_events + x-fern-sdk-method-name: hide + /v2/agent_aliases/{alias_key}/sessions/{session_key}/events/{event_id}/unhide: + post: tags: - - CustomerMetrics - summary: List available metrics + - Agent Aliases + summary: Unhide event on alias-routed session x-required-roles: - type: ApiRole roles: - - viewer + - agent_developer + - agent_administrator - administrator - owner - description: Returns the catalog of registered metrics that can be queried via - `/v2/metrics/{metric_name}`. Use this to discover metric names, kinds, and - supported labels. - operationId: listMetrics - x-fern-sdk-group-name: customer_metrics - x-fern-sdk-method-name: list + description: Unhide a hidden event on a session originally created via this + alias. Clears the hide_reason. + operationId: unhideAliasRoutedEvent 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 + - in: path + name: alias_key + required: true schema: - type: array - items: - type: string + $ref: '#/components/schemas/AgentAliasKey' + - in: path + name: session_key + required: true + schema: + $ref: '#/components/schemas/AgentSessionKey' + - in: path + name: event_id + required: true + schema: + type: string + pattern: aev_[0-9a-zA-Z_-]+$ responses: '200': - description: Catalog of registered metrics. + description: Event unhidden. content: application/json: schema: - $ref: '#/components/schemas/ListMetricsResponse' - /v2/metrics/{metric_name}: + $ref: '#/components/schemas/AgentEvent' + '403': + description: Permissions do not allow unhiding events on this session. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Alias, session, or event not found. + content: + application/json: + schema: + $ref: '#/components/schemas/NotFoundError' + x-fern-sdk-group-name: agent_aliases_events + x-fern-sdk-method-name: unhide + /v2/agent_aliases/{alias_key}/sessions/{session_key}/artifacts: get: tags: - - CustomerMetrics - summary: Query a metric time series + - Agent Aliases + summary: List artifacts on alias-routed session x-required-roles: - type: ApiRole roles: + - agent_viewer + - agent_developer + - agent_administrator - viewer - administrator - owner - description: Returns a time series of aggregated metric values for the named - metric within the requested time range. - operationId: getMetric - x-fern-sdk-group-name: customer_metrics - x-fern-sdk-method-name: get + description: List artifacts stored in a session originally created via this + alias. Artifacts are files either uploaded by the user, or generated within + the session. + operationId: listAliasRoutedSessionArtifacts parameters: - $ref: '#/components/parameters/RequestTimeout' - $ref: '#/components/parameters/RequestTimeoutMillis' - - name: metric_name - in: path + - in: path + name: alias_key required: true - description: Name of the metric to query (see `/v2/metrics` for the catalog). schema: - type: string - - name: labels - in: query + $ref: '#/components/schemas/AgentAliasKey' + - in: path + name: session_key + required: true + schema: + $ref: '#/components/schemas/AgentSessionKey' + - in: query + name: limit required: false - description: Label filters keyed by label name. The set of valid label names - for each metric is published in its descriptor at `/v2/metrics`. - style: deepObject - explode: true schema: - type: object - additionalProperties: - type: array - minItems: 1 - items: - type: string - minLength: 1 - - name: start + type: integer + format: int32 + minimum: 1 + maximum: 100 + default: 10 + - name: page_key in: query - required: true - description: Inclusive start of the query window (ISO 8601). Must be no more - than 30 days before now. + required: false schema: type: string - format: date-time - - name: end + - name: sort_by in: query - required: true - description: Exclusive end of the query window (ISO 8601). Must be after `start`. + required: false schema: type: string - format: date-time - - name: max_bins + enum: + - created_at + - updated_at + default: created_at + - name: order_by 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 time-bin - size is reported in the response as `bin_size_seconds`. Defaults to 60. schema: - type: integer - format: int32 - minimum: 1 - maximum: 1000 - default: 60 + type: string + enum: + - asc + - desc + default: desc responses: '200': - description: The requested metric series. + description: List of artifacts in the session. content: application/json: schema: - $ref: '#/components/schemas/MetricSeries' - '400': - description: Invalid request parameters. + $ref: '#/components/schemas/ListSessionArtifactsResponse' + '403': + description: Permissions do not allow listing artifacts on this session. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' '404': - description: The named metric is not registered. - /v2/agent_analytics/traces: + description: Alias or session not found. + content: + application/json: + schema: + $ref: '#/components/schemas/NotFoundError' + x-fern-sdk-group-name: agent_aliases_artifacts + x-fern-sdk-method-name: list + x-fern-pagination: + cursor: $request.page_key + next_cursor: $response.metadata.page_key + results: $response.artifacts + /v2/agent_aliases/{alias_key}/sessions/{session_key}/artifacts/{artifact_id}: get: tags: - - Agent Analytics - summary: List agent traces + - Agent Aliases + summary: Get artifact on alias-routed session x-required-roles: - - type: AgentRole - roles: - - agent_viewer - - agent_developer - - agent_administrator - type: ApiRole roles: - agent_viewer @@ -12103,872 +12056,2034 @@ paths: - viewer - administrator - owner - description: List agent traces with optional filtering by agent, session, status, - and time range. - operationId: listTraces + description: Retrieve an artifact stored in a session originally created via + this alias, including metadata and base64-encoded file content. + operationId: getAliasRoutedSessionArtifact parameters: - $ref: '#/components/parameters/RequestTimeout' - $ref: '#/components/parameters/RequestTimeoutMillis' - - name: agent_key - in: query - description: Filter traces by agent key. - required: false - schema: - type: string - - name: session_key - in: query - description: Filter traces by session key. - required: false - schema: - type: string - - name: status - in: query - description: Filter traces by status. - required: false - schema: - type: string - enum: - - ok - - error - - name: error_type - in: query - description: Filter to traces containing a span with this exact error type. - required: false - schema: - type: string - enum: - - context_limit_exceeded - - step_transition_limit_exceeded - - actions_limit_reached - - llm_generation_error - - stream_error - - internal - - name: operation - in: query - description: Filter to traces containing at least one span with this operation. - required: false - schema: - type: string - enum: - - invoke_agent - - chat - - execute_tool - - thinking - - output - - guardrail - - step_transition - - image_read - - compaction - - name: tool_name - in: query - description: Filter to traces containing a tool execution span with this exact - tool name. - required: false - schema: - type: string - - name: tool_error_type - in: query - description: Filter to traces containing a tool span with this exact error - type. - required: false - schema: - type: string - enum: - - invalid_input - - not_found - - invalid_configuration - - timeout - - execution_error - - dependency_failed - - name: started_after - in: query - description: Return only traces started after this time (ISO 8601). - required: false - schema: - type: string - format: date-time - - name: started_before - in: query - description: Return only traces started before this time (ISO 8601). - required: false - schema: - type: string - format: date-time - - name: min_duration_ms - in: query - description: Return only traces with duration at or above this threshold in - milliseconds. - required: false - schema: - type: integer - format: int64 - - name: max_duration_ms - in: query - description: Return only traces with duration at or below this threshold in - milliseconds. - required: false + - in: path + name: alias_key + required: true schema: - type: integer - format: int64 - - name: limit - in: query - description: The maximum number of traces to return. - required: false + $ref: '#/components/schemas/AgentAliasKey' + - in: path + name: session_key + required: true schema: - type: integer - format: int32 - minimum: 1 - maximum: 100 - default: 10 - - name: page_key - in: query - description: Used to retrieve the next page of results. - required: false + $ref: '#/components/schemas/AgentSessionKey' + - in: path + name: artifact_id + required: true schema: type: string + pattern: art_[a-z0-9_-]+$ + example: art_report_pdf_a3f2 responses: '200': - description: List of agent traces. + description: The requested artifact with metadata and base64-encoded content. content: application/json: schema: - $ref: '#/components/schemas/ListAgentTracesResponse' + $ref: '#/components/schemas/SessionArtifact' '403': - description: Permissions do not allow listing traces. + description: Permissions do not allow accessing this artifact. content: application/json: schema: $ref: '#/components/schemas/Error' - x-fern-sdk-group-name: agent_analytics - x-fern-sdk-method-name: list_traces - x-fern-pagination: - cursor: $request.page_key - next_cursor: $response.metadata.page_key - results: $response.traces - /v2/agent_analytics/traces/{trace_id}: - get: + '404': + description: Alias, session, or artifact not found. + content: + application/json: + schema: + $ref: '#/components/schemas/NotFoundError' + x-fern-sdk-group-name: agent_aliases_artifacts + x-fern-sdk-method-name: get + /v2/pipelines: + post: tags: - - Agent Analytics - summary: Get agent trace + - Pipelines + summary: Create pipeline x-required-roles: - - type: AgentRole - roles: - - agent_viewer - - agent_developer - - agent_administrator - type: ApiRole roles: - - agent_viewer - - agent_developer - - agent_administrator - - viewer + - pipeline_administrator - administrator - owner - description: Retrieve the summary of a specific agent trace by its trace ID. - operationId: getTrace + description: Create a new pipeline that continuously ingests data from a source + system and sends each record to an agent for processing. A new agent session + is created per source record. A pipeline is distinct from an agent schedule + (which is a recurring single execution of an agent) and from a connector (which + is a bidirectional chat integration like Slack). A pipeline is an automated, + one-directional flow of all source data through an agent. + operationId: createPipeline parameters: - $ref: '#/components/parameters/RequestTimeout' - $ref: '#/components/parameters/RequestTimeoutMillis' - - in: path - name: trace_id - description: The unique identifier of the trace. + requestBody: required: true - schema: - type: string - example: 0af7651916cd43dd8448eb211c80319c + content: + application/json: + schema: + $ref: '#/components/schemas/CreatePipelineRequest' responses: - '200': - description: The requested agent trace. + '201': + description: The pipeline has been created successfully. content: application/json: schema: - $ref: '#/components/schemas/AgentTrace' + $ref: '#/components/schemas/Pipeline' + '400': + description: Pipeline creation request was malformed or contains invalid + configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequestError' '403': - description: Permissions do not allow accessing this trace. + description: Permissions do not allow creating pipelines. content: application/json: schema: $ref: '#/components/schemas/Error' - '404': - description: Trace not found. + '409': + description: A pipeline with this key already exists. content: application/json: schema: - $ref: '#/components/schemas/NotFoundError' - x-fern-sdk-group-name: agent_analytics - x-fern-sdk-method-name: get_trace - /v2/agent_analytics/traces/{trace_id}/spans: + $ref: '#/components/schemas/Error' + x-fern-sdk-group-name: pipelines + x-fern-sdk-method-name: create get: tags: - - Agent Analytics - summary: List spans in a trace + - Pipelines + summary: List pipelines x-required-roles: - - type: AgentRole - roles: - - agent_viewer - - agent_developer - - agent_administrator - type: ApiRole roles: - - agent_viewer - - agent_developer - - agent_administrator + - pipeline_viewer + - pipeline_administrator - viewer - administrator - owner - description: Retrieve the flat list of spans for a given trace, each with its - parent_span_id for reconstructing the tree. - operationId: listTraceSpans + description: List all pipelines with optional filtering by source type, status, + or enabled state. + operationId: listPipelines parameters: - $ref: '#/components/parameters/RequestTimeout' - $ref: '#/components/parameters/RequestTimeoutMillis' - - in: path - name: trace_id - description: The unique identifier of the trace. - required: true + - in: query + name: source_type + description: Filter pipelines by source type. + required: false schema: type: string - - name: include_content - in: query - description: When true, include decrypted span content such as input/output - messages and tool arguments. + enum: + - sharepoint + - s3 + - web + - in: query + name: status + description: Filter pipelines by status. required: false schema: - type: boolean - default: false - - name: operation - in: query - description: Restrict to spans with this operation. + $ref: '#/components/schemas/PipelineStatus' + - in: query + name: enabled + description: Filter pipelines by enabled state. required: false schema: - type: string - enum: - - invoke_agent - - chat - - execute_tool - - thinking - - output - - guardrail - - step_transition - - image_read - - compaction - - name: parent_span_id - in: query - description: Filter spans to only direct children of this span ID. + type: boolean + - in: query + name: filter + description: A regex filter on pipeline name and description. required: false schema: type: string - - name: exclude_subagents - in: query - description: When true, exclude nested sub-agent invocations and their descendants. - Restricts results to the entry-point invoke_agent span and any spans that - belong to the entry agent's session. - required: false - schema: - type: boolean - default: false - - name: limit - in: query - description: The maximum number of spans to return. + - in: query + name: limit + description: The maximum number of pipelines to return. required: false schema: type: integer format: int32 minimum: 1 - maximum: 500 - default: 100 - - name: page_key - in: query - description: Used to retrieve the next page of results. + maximum: 100 + default: 10 + - in: query + name: page_key + description: Used to retrieve the next page of pipelines after the limit has + been reached. required: false schema: type: string responses: '200': - description: List of spans in the trace. + description: List of pipelines. content: application/json: schema: - $ref: '#/components/schemas/ListAgentTraceSpansResponse' + $ref: '#/components/schemas/ListPipelinesResponse' '403': - description: Permissions do not allow accessing this trace. + description: Permissions do not allow listing pipelines. content: application/json: schema: $ref: '#/components/schemas/Error' - '404': - description: Trace not found. - content: - application/json: - schema: - $ref: '#/components/schemas/NotFoundError' - x-fern-sdk-group-name: agent_analytics - x-fern-sdk-method-name: list_trace_spans + x-fern-sdk-group-name: pipelines + x-fern-sdk-method-name: list x-fern-pagination: cursor: $request.page_key next_cursor: $response.metadata.page_key - results: $response.spans - /v2/agent_analytics/traces/{trace_id}/spans/{span_id}: + results: $response.pipelines + /v2/pipelines/{pipeline_key}: get: tags: - - Agent Analytics - summary: Get span in a trace + - Pipelines + summary: Get pipeline x-required-roles: - - type: AgentRole - roles: - - agent_viewer - - agent_developer - - agent_administrator - type: ApiRole roles: - - agent_viewer - - agent_developer - - agent_administrator + - pipeline_viewer + - pipeline_administrator - viewer - administrator - owner - description: Retrieve the details of a specific span within a trace. - operationId: getTraceSpan + description: Retrieve a pipeline by its key, including its current status, watermark, + and configuration. + operationId: getPipeline parameters: - $ref: '#/components/parameters/RequestTimeout' - $ref: '#/components/parameters/RequestTimeoutMillis' - in: path - name: trace_id - description: The unique identifier of the trace. - required: true - schema: - type: string - - in: path - name: span_id - description: The unique identifier of the span. + name: pipeline_key + description: The unique key of the pipeline. required: true schema: - type: string - - name: include_content - in: query - description: When true, include decrypted span content. - required: false - schema: - type: boolean - default: false + $ref: '#/components/schemas/PipelineKey' responses: '200': - description: The requested span. + description: The requested pipeline. content: application/json: schema: - $ref: '#/components/schemas/AgentTraceSpan' + $ref: '#/components/schemas/Pipeline' '403': - description: Permissions do not allow accessing this span. + description: Permissions do not allow accessing this pipeline. content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: Trace or span not found. + description: Pipeline not found. content: application/json: schema: $ref: '#/components/schemas/NotFoundError' - x-fern-sdk-group-name: agent_analytics - x-fern-sdk-method-name: get_trace_span - /v2/glossaries: - post: + x-fern-sdk-group-name: pipelines + x-fern-sdk-method-name: get + put: tags: - - Glossaries - summary: Create glossary + - Pipelines + summary: Replace pipeline x-required-roles: - type: ApiRole roles: - - agent_administrator + - pipeline_administrator - administrator - owner - description: Create a new glossary. A glossary is a reusable mapping of terms - to expanded forms that agents use to expand abbreviations and acronyms in - user messages. - operationId: createGlossary + description: Replace a pipeline's configuration. The full pipeline definition + must be provided. + operationId: replacePipeline parameters: - $ref: '#/components/parameters/RequestTimeout' - $ref: '#/components/parameters/RequestTimeoutMillis' + - in: path + name: pipeline_key + description: The unique key of the pipeline to replace. + required: true + schema: + $ref: '#/components/schemas/PipelineKey' requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/CreateGlossaryRequest' + $ref: '#/components/schemas/CreatePipelineRequest' responses: - '201': - description: The glossary was created successfully. + '200': + description: The pipeline has been replaced successfully. content: application/json: schema: - $ref: '#/components/schemas/Glossary' + $ref: '#/components/schemas/Pipeline' '400': - description: The request was malformed. + description: Pipeline replace request was malformed or contains invalid + configuration. content: application/json: schema: $ref: '#/components/schemas/BadRequestError' '403': - description: Permissions do not allow creating glossaries. + description: Permissions do not allow replacing this pipeline. content: application/json: schema: $ref: '#/components/schemas/Error' - x-fern-sdk-group-name: glossaries - x-fern-sdk-method-name: create - get: + '404': + description: Pipeline not found. + content: + application/json: + schema: + $ref: '#/components/schemas/NotFoundError' + x-fern-sdk-group-name: pipelines + x-fern-sdk-method-name: replace + patch: tags: - - Glossaries - summary: List glossaries + - Pipelines + summary: Update pipeline x-required-roles: - type: ApiRole roles: - - agent_viewer - - agent_developer - - agent_administrator - - viewer + - pipeline_administrator - administrator - owner - description: List all glossaries available to the authenticated user. - operationId: listGlossaries + description: Partially update a pipeline's configuration. Omitted fields are + preserved. + operationId: updatePipeline parameters: - $ref: '#/components/parameters/RequestTimeout' - $ref: '#/components/parameters/RequestTimeoutMillis' - - in: query - name: filter - description: A case-insensitive substring to filter glossary names and descriptions. - required: false - schema: - type: string - example: engineering - - in: query - name: limit - description: The maximum number of glossaries to return. - required: false - schema: - type: integer - format: int32 - minimum: 1 - maximum: 100 - default: 10 - - name: page_key - in: query - description: Used to retrieve the next page of glossaries. - required: false + - in: path + name: pipeline_key + description: The unique key of the pipeline to update. + required: true schema: - type: string + $ref: '#/components/schemas/PipelineKey' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UpdatePipelineRequest' responses: '200': - description: List of glossaries. + description: The pipeline has been updated successfully. content: application/json: schema: - $ref: '#/components/schemas/ListGlossariesResponse' + $ref: '#/components/schemas/Pipeline' + '400': + description: Pipeline update request was malformed or contains invalid configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequestError' '403': - description: Permissions do not allow listing glossaries. + description: Permissions do not allow updating this pipeline. content: application/json: schema: $ref: '#/components/schemas/Error' - x-fern-sdk-group-name: glossaries - x-fern-sdk-method-name: list - x-fern-pagination: - cursor: $request.page_key - next_cursor: $response.metadata.page_key - results: $response.glossaries - /v2/glossaries/{glossary_key}: - get: + '404': + description: Pipeline not found. + content: + application/json: + schema: + $ref: '#/components/schemas/NotFoundError' + x-fern-sdk-group-name: pipelines + x-fern-sdk-method-name: update + delete: tags: - - Glossaries - summary: Get glossary + - Pipelines + summary: Delete pipeline x-required-roles: - type: ApiRole roles: - - agent_viewer - - agent_developer - - agent_administrator - - viewer + - pipeline_administrator - administrator - owner - description: Get the metadata of a specific glossary. - operationId: getGlossary + description: Permanently delete a pipeline and its run history. This cancels + any in-progress runs. Agent sessions created by this pipeline are not deleted. + operationId: deletePipeline parameters: - $ref: '#/components/parameters/RequestTimeout' - $ref: '#/components/parameters/RequestTimeoutMillis' - in: path - name: glossary_key - description: The unique key of the glossary. + name: pipeline_key + description: The unique key of the pipeline to delete. required: true schema: - $ref: '#/components/schemas/GlossaryKey' + $ref: '#/components/schemas/PipelineKey' responses: - '200': - description: The glossary metadata. - content: - application/json: - schema: - $ref: '#/components/schemas/Glossary' + '204': + description: The pipeline has been deleted successfully. '403': - description: Permissions do not allow accessing this glossary. + description: Permissions do not allow deleting this pipeline. content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: Glossary not found. + description: Pipeline not found. content: application/json: schema: $ref: '#/components/schemas/NotFoundError' - x-fern-sdk-group-name: glossaries - x-fern-sdk-method-name: get - patch: + x-fern-sdk-group-name: pipelines + x-fern-sdk-method-name: delete + /v2/pipelines/{pipeline_key}/trigger: + post: tags: - - Glossaries - summary: Update glossary + - Pipelines + summary: Trigger pipeline x-required-roles: - type: ApiRole roles: - - agent_developer - - agent_administrator + - pipeline_administrator - administrator - owner - description: Update the metadata of a glossary. - operationId: updateGlossary + description: Manually trigger a pipeline run outside of the normal schedule. + The pipeline will fetch new data from the source and process it through the + agent. Returns the created run. + operationId: triggerPipeline parameters: - $ref: '#/components/parameters/RequestTimeout' - $ref: '#/components/parameters/RequestTimeoutMillis' - in: path - name: glossary_key - description: The unique key of the glossary to update. + name: pipeline_key + description: The unique key of the pipeline to trigger. required: true schema: - $ref: '#/components/schemas/GlossaryKey' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/UpdateGlossaryRequest' + $ref: '#/components/schemas/PipelineKey' responses: - '200': - description: The glossary was updated successfully. - content: - application/json: - schema: - $ref: '#/components/schemas/Glossary' - '400': - description: The request was malformed. + '201': + description: The pipeline run has been created. content: application/json: schema: - $ref: '#/components/schemas/BadRequestError' + $ref: '#/components/schemas/PipelineRun' '403': - description: Permissions do not allow updating this glossary. + description: Permissions do not allow triggering this pipeline. content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: Glossary not found. + description: Pipeline not found. content: application/json: schema: $ref: '#/components/schemas/NotFoundError' - x-fern-sdk-group-name: glossaries - x-fern-sdk-method-name: update - delete: + '409': + description: A run is already in progress for this pipeline. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + x-fern-sdk-group-name: pipelines + x-fern-sdk-method-name: trigger + /v2/pipelines/{pipeline_key}/dead_letters: + get: tags: - - Glossaries - summary: Delete glossary + - Pipeline Dead Letters + summary: List dead letters x-required-roles: - type: ApiRole roles: - - agent_administrator + - pipeline_viewer + - pipeline_administrator + - viewer - administrator - owner - description: Delete a glossary and all its entries. - operationId: deleteGlossary + description: List dead letters for a pipeline, with optional filtering by status + or run. + operationId: listPipelineDeadLetterEntries parameters: - $ref: '#/components/parameters/RequestTimeout' - $ref: '#/components/parameters/RequestTimeoutMillis' - in: path - name: glossary_key - description: The unique key of the glossary to delete. + name: pipeline_key + description: The unique key of the pipeline. required: true schema: - $ref: '#/components/schemas/GlossaryKey' + $ref: '#/components/schemas/PipelineKey' + - in: query + name: status + description: Filter dead letters by status. + required: false + schema: + $ref: '#/components/schemas/DeadLetterStatus' + - in: query + name: last_run_id + description: Filter dead letters to those from a specific run. + required: false + schema: + $ref: '#/components/schemas/PipelineRunId' + - in: query + name: origin + description: Filter dead letters by origin. + required: false + schema: + $ref: '#/components/schemas/DeadLetterOrigin' + - in: query + name: filter + description: A regex filter on the source record ID. Supports partial matching. + required: false + schema: + type: string + - in: query + name: limit + description: The maximum number of dead letters to return. + required: false + schema: + type: integer + format: int32 + minimum: 1 + maximum: 100 + default: 10 + - in: query + name: page_key + description: Used to retrieve the next page of dead letters after the limit + has been reached. + required: false + schema: + type: string responses: - '204': - description: The glossary was deleted successfully. + '200': + description: List of dead letters. + content: + application/json: + schema: + $ref: '#/components/schemas/ListPipelineDeadLetterEntriesResponse' '403': - description: Permissions do not allow deleting this glossary. + description: Permissions do not allow listing dead letters for this pipeline. content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: Glossary not found. + description: Pipeline not found. content: application/json: schema: $ref: '#/components/schemas/NotFoundError' - x-fern-sdk-group-name: glossaries - x-fern-sdk-method-name: delete - /v2/glossaries/{glossary_key}/entries: + x-fern-sdk-group-name: pipeline_dead_letter_entries + x-fern-sdk-method-name: list + x-fern-pagination: + cursor: $request.page_key + next_cursor: $response.metadata.page_key + results: $response.dead_letters post: tags: - - Glossaries - summary: Upsert glossary entries + - Pipeline Dead Letters + summary: Create dead letter x-required-roles: - type: ApiRole roles: - - agent_developer - - agent_administrator + - pipeline_administrator - administrator - owner - description: Bulk upsert entries into a glossary. Entries with existing terms - are updated and new terms are inserted. The glossary index blob is rebuilt - after the upsert. - operationId: upsertGlossaryEntries + description: Manually add a source record to the dead letter queue for reprocessing. + Use this when you want to force a record through the pipeline again, for example + when the agent or judge made an incorrect decision. + operationId: createPipelineDeadLetterEntry parameters: - $ref: '#/components/parameters/RequestTimeout' - $ref: '#/components/parameters/RequestTimeoutMillis' - in: path - name: glossary_key - description: The unique key of the glossary. + name: pipeline_key + description: The unique key of the pipeline. required: true schema: - $ref: '#/components/schemas/GlossaryKey' + $ref: '#/components/schemas/PipelineKey' requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/UpsertGlossaryEntriesRequest' + $ref: '#/components/schemas/CreatePipelineDeadLetterEntryRequest' responses: - '204': - description: The entries were upserted and the glossary index was rebuilt. + '201': + description: The dead letter has been created successfully. + content: + application/json: + schema: + $ref: '#/components/schemas/PipelineDeadLetterEntry' '400': - description: The request was malformed. + description: Request was malformed. content: application/json: schema: $ref: '#/components/schemas/BadRequestError' '403': - description: Permissions do not allow modifying this glossary. + description: Permissions do not allow creating dead letters for this pipeline. content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: Glossary not found. + description: Pipeline not found. content: application/json: schema: $ref: '#/components/schemas/NotFoundError' - x-fern-sdk-group-name: glossaries - x-fern-sdk-method-name: upsert_entries + '409': + description: A dead letter for this source record already exists and is + being retried. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + x-fern-sdk-group-name: pipeline_dead_letter_entries + x-fern-sdk-method-name: create + /v2/pipelines/{pipeline_key}/dead_letters/{dead_letter_id}: get: tags: - - Glossaries - summary: List glossary entries + - Pipeline Dead Letters + summary: Get dead letter x-required-roles: - type: ApiRole roles: - - agent_viewer - - agent_developer - - agent_administrator + - pipeline_viewer + - pipeline_administrator - viewer - administrator - owner - description: List the entries in a glossary. - operationId: listGlossaryEntries + description: Retrieve a specific dead letter by its ID. + operationId: getPipelineDeadLetterEntry parameters: - $ref: '#/components/parameters/RequestTimeout' - $ref: '#/components/parameters/RequestTimeoutMillis' - in: path - name: glossary_key - description: The unique key of the glossary. + name: pipeline_key + description: The unique key of the pipeline. required: true schema: - $ref: '#/components/schemas/GlossaryKey' - - in: query - name: limit - description: The maximum number of entries to return. - required: false - schema: - type: integer - format: int32 - minimum: 1 - maximum: 1000 - default: 100 - - name: page_key - in: query - description: Used to retrieve the next page of entries. - required: false + $ref: '#/components/schemas/PipelineKey' + - in: path + name: dead_letter_id + description: The unique identifier of the dead letter. + required: true schema: type: string responses: '200': - description: List of glossary entries. + description: The requested dead letter. content: application/json: schema: - $ref: '#/components/schemas/GlossaryEntriesResponse' + $ref: '#/components/schemas/PipelineDeadLetterEntry' '403': - description: Permissions do not allow accessing this glossary. + description: Permissions do not allow accessing this dead letter. content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: Glossary not found. + description: Pipeline or dead letter not found. content: application/json: schema: $ref: '#/components/schemas/NotFoundError' - x-fern-sdk-group-name: glossaries - x-fern-sdk-method-name: list_entries - x-fern-pagination: - cursor: $request.page_key - next_cursor: $response.metadata.page_key - results: $response.entries + x-fern-sdk-group-name: pipeline_dead_letter_entries + x-fern-sdk-method-name: get delete: tags: - - Glossaries - summary: Delete glossary entries + - Pipeline Dead Letters + summary: Delete dead letter x-required-roles: - type: ApiRole roles: - - agent_developer - - agent_administrator + - pipeline_administrator - administrator - owner - description: Bulk delete entries from a glossary by term. The glossary index - blob is rebuilt after deletion. - operationId: deleteGlossaryEntries + description: Remove a dead letter from the queue. Use this to dismiss a known + failure that does not need retrying. + operationId: deletePipelineDeadLetterEntry parameters: - $ref: '#/components/parameters/RequestTimeout' - $ref: '#/components/parameters/RequestTimeoutMillis' - in: path - name: glossary_key - description: The unique key of the glossary. + name: pipeline_key + description: The unique key of the pipeline. required: true schema: - $ref: '#/components/schemas/GlossaryKey' - requestBody: + $ref: '#/components/schemas/PipelineKey' + - in: path + name: dead_letter_id + description: The unique identifier of the dead letter. + required: true + schema: + type: string + responses: + '204': + description: The dead letter has been deleted successfully. + '403': + description: Permissions do not allow deleting this dead letter. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Pipeline or dead letter not found. + content: + application/json: + schema: + $ref: '#/components/schemas/NotFoundError' + x-fern-sdk-group-name: pipeline_dead_letter_entries + x-fern-sdk-method-name: delete + /v2/pipelines/{pipeline_key}/dead_letters/process: + post: + tags: + - Pipeline Dead Letters + summary: Process dead letters + x-required-roles: + - type: ApiRole + roles: + - pipeline_administrator + - administrator + - owner + description: Process dead letters by creating a new pipeline run that re-fetches + the specified records from source and sends them through the agent. If no + filters are provided, all pending dead letters are processed. + operationId: processPipelineDeadLetterEntries + parameters: + - $ref: '#/components/parameters/RequestTimeout' + - $ref: '#/components/parameters/RequestTimeoutMillis' + - in: path + name: pipeline_key + description: The unique key of the pipeline. required: true + schema: + $ref: '#/components/schemas/PipelineKey' + requestBody: + required: false content: application/json: schema: - $ref: '#/components/schemas/DeleteGlossaryEntriesRequest' + $ref: '#/components/schemas/ProcessPipelineDeadLetterEntriesRequest' responses: - '204': - description: The entries were deleted and the glossary index was rebuilt. + '201': + description: The retry run has been created. + content: + application/json: + schema: + $ref: '#/components/schemas/PipelineRun' + '400': + description: Request was malformed. + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequestError' '403': - description: Permissions do not allow modifying this glossary. + description: Permissions do not allow processing dead letters for this pipeline. content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: Glossary not found. + description: Pipeline not found. content: application/json: schema: $ref: '#/components/schemas/NotFoundError' - x-fern-sdk-group-name: glossaries - x-fern-sdk-method-name: delete_entries -components: - parameters: - RequestTimeout: - in: header - name: Request-Timeout - description: The API will make a best effort to complete the request in the - specified seconds or time out. - schema: - type: integer - minimum: 1 - required: false - RequestTimeoutMillis: - in: header - name: Request-Timeout-Millis - description: The API will make a best effort to complete the request in the - specified milliseconds or time out. - schema: - type: integer - minimum: 1 - securitySchemes: - OAuth2: - type: oauth2 - description: OAuth2 access to Vectara - flows: - clientCredentials: - tokenUrl: https://auth.vectara.io/oauth2/token - scopes: {} - ApiKeyAuth: - type: apiKey - in: header - name: x-api-key - schemas: - CorpusKey: - description: A user-provided key for a corpus. - type: string - example: my-corpus - pattern: '[a-zA-Z0-9_\=\-]+$' - maxLength: 50 - FilterAttribute: - description: Defines a filter attribute that can be used to filter search results - based on document metadata for precise retrieval. - type: object - properties: - name: - description: The JSON path of the filter attribute in a document or document - part metadata. - type: string - example: Title - level: - description: Indicates whether this is a document or document part metadata - filter. - type: string - enum: - - document - - part - example: document - description: - description: Description of the filter. May be omitted. + '409': + description: A run is already in progress for this pipeline. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + x-fern-sdk-group-name: pipeline_dead_letter_entries + x-fern-sdk-method-name: process + /v2/pipelines/{pipeline_key}/runs: + get: + tags: + - Pipeline Runs + summary: List pipeline runs + x-required-roles: + - type: ApiRole + roles: + - pipeline_viewer + - pipeline_administrator + - viewer + - administrator + - owner + description: List execution runs for a pipeline, with optional filtering by + status. + operationId: listPipelineRuns + parameters: + - $ref: '#/components/parameters/RequestTimeout' + - $ref: '#/components/parameters/RequestTimeoutMillis' + - in: path + name: pipeline_key + description: The unique key of the pipeline. + required: true + schema: + $ref: '#/components/schemas/PipelineKey' + - in: query + name: status + description: Filter runs by status. + required: false + schema: + $ref: '#/components/schemas/PipelineRunStatus' + - in: query + name: after + description: Only return runs created after this timestamp. + required: false + schema: type: string - example: The title of the document. - indexed: - description: Indicates whether an index should be created for the filter. - Creating an index will improve query latency when using the filter. - type: boolean - default: true - type: - description: The value type of the filter. + format: date-time + - in: query + name: limit + description: The maximum number of runs to return. + required: false + schema: + type: integer + format: int32 + minimum: 1 + maximum: 100 + default: 10 + - in: query + name: page_key + description: Used to retrieve the next page of runs after the limit has been + reached. + required: false + schema: type: string - enum: - - integer - - real_number - - text - - boolean - - list[integer] - - list[real_number] - - list[text] - example: text - required: - - name - - level - - type - CorpusCustomDimension: - type: object - description: Custom dimensions attached to all document parts in a corpus. Allows - arbitrary modification of the score for many purposes. - properties: - name: - description: The name of the custom dimension. + responses: + '200': + description: List of pipeline runs. + content: + application/json: + schema: + $ref: '#/components/schemas/ListPipelineRunsResponse' + '403': + description: Permissions do not allow listing runs for this pipeline. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Pipeline not found. + content: + application/json: + schema: + $ref: '#/components/schemas/NotFoundError' + x-fern-sdk-group-name: pipeline_runs + x-fern-sdk-method-name: list + x-fern-pagination: + cursor: $request.page_key + next_cursor: $response.metadata.page_key + results: $response.runs + /v2/pipelines/{pipeline_key}/runs/{run_id}: + get: + tags: + - Pipeline Runs + summary: Get pipeline run + x-required-roles: + - type: ApiRole + roles: + - pipeline_viewer + - pipeline_administrator + - viewer + - administrator + - owner + description: Retrieve details of a specific pipeline run including record counts, + session keys, and status. + operationId: getPipelineRun + parameters: + - $ref: '#/components/parameters/RequestTimeout' + - $ref: '#/components/parameters/RequestTimeoutMillis' + - in: path + name: pipeline_key + description: The unique key of the pipeline. + required: true + schema: + $ref: '#/components/schemas/PipelineKey' + - in: path + name: run_id + description: The unique identifier of the run. + required: true + schema: + $ref: '#/components/schemas/PipelineRunId' + responses: + '200': + description: The requested pipeline run. + content: + application/json: + schema: + $ref: '#/components/schemas/PipelineRun' + '403': + description: Permissions do not allow accessing this run. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Pipeline or run not found. + content: + application/json: + schema: + $ref: '#/components/schemas/NotFoundError' + x-fern-sdk-group-name: pipeline_runs + x-fern-sdk-method-name: get + /v2/pipelines/{pipeline_key}/runs/{run_id}/cancel: + post: + tags: + - Pipeline Runs + summary: Cancel pipeline run + x-required-roles: + - type: ApiRole + roles: + - pipeline_administrator + - administrator + - owner + description: Request cancellation of an in-progress pipeline run. The run is + asked to stop at the next checkpoint; it may take a moment to transition to + the cancelled state. Runs that have already completed, failed, or been cancelled + cannot be cancelled again. + operationId: cancelPipelineRun + parameters: + - $ref: '#/components/parameters/RequestTimeout' + - $ref: '#/components/parameters/RequestTimeoutMillis' + - in: path + name: pipeline_key + description: The unique key of the pipeline. + required: true + schema: + $ref: '#/components/schemas/PipelineKey' + - in: path + name: run_id + description: The unique identifier of the run. + required: true + schema: + $ref: '#/components/schemas/PipelineRunId' + responses: + '204': + description: Cancellation has been requested. + '403': + description: Permissions do not allow cancelling this run. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Pipeline or run not found. + content: + application/json: + schema: + $ref: '#/components/schemas/NotFoundError' + '409': + description: The run is not in a cancellable state. It has already completed, + failed, or had cancellation requested. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + x-fern-sdk-group-name: pipeline_runs + x-fern-sdk-method-name: cancel + /v2/pipelines/{pipeline_key}/runs/{run_id}/events: + get: + tags: + - Pipeline Runs + summary: List pipeline run events + x-required-roles: + - type: ApiRole + roles: + - pipeline_viewer + - pipeline_administrator + - viewer + - administrator + - owner + description: List the timeline of events for a pipeline run. Events surface + what the run did from a customer-observability perspective (records discovered, + records processed, agent sessions created, dead letters, watermark advances, + lifecycle transitions) rather than every internal Temporal step. A pipeline + run may span multiple underlying Temporal executions; this endpoint stitches + them into a single timeline keyed by `run_id`. + operationId: listPipelineRunEvents + parameters: + - $ref: '#/components/parameters/RequestTimeout' + - $ref: '#/components/parameters/RequestTimeoutMillis' + - in: path + name: pipeline_key + description: The unique key of the pipeline. + required: true + schema: + $ref: '#/components/schemas/PipelineKey' + - in: path + name: run_id + description: The unique identifier of the run. + required: true + schema: + $ref: '#/components/schemas/PipelineRunId' + - in: query + name: type + description: Filter to one or more event types. Repeat the parameter to pass + multiple values. + required: false + explode: true + schema: + type: array + items: + $ref: '#/components/schemas/PipelineRunEventType' + - in: query + name: source_record_id + description: Filter to events for a specific source record. + required: false + schema: + type: string + - in: query + name: order + description: Order events by timestamp. Defaults to newest-first. + required: false + schema: + $ref: '#/components/schemas/SortOrder' + - in: query + name: limit + description: The maximum number of events to return. + required: false + schema: + type: integer + format: int32 + minimum: 1 + maximum: 200 + default: 50 + - in: query + name: page_key + description: Used to retrieve the next page of events after the limit has + been reached. + required: false + schema: + type: string + responses: + '200': + description: List of pipeline run events. + content: + application/json: + schema: + $ref: '#/components/schemas/ListPipelineRunEventsResponse' + '403': + description: Permissions do not allow accessing this run. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Pipeline or run not found. + content: + application/json: + schema: + $ref: '#/components/schemas/NotFoundError' + x-fern-sdk-group-name: pipeline_runs + x-fern-sdk-method-name: list_events + x-fern-pagination: + cursor: $request.page_key + next_cursor: $response.metadata.page_key + results: $response.events + /v2/metrics: + get: + tags: + - CustomerMetrics + summary: List available metrics + x-required-roles: + - type: ApiRole + roles: + - viewer + - administrator + - owner + description: Returns the catalog of registered metrics that can be queried via + `/v2/metrics/{metric_name}`. Use this to discover metric names, kinds, and + supported labels. + operationId: listMetrics + x-fern-sdk-group-name: customer_metrics + x-fern-sdk-method-name: list + 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. + content: + application/json: + schema: + $ref: '#/components/schemas/ListMetricsResponse' + /v2/metrics/{metric_name}: + get: + tags: + - CustomerMetrics + summary: Query a metric time series + x-required-roles: + - type: ApiRole + roles: + - viewer + - administrator + - owner + description: Returns a time series of aggregated metric values for the named + metric within the requested time range. + operationId: getMetric + x-fern-sdk-group-name: customer_metrics + x-fern-sdk-method-name: get + parameters: + - $ref: '#/components/parameters/RequestTimeout' + - $ref: '#/components/parameters/RequestTimeoutMillis' + - name: metric_name + in: path + required: true + description: Name of the metric to query (see `/v2/metrics` for the catalog). + schema: + type: string + - name: labels + in: query + required: false + description: Label filters keyed by label name. The set of valid label names + for each metric is published in its descriptor at `/v2/metrics`. + style: deepObject + explode: true + schema: + type: object + additionalProperties: + type: array + minItems: 1 + items: + type: string + minLength: 1 + - name: start + in: query + required: true + description: Inclusive start of the query window (ISO 8601). Must be no more + than 30 days before now. + schema: + type: string + format: date-time + - name: end + in: query + required: true + description: Exclusive end of the query window (ISO 8601). Must be after `start`. + schema: + type: string + format: date-time + - 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 time-bin + size is reported in the response as `bin_size_seconds`. Defaults to 60. + schema: + type: integer + format: int32 + minimum: 1 + maximum: 1000 + default: 60 + responses: + '200': + description: The requested metric series. + content: + application/json: + schema: + $ref: '#/components/schemas/MetricSeries' + '400': + description: Invalid request parameters. + '404': + description: The named metric is not registered. + /v2/agent_analytics/traces: + get: + tags: + - Agent Analytics + summary: List agent traces + x-required-roles: + - type: AgentRole + roles: + - agent_viewer + - agent_developer + - agent_administrator + - type: ApiRole + roles: + - agent_viewer + - agent_developer + - agent_administrator + - viewer + - administrator + - owner + description: List agent traces with optional filtering by agent, session, status, + and time range. + operationId: listTraces + parameters: + - $ref: '#/components/parameters/RequestTimeout' + - $ref: '#/components/parameters/RequestTimeoutMillis' + - name: agent_key + in: query + description: Filter traces by agent key. + required: false + schema: + type: string + - name: session_key + in: query + description: Filter traces by session key. + required: false + schema: + type: string + - name: status + in: query + description: Filter traces by status. + required: false + schema: + type: string + enum: + - ok + - error + - name: error_type + in: query + description: Filter to traces containing a span with this exact error type. + required: false + schema: + type: string + enum: + - context_limit_exceeded + - step_transition_limit_exceeded + - actions_limit_reached + - llm_generation_error + - stream_error + - internal + - name: operation + in: query + description: Filter to traces containing at least one span with this operation. + required: false + schema: + type: string + enum: + - invoke_agent + - chat + - execute_tool + - thinking + - output + - guardrail + - step_transition + - image_read + - compaction + - name: tool_name + in: query + description: Filter to traces containing a tool execution span with this exact + tool name. + required: false + schema: + type: string + - name: tool_error_type + in: query + description: Filter to traces containing a tool span with this exact error + type. + required: false + schema: + type: string + enum: + - invalid_input + - not_found + - invalid_configuration + - timeout + - execution_error + - dependency_failed + - name: started_after + in: query + description: Return only traces started after this time (ISO 8601). + required: false + schema: + type: string + format: date-time + - name: started_before + in: query + description: Return only traces started before this time (ISO 8601). + required: false + schema: + type: string + format: date-time + - name: min_duration_ms + in: query + description: Return only traces with duration at or above this threshold in + milliseconds. + required: false + schema: + type: integer + format: int64 + - name: max_duration_ms + in: query + description: Return only traces with duration at or below this threshold in + milliseconds. + required: false + schema: + type: integer + format: int64 + - name: limit + in: query + description: The maximum number of traces to return. + required: false + schema: + type: integer + format: int32 + minimum: 1 + maximum: 100 + default: 10 + - name: page_key + in: query + description: Used to retrieve the next page of results. + required: false + schema: + type: string + responses: + '200': + description: List of agent traces. + content: + application/json: + schema: + $ref: '#/components/schemas/ListAgentTracesResponse' + '403': + description: Permissions do not allow listing traces. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + x-fern-sdk-group-name: agent_analytics + x-fern-sdk-method-name: list_traces + x-fern-pagination: + cursor: $request.page_key + next_cursor: $response.metadata.page_key + results: $response.traces + /v2/agent_analytics/traces/{trace_id}: + get: + tags: + - Agent Analytics + summary: Get agent trace + x-required-roles: + - type: AgentRole + roles: + - agent_viewer + - agent_developer + - agent_administrator + - type: ApiRole + roles: + - agent_viewer + - agent_developer + - agent_administrator + - viewer + - administrator + - owner + description: Retrieve the summary of a specific agent trace by its trace ID. + operationId: getTrace + parameters: + - $ref: '#/components/parameters/RequestTimeout' + - $ref: '#/components/parameters/RequestTimeoutMillis' + - in: path + name: trace_id + description: The unique identifier of the trace. + required: true + schema: + type: string + example: 0af7651916cd43dd8448eb211c80319c + responses: + '200': + description: The requested agent trace. + content: + application/json: + schema: + $ref: '#/components/schemas/AgentTrace' + '403': + description: Permissions do not allow accessing this trace. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Trace not found. + content: + application/json: + schema: + $ref: '#/components/schemas/NotFoundError' + x-fern-sdk-group-name: agent_analytics + x-fern-sdk-method-name: get_trace + /v2/agent_analytics/traces/{trace_id}/spans: + get: + tags: + - Agent Analytics + summary: List spans in a trace + x-required-roles: + - type: AgentRole + roles: + - agent_viewer + - agent_developer + - agent_administrator + - type: ApiRole + roles: + - agent_viewer + - agent_developer + - agent_administrator + - viewer + - administrator + - owner + description: Retrieve the flat list of spans for a given trace, each with its + parent_span_id for reconstructing the tree. + operationId: listTraceSpans + parameters: + - $ref: '#/components/parameters/RequestTimeout' + - $ref: '#/components/parameters/RequestTimeoutMillis' + - in: path + name: trace_id + description: The unique identifier of the trace. + required: true + schema: + type: string + - name: include_content + in: query + description: When true, include decrypted span content such as input/output + messages and tool arguments. + required: false + schema: + type: boolean + default: false + - name: operation + in: query + description: Restrict to spans with this operation. + required: false + schema: + type: string + enum: + - invoke_agent + - chat + - execute_tool + - thinking + - output + - guardrail + - step_transition + - image_read + - compaction + - name: parent_span_id + in: query + description: Filter spans to only direct children of this span ID. + required: false + schema: + type: string + - name: exclude_subagents + in: query + description: When true, exclude nested sub-agent invocations and their descendants. + Restricts results to the entry-point invoke_agent span and any spans that + belong to the entry agent's session. + required: false + schema: + type: boolean + default: false + - name: limit + in: query + description: The maximum number of spans to return. + required: false + schema: + type: integer + format: int32 + minimum: 1 + maximum: 500 + default: 100 + - name: page_key + in: query + description: Used to retrieve the next page of results. + required: false + schema: + type: string + responses: + '200': + description: List of spans in the trace. + content: + application/json: + schema: + $ref: '#/components/schemas/ListAgentTraceSpansResponse' + '403': + description: Permissions do not allow accessing this trace. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Trace not found. + content: + application/json: + schema: + $ref: '#/components/schemas/NotFoundError' + x-fern-sdk-group-name: agent_analytics + x-fern-sdk-method-name: list_trace_spans + x-fern-pagination: + cursor: $request.page_key + next_cursor: $response.metadata.page_key + results: $response.spans + /v2/agent_analytics/traces/{trace_id}/spans/{span_id}: + get: + tags: + - Agent Analytics + summary: Get span in a trace + x-required-roles: + - type: AgentRole + roles: + - agent_viewer + - agent_developer + - agent_administrator + - type: ApiRole + roles: + - agent_viewer + - agent_developer + - agent_administrator + - viewer + - administrator + - owner + description: Retrieve the details of a specific span within a trace. + operationId: getTraceSpan + parameters: + - $ref: '#/components/parameters/RequestTimeout' + - $ref: '#/components/parameters/RequestTimeoutMillis' + - in: path + name: trace_id + description: The unique identifier of the trace. + required: true + schema: + type: string + - in: path + name: span_id + description: The unique identifier of the span. + required: true + schema: + type: string + - name: include_content + in: query + description: When true, include decrypted span content. + required: false + schema: + type: boolean + default: false + responses: + '200': + description: The requested span. + content: + application/json: + schema: + $ref: '#/components/schemas/AgentTraceSpan' + '403': + description: Permissions do not allow accessing this span. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Trace or span not found. + content: + application/json: + schema: + $ref: '#/components/schemas/NotFoundError' + x-fern-sdk-group-name: agent_analytics + x-fern-sdk-method-name: get_trace_span + /v2/glossaries: + post: + tags: + - Glossaries + summary: Create glossary + x-required-roles: + - type: ApiRole + roles: + - agent_administrator + - administrator + - owner + description: Create a new glossary. A glossary is a reusable mapping of terms + to expanded forms that agents use to expand abbreviations and acronyms in + user messages. + operationId: createGlossary + parameters: + - $ref: '#/components/parameters/RequestTimeout' + - $ref: '#/components/parameters/RequestTimeoutMillis' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CreateGlossaryRequest' + responses: + '201': + description: The glossary was created successfully. + content: + application/json: + schema: + $ref: '#/components/schemas/Glossary' + '400': + description: The request was malformed. + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequestError' + '403': + description: Permissions do not allow creating glossaries. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + x-fern-sdk-group-name: glossaries + x-fern-sdk-method-name: create + get: + tags: + - Glossaries + summary: List glossaries + x-required-roles: + - type: ApiRole + roles: + - agent_viewer + - agent_developer + - agent_administrator + - viewer + - administrator + - owner + description: List all glossaries available to the authenticated user. + operationId: listGlossaries + parameters: + - $ref: '#/components/parameters/RequestTimeout' + - $ref: '#/components/parameters/RequestTimeoutMillis' + - in: query + name: filter + description: A case-insensitive substring to filter glossary names and descriptions. + required: false + schema: + type: string + example: engineering + - in: query + name: limit + description: The maximum number of glossaries to return. + required: false + schema: + type: integer + format: int32 + minimum: 1 + maximum: 100 + default: 10 + - name: page_key + in: query + description: Used to retrieve the next page of glossaries. + required: false + schema: + type: string + responses: + '200': + description: List of glossaries. + content: + application/json: + schema: + $ref: '#/components/schemas/ListGlossariesResponse' + '403': + description: Permissions do not allow listing glossaries. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + x-fern-sdk-group-name: glossaries + x-fern-sdk-method-name: list + x-fern-pagination: + cursor: $request.page_key + next_cursor: $response.metadata.page_key + results: $response.glossaries + /v2/glossaries/{glossary_key}: + get: + tags: + - Glossaries + summary: Get glossary + x-required-roles: + - type: ApiRole + roles: + - agent_viewer + - agent_developer + - agent_administrator + - viewer + - administrator + - owner + description: Get the metadata of a specific glossary. + operationId: getGlossary + parameters: + - $ref: '#/components/parameters/RequestTimeout' + - $ref: '#/components/parameters/RequestTimeoutMillis' + - in: path + name: glossary_key + description: The unique key of the glossary. + required: true + schema: + $ref: '#/components/schemas/GlossaryKey' + responses: + '200': + description: The glossary metadata. + content: + application/json: + schema: + $ref: '#/components/schemas/Glossary' + '403': + description: Permissions do not allow accessing this glossary. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Glossary not found. + content: + application/json: + schema: + $ref: '#/components/schemas/NotFoundError' + x-fern-sdk-group-name: glossaries + x-fern-sdk-method-name: get + patch: + tags: + - Glossaries + summary: Update glossary + x-required-roles: + - type: ApiRole + roles: + - agent_developer + - agent_administrator + - administrator + - owner + description: Update the metadata of a glossary. + operationId: updateGlossary + parameters: + - $ref: '#/components/parameters/RequestTimeout' + - $ref: '#/components/parameters/RequestTimeoutMillis' + - in: path + name: glossary_key + description: The unique key of the glossary to update. + required: true + schema: + $ref: '#/components/schemas/GlossaryKey' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateGlossaryRequest' + responses: + '200': + description: The glossary was updated successfully. + content: + application/json: + schema: + $ref: '#/components/schemas/Glossary' + '400': + description: The request was malformed. + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequestError' + '403': + description: Permissions do not allow updating this glossary. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Glossary not found. + content: + application/json: + schema: + $ref: '#/components/schemas/NotFoundError' + x-fern-sdk-group-name: glossaries + x-fern-sdk-method-name: update + delete: + tags: + - Glossaries + summary: Delete glossary + x-required-roles: + - type: ApiRole + roles: + - agent_administrator + - administrator + - owner + description: Delete a glossary and all its entries. + operationId: deleteGlossary + parameters: + - $ref: '#/components/parameters/RequestTimeout' + - $ref: '#/components/parameters/RequestTimeoutMillis' + - in: path + name: glossary_key + description: The unique key of the glossary to delete. + required: true + schema: + $ref: '#/components/schemas/GlossaryKey' + responses: + '204': + description: The glossary was deleted successfully. + '403': + description: Permissions do not allow deleting this glossary. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Glossary not found. + content: + application/json: + schema: + $ref: '#/components/schemas/NotFoundError' + x-fern-sdk-group-name: glossaries + x-fern-sdk-method-name: delete + /v2/glossaries/{glossary_key}/entries: + post: + tags: + - Glossaries + summary: Upsert glossary entries + x-required-roles: + - type: ApiRole + roles: + - agent_developer + - agent_administrator + - administrator + - owner + description: Bulk upsert entries into a glossary. Entries with existing terms + are updated and new terms are inserted. The glossary index blob is rebuilt + after the upsert. + operationId: upsertGlossaryEntries + parameters: + - $ref: '#/components/parameters/RequestTimeout' + - $ref: '#/components/parameters/RequestTimeoutMillis' + - in: path + name: glossary_key + description: The unique key of the glossary. + required: true + schema: + $ref: '#/components/schemas/GlossaryKey' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UpsertGlossaryEntriesRequest' + responses: + '204': + description: The entries were upserted and the glossary index was rebuilt. + '400': + description: The request was malformed. + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequestError' + '403': + description: Permissions do not allow modifying this glossary. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Glossary not found. + content: + application/json: + schema: + $ref: '#/components/schemas/NotFoundError' + x-fern-sdk-group-name: glossaries + x-fern-sdk-method-name: upsert_entries + get: + tags: + - Glossaries + summary: List glossary entries + x-required-roles: + - type: ApiRole + roles: + - agent_viewer + - agent_developer + - agent_administrator + - viewer + - administrator + - owner + description: List the entries in a glossary. + operationId: listGlossaryEntries + parameters: + - $ref: '#/components/parameters/RequestTimeout' + - $ref: '#/components/parameters/RequestTimeoutMillis' + - in: path + name: glossary_key + description: The unique key of the glossary. + required: true + schema: + $ref: '#/components/schemas/GlossaryKey' + - in: query + name: limit + description: The maximum number of entries to return. + required: false + schema: + type: integer + format: int32 + minimum: 1 + maximum: 1000 + default: 100 + - name: page_key + in: query + description: Used to retrieve the next page of entries. + required: false + schema: + type: string + responses: + '200': + description: List of glossary entries. + content: + application/json: + schema: + $ref: '#/components/schemas/GlossaryEntriesResponse' + '403': + description: Permissions do not allow accessing this glossary. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Glossary not found. + content: + application/json: + schema: + $ref: '#/components/schemas/NotFoundError' + x-fern-sdk-group-name: glossaries + x-fern-sdk-method-name: list_entries + x-fern-pagination: + cursor: $request.page_key + next_cursor: $response.metadata.page_key + results: $response.entries + delete: + tags: + - Glossaries + summary: Delete glossary entries + x-required-roles: + - type: ApiRole + roles: + - agent_developer + - agent_administrator + - administrator + - owner + description: Bulk delete entries from a glossary by term. The glossary index + blob is rebuilt after deletion. + operationId: deleteGlossaryEntries + parameters: + - $ref: '#/components/parameters/RequestTimeout' + - $ref: '#/components/parameters/RequestTimeoutMillis' + - in: path + name: glossary_key + description: The unique key of the glossary. + required: true + schema: + $ref: '#/components/schemas/GlossaryKey' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/DeleteGlossaryEntriesRequest' + responses: + '204': + description: The entries were deleted and the glossary index was rebuilt. + '403': + description: Permissions do not allow modifying this glossary. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Glossary not found. + content: + application/json: + schema: + $ref: '#/components/schemas/NotFoundError' + x-fern-sdk-group-name: glossaries + x-fern-sdk-method-name: delete_entries +components: + parameters: + RequestTimeout: + in: header + name: Request-Timeout + description: The API will make a best effort to complete the request in the + specified seconds or time out. + schema: + type: integer + minimum: 1 + required: false + RequestTimeoutMillis: + in: header + name: Request-Timeout-Millis + description: The API will make a best effort to complete the request in the + specified milliseconds or time out. + schema: + type: integer + minimum: 1 + securitySchemes: + OAuth2: + type: oauth2 + description: OAuth2 access to Vectara + flows: + clientCredentials: + tokenUrl: https://auth.vectara.io/oauth2/token + scopes: {} + ApiKeyAuth: + type: apiKey + in: header + name: x-api-key + schemas: + CorpusKey: + description: A user-provided key for a corpus. + type: string + example: my-corpus + pattern: '[a-zA-Z0-9_\=\-]+$' + maxLength: 50 + FilterAttribute: + description: Defines a filter attribute that can be used to filter search results + based on document metadata for precise retrieval. + type: object + properties: + name: + description: The JSON path of the filter attribute in a document or document + part metadata. + type: string + example: Title + level: + description: Indicates whether this is a document or document part metadata + filter. + type: string + enum: + - document + - part + example: document + description: + description: Description of the filter. May be omitted. + type: string + example: The title of the document. + indexed: + description: Indicates whether an index should be created for the filter. + Creating an index will improve query latency when using the filter. + type: boolean + default: true + type: + description: The value type of the filter. + type: string + enum: + - integer + - real_number + - text + - boolean + - list[integer] + - list[real_number] + - list[text] + example: text + required: + - name + - level + - type + CorpusCustomDimension: + type: object + description: Custom dimensions attached to all document parts in a corpus. Allows + arbitrary modification of the score for many purposes. + properties: + name: + description: The name of the custom dimension. type: string example: importance description: @@ -14198,9 +15313,9 @@ components: title: Social Responsibility text: EuroBank expanded its community outreach programs, supporting over 500 local initiatives and increasing employee volunteer hours by 30%. - metadata: null - section_type: social - priority: medium + metadata: + section_type: social + priority: medium BulkDeleteAsyncResponse: description: Response when async=true. Operation queued, returns immediately (HTTP 202). @@ -15891,133 +17006,397 @@ components: type: object properties: type: - description: This will be `chat_info` when the stream event contains information - about how the chat is stored. + description: This will be `chat_info` when the stream event contains information + about how the chat is stored. + type: string + default: chat_info + chat_id: + description: ID of the chat. + type: string + pattern: cht_.+$ + example: cht_123456789 + turn_id: + description: ID of the turn. + type: string + pattern: trn_.+$ + example: trn_987654321 + x-vectaraParents: + - ChatStreamedResponse + ChatStreamedResponse: + description: An individual event when the response is streamed. + type: object + discriminator: + propertyName: type + mapping: + search_results: '#/components/schemas/StreamSearchResponse' + chat_info: '#/components/schemas/ChatInfoResponse' + generation_chunk: '#/components/schemas/StreamGenerationChunk' + generation_end: '#/components/schemas/StreamGenerationEnd' + generation_info: '#/components/schemas/GenerationInfo' + factual_consistency_score: '#/components/schemas/FactualConsistencyScore' + end: '#/components/schemas/StreamResponseEnd' + error: '#/components/schemas/StreamError' + oneOf: + - $ref: '#/components/schemas/StreamSearchResponse' + - $ref: '#/components/schemas/ChatInfoResponse' + - $ref: '#/components/schemas/StreamGenerationChunk' + - $ref: '#/components/schemas/StreamGenerationEnd' + - $ref: '#/components/schemas/GenerationInfo' + - $ref: '#/components/schemas/FactualConsistencyScore' + - $ref: '#/components/schemas/StreamResponseEnd' + - $ref: '#/components/schemas/StreamError' + Turn: + description: A single message exchange in a chat conversation, representing + one user input and the corresponding response. + type: object + properties: + id: + description: The ID of the turn. + type: string + pattern: trn_.+$ + example: trn_987654321 + chat_id: + description: The ID of the chat the turn resides in. + type: string + pattern: cht_.+$ + example: cht_123456789 + query: + description: The query made to produce this turn. + type: string + maxLength: 5000 + example: How do you turn this widget? + answer: + description: The response to the query. + type: string + example: The widget turns counter clockwise. + enabled: + description: Indicates whether the turn is enabled and shown in future turns + of the chat. + type: boolean + example: true + created_at: + description: Specifies when the turn was created. + type: string + format: date-time + required: + - id + ListChatTurnsResponse: + description: Response containing a list of turns (message exchanges) within + a chat conversation. + type: object + properties: + turns: + description: List of turns. + type: array + items: + $ref: '#/components/schemas/Turn' + UpdateTurnRequest: + description: Request to update a specific turn (message exchange) within a chat + conversation. + type: object + properties: + enabled: + description: Indicates whether to disable a turn. It will disable this turn + and all subsequent turns. Enabling a turn is not implemented. + type: boolean + example: false + LLMCapabilities: + description: Capabilities of a Large Language Model. If not provided when creating + an LLM, capabilities are automatically inferred from the model name and provider + type. Any explicitly provided fields override the inferred defaults. + type: object + properties: + image_support: + description: Whether the model supports image inputs. + type: boolean + context_limit: + description: Maximum context window size in tokens. + type: integer + format: int32 + minimum: 4096 + tool_calling: + description: Whether the model supports tool/function calling. + type: boolean + structured_outputs: + description: Whether the model supports structured output generation. + type: boolean + requires_role_alternation: + description: Whether the model requires strict role alternation in conversations. + When true, consecutive messages of the same role will be grouped together. + type: boolean + LLMOwnership: + description: Indicates whether the LLM is provided by the platform or created + by the customer. Platform LLMs are pre-configured and cannot be modified or + deleted. Customer LLMs are created and managed by the customer. + type: string + enum: + - platform + - customer + example: platform + IdleTimeoutSeconds: + description: "Maximum time in seconds the platform will wait for the model to\ + \ send data before considering the connection stale and terminating it. For\ + \ example, this is used as the SSE idle timeout during streaming \u2014 if\ + \ no new server-sent events arrive within this window the stream is closed\ + \ with an error. If unset, the platform falls back to its default read timeout\ + \ for that provider (typically 60 seconds for OpenAI / Anthropic; provider\ + \ SDK default for Vertex). On update, omit the field to leave the configured\ + \ value unchanged or send an explicit null to clear it." + type: integer + format: int32 + nullable: true + minimum: 1 + maximum: 3600 + example: 300 + BearerAuth: + type: object + description: Bearer token authentication + properties: + type: + description: Must be "bearer" for bearer token auth + type: string + default: bearer + example: bearer + token: + description: The bearer token to use for authentication + type: string + example: abcdef...... + required: + - type + - token + x-vectaraParents: + - RemoteAuth + - AnthropicAuth + HeaderAuth: + type: object + description: Custom header-based authentication + properties: + type: + description: Must be "header" for header-based auth + type: string + default: header + example: header + header: + description: The header name to use (e.g. x-api-key) + type: string + example: x-api-key + value: + description: The header value to use + type: string + example: sk-ant..... + required: + - type + - header + - value + x-vectaraParents: + - RemoteAuth + - AnthropicAuth + OAuthClientCredentialsAuth: + type: object + description: OAuth 2.0 client credentials authentication. The platform acquires + an access token from the token endpoint before connecting to the remote service. + properties: + type: + description: Must be "oauth_client_credentials" for OAuth client credentials + auth. + type: string + default: oauth_client_credentials + example: oauth_client_credentials + client_id: + description: The OAuth2 client ID. + type: string + client_secret: + description: The OAuth2 client secret. + type: string + token_endpoint: + description: The OAuth2 token endpoint URL where the platform will exchange + credentials for an access token. + type: string + format: uri + example: https://auth.example.com/oauth2/token + scopes: + description: OAuth2 scopes to request when acquiring the access token. + type: array + items: + type: string + example: + - read:jira-work + - write:jira-work + required: + - type + - client_id + - client_secret + - token_endpoint + x-vectaraParents: + - RemoteAuth + BedrockStaticIAMAuth: + type: object + description: AWS Bedrock authentication with explicit IAM credentials + properties: + type: + description: Must be "bedrock_static_iam" for static AWS IAM credentials type: string - default: chat_info - chat_id: - description: ID of the chat. + default: bedrock_static_iam + example: bedrock_static_iam + aws_access_key_id: + description: AWS access key ID type: string - pattern: cht_.+$ - example: cht_123456789 - turn_id: - description: ID of the turn. + example: AKIAIOSFODNN7EXAMPLE + aws_secret_access_key: + description: AWS secret access key type: string - pattern: trn_.+$ - example: trn_987654321 + example: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + region: + description: AWS region for Bedrock + type: string + example: us-east-1 + required: + - type + - aws_access_key_id + - aws_secret_access_key + - region x-vectaraParents: - - ChatStreamedResponse - ChatStreamedResponse: - description: An individual event when the response is streamed. - type: object - discriminator: - propertyName: type - mapping: - search_results: '#/components/schemas/StreamSearchResponse' - chat_info: '#/components/schemas/ChatInfoResponse' - generation_chunk: '#/components/schemas/StreamGenerationChunk' - generation_end: '#/components/schemas/StreamGenerationEnd' - generation_info: '#/components/schemas/GenerationInfo' - factual_consistency_score: '#/components/schemas/FactualConsistencyScore' - end: '#/components/schemas/StreamResponseEnd' - error: '#/components/schemas/StreamError' - oneOf: - - $ref: '#/components/schemas/StreamSearchResponse' - - $ref: '#/components/schemas/ChatInfoResponse' - - $ref: '#/components/schemas/StreamGenerationChunk' - - $ref: '#/components/schemas/StreamGenerationEnd' - - $ref: '#/components/schemas/GenerationInfo' - - $ref: '#/components/schemas/FactualConsistencyScore' - - $ref: '#/components/schemas/StreamResponseEnd' - - $ref: '#/components/schemas/StreamError' - Turn: - description: A single message exchange in a chat conversation, representing - one user input and the corresponding response. + - AnthropicAuth + BedrockApiKeyAuth: type: object + description: AWS Bedrock API key authentication properties: - id: - description: The ID of the turn. + type: + description: Must be "bedrock_api_key" for Bedrock API key auth type: string - pattern: trn_.+$ - example: trn_987654321 - chat_id: - description: The ID of the chat the turn resides in. + default: bedrock_api_key + example: bedrock_api_key + api_key: + description: The Bedrock API key type: string - pattern: cht_.+$ - example: cht_123456789 - query: - description: The query made to produce this turn. + example: AWS_BEARER_TOKEN_BEDROCK_... + region: + description: AWS region for Bedrock type: string - maxLength: 5000 - example: How do you turn this widget? - answer: - description: The response to the query. + example: us-east-1 + required: + - type + - api_key + - region + x-vectaraParents: + - AnthropicAuth + VertexServiceAccountAuth: + type: object + description: Google Cloud Vertex AI service account authentication + properties: + type: + description: Must be "vertex_service_account" for service account auth type: string - example: The widget turns counter clockwise. - enabled: - description: Indicates whether the turn is enabled and shown in future turns - of the chat. - type: boolean - example: true - created_at: - description: Specifies when the turn was created. + default: vertex_service_account + example: vertex_service_account + key_json: + description: The service account key JSON type: string - format: date-time + example: '{"type":"service_account","project_id":"my-project",...}' + project: + description: GCP project ID + type: string + example: my-project-id + region: + description: GCP region for Vertex AI + type: string + example: us-central1 required: - - id - ListChatTurnsResponse: - description: Response containing a list of turns (message exchanges) within - a chat conversation. + - type + - key_json + - project + - region + x-vectaraParents: + - AnthropicAuth + VertexAccessTokenAuth: type: object + description: Google Cloud Vertex AI access token authentication properties: - turns: - description: List of turns. - type: array - items: - $ref: '#/components/schemas/Turn' - UpdateTurnRequest: - description: Request to update a specific turn (message exchange) within a chat - conversation. + type: + description: Must be "vertex_access_token" for access token auth + type: string + default: vertex_access_token + example: vertex_access_token + access_token: + description: The GCP access token + type: string + example: ya29.c.Kp... + project: + description: GCP project ID + type: string + example: my-project-id + region: + description: GCP region for Vertex AI + type: string + example: us-central1 + required: + - type + - access_token + - project + - region + x-vectaraParents: + - AnthropicAuth + VertexAiApiKeyAuth: + description: API key authentication for Vertex AI type: object properties: - enabled: - description: Indicates whether to disable a turn. It will disable this turn - and all subsequent turns. Enabling a turn is not implemented. - type: boolean - example: false - LLMCapabilities: - description: Capabilities of a Large Language Model. If not provided when creating - an LLM, capabilities are automatically inferred from the model name and provider - type. Any explicitly provided fields override the inferred defaults. + type: + description: Must be "api_key" for API key authentication + type: string + default: api_key + api_key: + description: The Google Cloud API key for authentication + type: string + required: + - type + - api_key + x-vectaraParents: + - VertexAiAuth + VertexAiServiceAccountAuth: + description: Service account authentication for Vertex AI type: object properties: - image_support: - description: Whether the model supports image inputs. - type: boolean - context_limit: - description: Maximum context window size in tokens. - type: integer - format: int32 - minimum: 4096 - tool_calling: - description: Whether the model supports tool/function calling. - type: boolean - structured_outputs: - description: Whether the model supports structured output generation. - type: boolean - requires_role_alternation: - description: Whether the model requires strict role alternation in conversations. - When true, consecutive messages of the same role will be grouped together. - type: boolean - LLMOwnership: - description: Indicates whether the LLM is provided by the platform or created - by the customer. Platform LLMs are pre-configured and cannot be modified or - deleted. Customer LLMs are created and managed by the customer. - type: string - enum: - - platform - - customer - example: platform + type: + description: Must be "service_account" for service account authentication + type: string + default: service_account + key_json: + description: The service account JSON key file contents as a string + type: string + required: + - type + - key_json + x-vectaraParents: + - VertexAiAuth + LLMAuth: + description: Authentication configuration for an LLM. Union over every variant + any LLM provider accepts. When returned on `GET`, secret fields contain the + literal string `****`. + type: object + discriminator: + propertyName: type + mapping: + bearer: '#/components/schemas/BearerAuth' + header: '#/components/schemas/HeaderAuth' + oauth_client_credentials: '#/components/schemas/OAuthClientCredentialsAuth' + bedrock_static_iam: '#/components/schemas/BedrockStaticIAMAuth' + bedrock_api_key: '#/components/schemas/BedrockApiKeyAuth' + vertex_service_account: '#/components/schemas/VertexServiceAccountAuth' + vertex_access_token: '#/components/schemas/VertexAccessTokenAuth' + api_key: '#/components/schemas/VertexAiApiKeyAuth' + service_account: '#/components/schemas/VertexAiServiceAccountAuth' + oneOf: + - $ref: '#/components/schemas/BearerAuth' + - $ref: '#/components/schemas/HeaderAuth' + - $ref: '#/components/schemas/OAuthClientCredentialsAuth' + - $ref: '#/components/schemas/BedrockStaticIAMAuth' + - $ref: '#/components/schemas/BedrockApiKeyAuth' + - $ref: '#/components/schemas/VertexServiceAccountAuth' + - $ref: '#/components/schemas/VertexAccessTokenAuth' + - $ref: '#/components/schemas/VertexAiApiKeyAuth' + - $ref: '#/components/schemas/VertexAiServiceAccountAuth' + required: + - type Prompt: description: A prompt that can be used with a LLM. A prompt is the template that is used to render the text sent to the LLM. It also contains various @@ -16076,6 +17455,45 @@ components: description: Indicates whether the LLM is provided by the platform (`platform`) or created by the customer (`customer`). $ref: '#/components/schemas/LLMOwnership' + type: + description: Provider type identifying which authentication and configuration + apply. Required on responses; the server fails closed (HTTP 500) for any + stored LLM whose connection spec it cannot map to one of these values. + type: string + enum: + - openai-compatible + - openai-responses + - vertex-ai + - anthropic + model: + description: Provider-specific model identifier (e.g. `gpt-4o`, `claude-3-5-sonnet-20241022`, + `gemini-2.5-flash`). + type: string + uri: + description: API endpoint URI configured for this LLM. + type: string + format: uri + headers: + description: Additional HTTP headers configured for requests to the LLM + API. Not applicable to `vertex-ai`. + type: object + additionalProperties: + type: string + idle_timeout_seconds: + $ref: '#/components/schemas/IdleTimeoutSeconds' + auth: + description: 'The configured authentication. Returned with secret values + replaced by the literal string `****`; non-secret identifiers (header + names, regions, + + AWS access key IDs, GCP project / region) are preserved so the configured + credential can be recognized without exposing it. To rotate credentials, + + submit a new `auth` object via PATCH; omit `auth` to keep the existing + credentials. + + ' + $ref: '#/components/schemas/LLMAuth' prompts: description: List of prompts that the model can use. This is deprecated; see `/v2/generation_presets` instead. @@ -16085,6 +17503,7 @@ components: required: - id - name + - type ListLLMsResponse: description: Response containing a list of Large Language Models available for generative AI capabilities. @@ -16097,87 +17516,6 @@ components: $ref: '#/components/schemas/LLM' metadata: $ref: '#/components/schemas/ListMetadata' - BearerAuth: - type: object - description: Bearer token authentication - properties: - type: - description: Must be "bearer" for bearer token auth - type: string - default: bearer - example: bearer - token: - description: The bearer token to use for authentication - type: string - example: abcdef...... - required: - - type - - token - x-vectaraParents: - - RemoteAuth - - AnthropicAuth - HeaderAuth: - type: object - description: Custom header-based authentication - properties: - type: - description: Must be "header" for header-based auth - type: string - default: header - example: header - header: - description: The header name to use (e.g. x-api-key) - type: string - example: x-api-key - value: - description: The header value to use - type: string - example: sk-ant..... - required: - - type - - header - - value - x-vectaraParents: - - RemoteAuth - - AnthropicAuth - OAuthClientCredentialsAuth: - type: object - description: OAuth 2.0 client credentials authentication. The platform acquires - an access token from the token endpoint before connecting to the remote service. - properties: - type: - description: Must be "oauth_client_credentials" for OAuth client credentials - auth. - type: string - default: oauth_client_credentials - example: oauth_client_credentials - client_id: - description: The OAuth2 client ID. - type: string - client_secret: - description: The OAuth2 client secret. - type: string - token_endpoint: - description: The OAuth2 token endpoint URL where the platform will exchange - credentials for an access token. - type: string - format: uri - example: https://auth.example.com/oauth2/token - scopes: - description: OAuth2 scopes to request when acquiring the access token. - type: array - items: - type: string - example: - - read:jira-work - - write:jira-work - required: - - type - - client_id - - client_secret - - token_endpoint - x-vectaraParents: - - RemoteAuth RemoteAuth: type: object description: Authentication configuration for connecting to a remote service. @@ -16193,21 +17531,6 @@ components: - $ref: '#/components/schemas/OAuthClientCredentialsAuth' required: - type - IdleTimeoutSeconds: - description: "Maximum time in seconds the platform will wait for the model to\ - \ send data before considering the connection stale and terminating it. For\ - \ example, this is used as the SSE idle timeout during streaming \u2014 if\ - \ no new server-sent events arrive within this window the stream is closed\ - \ with an error. If unset, the platform falls back to its default read timeout\ - \ for that provider (typically 60 seconds for OpenAI / Anthropic; provider\ - \ SDK default for Vertex). On update, omit the field to leave the configured\ - \ value unchanged or send an explicit null to clear it." - type: integer - format: int32 - nullable: true - minimum: 1 - maximum: 3600 - example: 300 OpenAILLMRequestBase: description: Common fields for OpenAI-compatible and Responses API LLM requests. type: object @@ -16306,38 +17629,6 @@ components: - model x-vectaraParents: - CreateLLMRequest - VertexAiApiKeyAuth: - description: API key authentication for Vertex AI - type: object - properties: - type: - description: Must be "api_key" for API key authentication - type: string - default: api_key - api_key: - description: The Google Cloud API key for authentication - type: string - required: - - type - - api_key - x-vectaraParents: - - VertexAiAuth - VertexAiServiceAccountAuth: - description: Service account authentication for Vertex AI - type: object - properties: - type: - description: Must be "service_account" for service account authentication - type: string - default: service_account - key_json: - description: The service account JSON key file contents as a string - type: string - required: - - type - - key_json - x-vectaraParents: - - VertexAiAuth VertexAiAuth: description: Authentication configuration for Vertex AI type: object @@ -16414,113 +17705,6 @@ components: - auth x-vectaraParents: - CreateLLMRequest - BedrockStaticIAMAuth: - type: object - description: AWS Bedrock authentication with explicit IAM credentials - properties: - type: - description: Must be "bedrock_static_iam" for static AWS IAM credentials - type: string - default: bedrock_static_iam - example: bedrock_static_iam - aws_access_key_id: - description: AWS access key ID - type: string - example: AKIAIOSFODNN7EXAMPLE - aws_secret_access_key: - description: AWS secret access key - type: string - example: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY - region: - description: AWS region for Bedrock - type: string - example: us-east-1 - required: - - type - - aws_access_key_id - - aws_secret_access_key - - region - x-vectaraParents: - - AnthropicAuth - BedrockApiKeyAuth: - type: object - description: AWS Bedrock API key authentication - properties: - type: - description: Must be "bedrock_api_key" for Bedrock API key auth - type: string - default: bedrock_api_key - example: bedrock_api_key - api_key: - description: The Bedrock API key - type: string - example: AWS_BEARER_TOKEN_BEDROCK_... - region: - description: AWS region for Bedrock - type: string - example: us-east-1 - required: - - type - - api_key - - region - x-vectaraParents: - - AnthropicAuth - VertexServiceAccountAuth: - type: object - description: Google Cloud Vertex AI service account authentication - properties: - type: - description: Must be "vertex_service_account" for service account auth - type: string - default: vertex_service_account - example: vertex_service_account - key_json: - description: The service account key JSON - type: string - example: '{"type":"service_account","project_id":"my-project",...}' - project: - description: GCP project ID - type: string - example: my-project-id - region: - description: GCP region for Vertex AI - type: string - example: us-central1 - required: - - type - - key_json - - project - - region - x-vectaraParents: - - AnthropicAuth - VertexAccessTokenAuth: - type: object - description: Google Cloud Vertex AI access token authentication - properties: - type: - description: Must be "vertex_access_token" for access token auth - type: string - default: vertex_access_token - example: vertex_access_token - access_token: - description: The GCP access token - type: string - example: ya29.c.Kp... - project: - description: GCP project ID - type: string - example: my-project-id - region: - description: GCP region for Vertex AI - type: string - example: us-central1 - required: - - type - - access_token - - project - - region - x-vectaraParents: - - AnthropicAuth AnthropicAuth: type: object description: Authentication configuration for Anthropic LLM via direct Anthropic @@ -18334,10 +19518,18 @@ components: \ path syntax:\n- Static value: \"fixed_value\" or 123\n- Dynamic reference:\ \ `{\"$ref\": \"session.metadata.field_name\"}`\n\nReferences are resolved\ \ at runtime from context:\n- session.metadata.* - Access session metadata\ - \ fields\n- agent.metadata.* - Access agent metadata fields\n\nExample:\n\ - \ `{\"query\": {\"$ref\": \".session.metadata.query\"}}`\n\nIf you want\ - \ to have a real value `\"$ref\"` use `\"$$ref\"`, that is you can escape\ - \ the first $ by using $$." + \ fields\n- agent.metadata.* - Access agent metadata fields\n- agent.secrets.*\ + \ - Access agent secrets (masked in audit events)\n- tools.* - Access\ + \ prior tool outputs (resolved after the dependent tool runs)\n- currentDate\ + \ - The current date/time in ISO 8601 format\n\nA bracket index may reference\ + \ another context value, whose resolved value is used as the lookup key.\ + \ The inner path may optionally carry a leading $ root marker:\n- Indirect\ + \ reference: `{\"$ref\": \"agent.secrets[session.metadata.user_id]\"}`\ + \ looks up the per-user secret named by `session.metadata.user_id`\n-\ + \ Equivalent forms: `agent.secrets[$session.metadata.user_id]` and `agent.secrets[$.session.metadata.user_id]`\n\ + \nExample:\n `{\"query\": {\"$ref\": \".session.metadata.query\"}}`\n\ + \nIf you want to have a real value `\"$ref\"` use `\"$$ref\"`, that is\ + \ you can escape the first $ by using $$." type: object additionalProperties: true example: @@ -19600,10 +20792,18 @@ components: \ path syntax:\n- Static value: \"fixed_value\" or 123\n- Dynamic reference:\ \ `{\"$ref\": \"session.metadata.field_name\"}`\n\nReferences are resolved\ \ at runtime from context:\n- session.metadata.* - Access session metadata\ - \ fields\n- agent.metadata.* - Access agent metadata fields\n\nExample:\n\ - \ `{\"query\": {\"$ref\": \".session.metadata.query\"}}`\n\nIf you\ - \ want to have a real value `\"$ref\"` use `\"$$ref\"`, that is you\ - \ can escape the first $ by using $$." + \ fields\n- agent.metadata.* - Access agent metadata fields\n- agent.secrets.*\ + \ - Access agent secrets (masked in audit events)\n- tools.* - Access\ + \ prior tool outputs (resolved after the dependent tool runs)\n- currentDate\ + \ - The current date/time in ISO 8601 format\n\nA bracket index may\ + \ reference another context value, whose resolved value is used as the\ + \ lookup key. The inner path may optionally carry a leading $ root marker:\n\ + - Indirect reference: `{\"$ref\": \"agent.secrets[session.metadata.user_id]\"\ + }` looks up the per-user secret named by `session.metadata.user_id`\n\ + - Equivalent forms: `agent.secrets[$session.metadata.user_id]` and `agent.secrets[$.session.metadata.user_id]`\n\ + \nExample:\n `{\"query\": {\"$ref\": \".session.metadata.query\"}}`\n\ + \nIf you want to have a real value `\"$ref\"` use `\"$$ref\"`, that\ + \ is you can escape the first $ by using $$." type: object additionalProperties: true example: @@ -19637,10 +20837,18 @@ components: \ path syntax:\n- Static value: \"fixed_value\" or 123\n- Dynamic reference:\ \ `{\"$ref\": \"session.metadata.field_name\"}`\n\nReferences are resolved\ \ at runtime from context:\n- session.metadata.* - Access session metadata\ - \ fields\n- agent.metadata.* - Access agent metadata fields\n\nExample:\n\ - \ `{\"query\": {\"$ref\": \".session.metadata.query\"}}`\n\nIf you\ - \ want to have a real value `\"$ref\"` use `\"$$ref\"`, that is you\ - \ can escape the first $ by using $$." + \ fields\n- agent.metadata.* - Access agent metadata fields\n- agent.secrets.*\ + \ - Access agent secrets (masked in audit events)\n- tools.* - Access\ + \ prior tool outputs (resolved after the dependent tool runs)\n- currentDate\ + \ - The current date/time in ISO 8601 format\n\nA bracket index may\ + \ reference another context value, whose resolved value is used as the\ + \ lookup key. The inner path may optionally carry a leading $ root marker:\n\ + - Indirect reference: `{\"$ref\": \"agent.secrets[session.metadata.user_id]\"\ + }` looks up the per-user secret named by `session.metadata.user_id`\n\ + - Equivalent forms: `agent.secrets[$session.metadata.user_id]` and `agent.secrets[$.session.metadata.user_id]`\n\ + \nExample:\n `{\"query\": {\"$ref\": \".session.metadata.query\"}}`\n\ + \nIf you want to have a real value `\"$ref\"` use `\"$$ref\"`, that\ + \ is you can escape the first $ by using $$." type: object additionalProperties: true example: @@ -21996,6 +23204,30 @@ components: description: The compaction configuration snapshotted when the session was created. $ref: '#/components/schemas/CompactionConfig' + alias_key: + description: 'If this session was created through an alias (`POST /v2/agent_aliases/{alias_key}/sessions`), + the alias key the caller used. The `agent_key` field above is the resolved + agent the alias''s policy picked. Null when the session was created directly + under an agent (`POST /v2/agents/{agent_key}/sessions`). + + ' + type: string + nullable: true + example: support + secrets: + description: 'Session-scoped secrets, with values masked as `"****"`. Plaintext + is never returned on read; + + tools resolve the real value via `argument_override` with `{"$ref": "session.secrets."}`. + + Set or rotate via the session create or update request. + + ' + type: object + additionalProperties: + type: string + example: + slack_user_token: '****' required: - key - name @@ -22055,6 +23287,25 @@ components: minimum: 0 default: 0 example: 60 + secrets: + description: 'Session-scoped secrets to store on the new session. Map of + secret name to plaintext value. + + Encrypted at rest with the owning agent''s encryption key. Referenced + from tool `argument_override` via + + `{"$ref": "session.secrets."}`. Returned masked (`****`) on reads. + + ' + type: object + propertyNames: + pattern: ^[A-Za-z0-9_-]+$ + additionalProperties: + type: string + minLength: 1 + maxLength: 4096 + example: + slack_user_token: xoxp-your-token-here from_session: description: 'Create a new session by forking an existing one. By default, copies all visible events @@ -22133,6 +23384,25 @@ components: format: int64 minimum: 0 example: 60 + secrets: + description: 'Patch the session''s secrets. Names present in the map are + added or replaced; names absent from the map are left unchanged. + + A name mapped to `null` is removed. Values are encrypted at rest with + the owning agent''s encryption key and returned masked on reads. + + ' + type: object + propertyNames: + pattern: ^[A-Za-z0-9_-]+$ + additionalProperties: + type: string + nullable: true + minLength: 1 + maxLength: 4096 + example: + slack_user_token: xoxp-rotated-token + old_token_to_remove: null AgentEventBase: description: Base properties shared by all agent event types. type: object @@ -23965,6 +25235,305 @@ components: example: false configuration: $ref: '#/components/schemas/ConnectorConfiguration' + AgentAliasKey: + description: "The unique key identifying an alias. Alias keys are independent\ + \ of agent keys \u2014 the same string may exist as both an alias and an agent\ + \ in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and\ + \ calls to `/v2/agents/{key}/...` target the agent.\n" + type: string + pattern: ^[0-9a-zA-Z_-]+$ + minLength: 1 + maxLength: 50 + example: support + SingleRuleTargets: + description: 'Direct route to a single agent. The `agent_key` must reference + an existing agent owned by the same customer. + + ' + type: object + required: + - type + - agent_key + properties: + type: + type: string + default: single + agent_key: + description: The key of the underlying agent this rule routes to. + type: string + WeightedTarget: + description: 'A single option inside a weighted rule. Weight is required and + must be a non-negative integer; the resolver normalizes weights across the + rule''s options at evaluation time. + + ' + type: object + required: + - agent_key + - weight + properties: + agent_key: + description: The key of the underlying agent this option routes to. + type: string + weight: + description: 'Weight used when selecting among the weighted options. Absolute + non-negative integer, normalized at evaluation time. + + ' + type: integer + minimum: 0 + WeightedRuleTargets: + description: 'Weighted selection among several agents. The `partition_by` userfn + expression is evaluated and hashed; the result picks which `options` entry + serves this session. Different rules in the same policy can declare different + `partition_by` expressions (US rules canary by user_id, EU rules by tenant_id, + etc.). + + ' + type: object + required: + - type + - partition_by + - options + properties: + type: + type: string + default: weighted + partition_by: + description: 'UserFn expression whose result is stringified and hashed to + pick among `options`. Required: no implicit default. + + Uses the `get()` function with JSONPath to access the context. + + See https://docs.vectara.com/docs/search-and-retrieval/rerankers/user-defined-function-reranker + for the UserFn language reference. + + + Use `get(''$.session.key'')` for per-session canary, `get(''$.session.metadata.user_id'', + '''')` for per-user canary. If the expression evaluates to `null` at resolution + time, the request is rejected with a 400; wrap optional fields with a + default via `get(''$.path'', '''')`. + + ' + type: string + example: get('$.session.metadata.user_id', '') + options: + description: 'Weighted target options. One is selected by hashing the result + of `partition_by`; weights are normalized at evaluation time. + + ' + type: array + minItems: 1 + items: + $ref: '#/components/schemas/WeightedTarget' + RuleTargets: + description: "The shape of a rule's targets. The `type` discriminator selects\ + \ which fields apply:\n\n* `single` \u2014 a direct route to one agent. No\ + \ weight, no partition function.\n* `weighted` \u2014 a weighted selection\ + \ among several agents. Requires a `partition_by` userfn expression naming\ + \ what to hash on; different rules can use different partition functions.\n" + oneOf: + - $ref: '#/components/schemas/SingleRuleTargets' + - $ref: '#/components/schemas/WeightedRuleTargets' + discriminator: + propertyName: type + mapping: + single: '#/components/schemas/SingleRuleTargets' + weighted: '#/components/schemas/WeightedRuleTargets' + AliasRule: + description: 'A single routing rule consisting of an optional `match` expression + and a `targets` shape. A rule with `match` omitted is a catch-all that always + applies. + + ' + type: object + required: + - targets + properties: + match: + description: "UserFn expression evaluating to boolean.\nUses the `get()`\ + \ function with JSONPath to access the context.\nSee https://docs.vectara.com/docs/search-and-retrieval/rerankers/user-defined-function-reranker\ + \ for the UserFn language reference.\nOmit for a catch-all rule.\n\nMissing\ + \ paths return `null`; comparing against `null` is falsy, so the rule\ + \ falls through to the next one in the policy. Use `get('$.path', default)`\ + \ for an explicit fallback.\n\nContext shape \u2014 note that at resolution\ + \ time the underlying agent has NOT been picked yet, so the `agent.*`\ + \ fields reflect the *alias's* metadata (name, description, metadata),\ + \ with the alias's URL key in `agent.key`. Use these for alias-level context\ + \ (e.g. `$.agent.metadata.region`); use `session.*` for per-call routing\ + \ inputs (tenant, user_id, etc.) which is what most rules dispatch on.\n\ + \n```\n{\n \"agent\": { \"name\", \"key\", \"description\", \"metadata\"\ + : { ... } }, // alias's metadata at resolution time\n \"session\":\ + \ { \"key\", \"name\", \"description\", \"metadata\": { ... } }, //\ + \ the session being created\n \"currentDate\": \"2026-01-15T10:35:00Z\"\ + \n}\n```\n\nExamples:\n\n* `get('$.session.metadata.tenant') == 'us'`\n\ + * `(get('$.session.metadata.tenant') == 'us') and (get('$.session.metadata.tier')\ + \ == 'gold')`\n* `(get('$.session.metadata.region') == 'us-west') or (get('$.session.metadata.region')\ + \ == 'us-east')`\n* `get('$.session.metadata.tier', 'free') != 'free'`\n" + type: string + example: (get('$.session.metadata.tenant') == 'us') and (get('$.session.metadata.tier') + == 'gold') + targets: + $ref: '#/components/schemas/RuleTargets' + RoutedAliasPolicy: + description: 'Evaluates ordered rules against the session context. The first + rule whose `match` expression evaluates to true is selected. The selected + rule''s `targets` shape determines what runs: `single` routes directly to + one agent, `weighted` picks one of several agents by hashing the rule''s `partition_by` + expression. A rule with no `match` always matches (catch-all) and is conventionally + placed last. + + + This single shape covers direct routing (one rule, single target), weighted/canary + rollouts (one rule, weighted targets), conditional routing (multiple rules + with matches), and conditional+canary combinations (multiple rules, each independently + single or weighted). + + ' + type: object + required: + - type + - rules + properties: + type: + type: string + default: routed + rules: + description: 'Ordered routing rules. Evaluated top-to-bottom; the first + rule whose match expression evaluates to true is selected. At least one + rule with no `match` (a catch-all) is recommended to guarantee a fallback + target. + + ' + type: array + minItems: 1 + items: + $ref: '#/components/schemas/AliasRule' + AliasPolicy: + description: "A routing policy. The `type` discriminator determines which fields\ + \ apply:\n\n* `routed` \u2014 evaluate ordered rules; the first rule whose\ + \ `match` expression evaluates to true is selected. The selected rule's `targets`\ + \ are then used (one agent for `single`, hashed by `partition_by` for `weighted`).\ + \ Rules with omitted `match` are catch-all rules (typically last).\n\nMost\ + \ use cases (direct, weighted/canary, conditional, conditional+canary) collapse\ + \ into `routed`.\n" + oneOf: + - $ref: '#/components/schemas/RoutedAliasPolicy' + discriminator: + propertyName: type + mapping: + routed: '#/components/schemas/RoutedAliasPolicy' + AgentAlias: + description: "A routing primitive that maps a public name to one or more agents\ + \ under a configurable policy. When a session is created through an alias\ + \ (via `POST /v2/agent_aliases/{alias_key}/sessions`), the alias's policy\ + \ decides which underlying agent runs that session.\n\nUse aliases for canary\ + \ rollouts (weighted between two agents), tenant routing (different agents\ + \ for different customers in your tenant metadata), or as a stable handle\ + \ in front of agents whose configuration evolves.\n\nRouting rules use userfn\ + \ expressions \u2014 see the `AliasRule.match` field for the context shape\ + \ and example expressions.\n" + type: object + required: + - key + - name + - policy + - enabled + - created_at + properties: + key: + $ref: '#/components/schemas/AgentAliasKey' + name: + description: A human-readable name for the alias. + type: string + maxLength: 100 + example: Customer Support + description: + description: A longer description of what this alias represents. + type: string + nullable: true + policy: + $ref: '#/components/schemas/AliasPolicy' + enabled: + description: Whether this alias is currently invocable. + type: boolean + metadata: + description: Arbitrary metadata associated with the alias. + type: object + additionalProperties: true + nullable: true + created_at: + description: Timestamp when the alias was created. + type: string + format: date-time + updated_at: + description: Timestamp when the alias was last updated. + type: string + format: date-time + nullable: true + ListAgentAliasesResponse: + description: Paginated response containing a list of aliases. + type: object + required: + - aliases + - metadata + properties: + aliases: + type: array + items: + $ref: '#/components/schemas/AgentAlias' + metadata: + $ref: '#/components/schemas/ListMetadata' + CreateAgentAliasRequest: + description: Request body for creating a new alias. + type: object + required: + - key + - name + - policy + properties: + key: + $ref: '#/components/schemas/AgentAliasKey' + name: + type: string + maxLength: 100 + description: + type: string + policy: + $ref: '#/components/schemas/AliasPolicy' + enabled: + type: boolean + default: true + metadata: + type: object + additionalProperties: true + UpdateAgentAliasRequest: + description: "Request body for updating an alias's metadata fields. Use `PUT\ + \ /v2/agent_aliases/{alias_key}/policy` to replace the routing policy itself\ + \ \u2014 policies are atomic and not partially updateable.\n" + type: object + properties: + name: + type: string + maxLength: 100 + description: + type: string + enabled: + type: boolean + metadata: + type: object + additionalProperties: true + ReplaceAliasPolicyRequest: + description: 'Request body for atomically replacing an alias''s routing policy. + The policy is replaced as a unit; partial updates aren''t supported. + + ' + type: object + required: + - policy + properties: + policy: + $ref: '#/components/schemas/AliasPolicy' PipelineStatus: description: The current operational status of the pipeline. type: string @@ -24034,6 +25603,155 @@ components: - region - access_key_id - secret_access_key + SharedGoogleDriveScope: + description: "Ingest from a Google Workspace shared drive. The service account\ + \ (`client_email`) must\nbe added as a member of the shared drive \u2014 or\ + \ of the linked folder \u2014 with at least Viewer\naccess. No domain-wide\ + \ delegation is required.\n" + x-vectaraParents: + - GoogleDriveScope + type: object + properties: + type: + type: string + default: shared + example: shared + url: + description: 'URL of the folder to ingest. Use a shared drive''s root URL + + (`https://drive.google.com/drive/folders/`) to enumerate the + entire drive, + + or any subfolder URL (`https://drive.google.com/drive/folders/`) + to scope + + ingestion to that subtree. The connector walks every descendant subfolder + beneath the + + linked target. + + ' + type: string + minLength: 1 + example: https://drive.google.com/drive/folders/0AHk_z9_Bcg-aUk9PVA + required: + - type + - url + MyGoogleDriveScope: + description: 'Ingest from a single user''s My Drive via Google Workspace domain-wide + delegation. Requires + + the Workspace admin to authorize the service account''s client ID with the + `drive.readonly` + + OAuth scope. + + ' + x-vectaraParents: + - GoogleDriveScope + type: object + properties: + type: + type: string + default: my_drive + example: my_drive + subject_email: + description: User email address whose My Drive the service account impersonates. + type: string + minLength: 1 + example: user@example.com + url: + description: 'Optional URL of a folder within the user''s My Drive + + (`https://drive.google.com/drive/folders/`) to narrow ingestion + to that + + subtree. The connector walks all descendant subfolders and indexes every + file within. + + If omitted, every accessible file in the user''s My Drive is enumerated. + + ' + type: string + example: https://drive.google.com/drive/folders/1A2B3C4D5E6F7G8H9I0J + required: + - type + - subject_email + GoogleDriveScope: + description: 'Which Drive content to ingest. Discriminated by `type`: `shared` + ingests from a Google + + Workspace shared drive the service account has been added to; `my_drive` ingests + from a + + single user''s My Drive via domain-wide delegation. + + ' + discriminator: + propertyName: type + mapping: + shared: '#/components/schemas/SharedGoogleDriveScope' + my_drive: '#/components/schemas/MyGoogleDriveScope' + oneOf: + - $ref: '#/components/schemas/SharedGoogleDriveScope' + - $ref: '#/components/schemas/MyGoogleDriveScope' + BaseGoogleDriveSourceConfiguration: + description: "Base Google Drive source configuration. The `scopes` list enumerates\ + \ one or more starting\npoints \u2014 each entry is either a shared drive\ + \ (`shared`) or a single user's My Drive accessed\nvia domain-wide delegation\ + \ (`my_drive`). The service account configured here must have read\naccess\ + \ to every listed drive and be authorized for each impersonated user.\n" + type: object + properties: + type: + type: string + default: google_drive + example: google_drive + scopes: + description: Drive starting points to ingest under this pipeline. + type: array + minItems: 1 + items: + $ref: '#/components/schemas/GoogleDriveScope' + client_email: + description: 'The Google Cloud service account''s email address (the `client_email` + field of + + the service account JSON key). For `shared` scopes, grant this email read + access + + to each drive or folder you want to ingest. + + ' + type: string + example: drive-ingest@my-project.iam.gserviceaccount.com + private_key: + description: 'The service account''s PEM-formatted RSA private key (the + `private_key` field + + of the service account JSON key, including the `-----BEGIN PRIVATE KEY-----` + + and `-----END PRIVATE KEY-----` markers and embedded newlines). Encrypted + at + + rest and not returned in responses. + + ' + type: string + writeOnly: true + required: + - type + GoogleDriveSourceConfiguration: + description: Configuration for ingesting files from Google Drive using a service + account. + x-vectaraParents: + - PipelineSource + allOf: + - $ref: '#/components/schemas/BaseGoogleDriveSourceConfiguration' + - required: + - scopes + - client_email + - private_key BaseWebSource: description: 'Shared knobs for all web-based sources (sitemap, crawl, sitemap+crawl). Politeness, limits, auth. @@ -24316,9 +26034,11 @@ components: propertyName: type mapping: s3: '#/components/schemas/S3SourceConfiguration' + google_drive: '#/components/schemas/GoogleDriveSourceConfiguration' web: '#/components/schemas/WebSourceConfiguration' oneOf: - $ref: '#/components/schemas/S3SourceConfiguration' + - $ref: '#/components/schemas/GoogleDriveSourceConfiguration' - $ref: '#/components/schemas/WebSourceConfiguration' CronTriggerConfiguration: description: Run the pipeline on a cron schedule. @@ -24656,6 +26376,13 @@ components: - UpdatePipelineSource allOf: - $ref: '#/components/schemas/BaseS3SourceConfiguration' + UpdateGoogleDriveSourceConfiguration: + description: Partial update for Google Drive source configuration. Only provided + fields are merged. + x-vectaraParents: + - UpdatePipelineSource + allOf: + - $ref: '#/components/schemas/BaseGoogleDriveSourceConfiguration' UpdateWebSourceConfiguration: description: 'Partial update for a `web` source configuration. Top-level fields are merged into the existing @@ -24688,9 +26415,11 @@ components: propertyName: type mapping: s3: '#/components/schemas/UpdateS3SourceConfiguration' + google_drive: '#/components/schemas/UpdateGoogleDriveSourceConfiguration' web: '#/components/schemas/UpdateWebSourceConfiguration' oneOf: - $ref: '#/components/schemas/UpdateS3SourceConfiguration' + - $ref: '#/components/schemas/UpdateGoogleDriveSourceConfiguration' - $ref: '#/components/schemas/UpdateWebSourceConfiguration' UpdatePipelineRequest: description: Request to partially update an existing pipeline. Omitted fields @@ -24837,6 +26566,8 @@ components: - SharePoint: the drive item ID + - Google Drive: the file ID + - Web: the canonicalized URL (e.g. `https://docs.example.com/page`) ' @@ -24906,6 +26637,8 @@ components: - SharePoint: the drive item ID + - Google Drive: the file ID + - Web: the canonicalized URL (e.g. `https://docs.example.com/page`) ' @@ -26289,6 +28022,7 @@ x-tagGroups: - Agent Sessions - Agent Schedules - Agent Identity + - Agent Aliases - Glossaries - Guardrails - Instructions